` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Message hooks
2011-04-25 -- Graham Dawson
 
There is a set of system properties that allow you to get one of your procedures called in place of the built in Message, Halt, Stop and Fatal Error dialogs. Then you can do what you want. system{prop:messagehook} = address(MyMessage) system{prop:halthook} = address(MyHalt) system{prop:stophook} = address(MyStop) system{prop:fatalerrorhook} = address(MyFatalError) where MyMessage etc are procedures that will override the built in dialogs typically logging errors to a file and deciding whether to contiue or not. Procedure declarations must match those of the built in versions. for Message (STRING,,,,UNSIGNED=0,UNSIGNED=0),UNSIGNED (input_text,caption,icon,buttons,default,style) for Stop () (input_text) for Halt (UNSIGNED=0,) (errorlevel,input_text) for FatalError (STRING ,UNSIGNED) (input_text,errornumber)


Today is April 28, 2024, 12:02 pm
This article has been viewed 35116 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: