Message path question

Richard Gaskin ambassador at fourthworld.com
Mon Feb 10 19:03:43 EST 2014


Peter Haworth wrote:

> Prowling around the IDE scripts, the revBackScript button of the revLibrary
> stack includes:
>
> dispatch "revHookPostSaveStack" to me .....
>
> ... but there is no such handler in its script.
>
> My understanding of the message path is that since this is in a back
> script, the only other place for that message to go is to the engine.  Is
> that right?

All backscript and library handlers are available to all other 
backscripts and libraries.

The only time their specific order comes into play is when dealing with 
handlers of the same name in two different scripts. In that case, 
libraries are checked first, and then backscripts, in the order in which 
they were inserted into the message path.

Additionally, "dispatch" has an unusual characteristic that's not likely 
at play here, but worth knowing about:  if a custom message sent with 
dispatch isn't handled, you won't get a "handler not found" error as you 
would with "send".  Instead, the local var "it" will simply contain 
"unhandled".

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list