Error Messages in modify mode

Discussions about CSEntry
Post Reply
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Error Messages in modify mode

Post by khurshid.arshad »

Dear Team

How we can skip all the error messages in modify mode with one command.

Thanks.
a.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Error Messages in modify mode

Post by josh »

There isn't a way to disable all messages. You would need to check the return from the demode() function before displaying each message and not display it if in modify mode.
khurshid.arshad
Posts: 572
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Error Messages in modify mode

Post by khurshid.arshad »

thanks.
a.
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Error Messages in modify mode

Post by Gregory Martin »

If I were to follow Josh's advice, I would create a function that would take care of the conditional display of messages, and then use the maketext function to format the messages:
function DisplayMessage(string message)

    
if demode() = 1 then
        
errmsg("%s",message);
    
endif;

end;

// ...

DisplayMessage(
maketext("Ages are not consistent!"));
Post Reply