` Message hooks (Graham Dawson ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

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 27, 2024, 9:58 am
This article has been viewed 35115 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: