Script Hierarchy

David Bovill david at openpartnership.net
Sat Feb 3 09:04:29 EST 2007


I am writing a handler to walk the script hierarchy - which means I have got
to get to the bottom of exactly how the message passing happens. My question
is basically how the hierarchy works exactly with front and backscript and
used stacks. The front go in the front, the used after the stack hierarchy
and the back in the back - and the order in pop in pop out.

What is puzzling me is that the order of the libraries seems to make no
difference - it is as if they were all in one big script space. Some of my
handlers in the libraries call others and if the hierarchy was strict this
should lead to a script error in that the handler should be effectively
"missing - when it is below the library in the hierarchy (sorry about the
mouthful).

For instance if I have 2 used libraries and library one calls a handler in
library 2 - it does not seem to matter which way around the libraries are
added - the call is always found?

Is it the case that libraries of the same "type" (forn,used, and back) are
effectively all in one "flat" space - as if they were in a single script,
and that the order only affects the order the scripts are added to this
space (in case there are multiple handlers of the same name)?



More information about the use-livecode mailing list