Reliable way to do something on shutdown?

J. Landman Gay jacque at hyperactivesw.com
Wed Jun 19 12:45:12 EDT 2013


On 6/19/13 2:11 AM, Terry Judd wrote:

> One more thing - if you have a special clean up routine then you'll need to handle the user quitting using a keyboard shortcut (cmd-Q) separately on OSX. Something like this...
>
> on appleEvent pClass,pID,pSender
>     switch (pClass & pID)
>        case "aevtquit"
>           myShutdownRoutine
>           pass appleEvent
>           break
>        default
>           pass appleEvent
>           break
>     end switch
> end appleEvent

Just curious why you'd need an AppleEvent. Wouldn't a shutdown handler 
be enough? I've never had to use an AppleEvent for that, but would like 
to know what situation would require it.


>> Now, if only someone knew the answer to my hilitedLine question. (Nudge,
>> nudge.)
>
> Not sure what's going on there. Have you tried an opencard handler? Or tried using a 'send' to trigger the change?

That's what I'd do too. The engine does some internal housekeeping when 
it opens a card or a stack, and one of those things is automatic focus 
and automatic hiliting of list fields. Sometimes that gets in the way. 
Sending a message in time during preOpenCard to a handler that sets the 
hilite usually works because it happens after the automatic stuff completes.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list