Accessing Functions in the Script of the Main Stack
bobs at twft.com
Wed Aug 24 15:17:52 EDT 2011
That is interesting. It means that if you had a handler in both the library and the stack script named the same thing, the library would run first, then the stack version if the message were passed.
Of course, I can beat you all to the punch by saying, "Well don't do that!" :-)
On Aug 24, 2011, at 11:52 AM, J. Landman Gay wrote:
> On 8/24/11 1:31 PM, Bob Sneidar wrote:
>> I may misunderstand then. I thought that a library stack was enabled
>> with the start using command, and that this is why the scripts run,
>> because the stack script of a stack in use is inserted into the
>> backscript. Am I wrong? If so, then how are the commands and
>> functions in a library stack inserted into the message path?
> I don't know if it's changed since the old MetaCard days, but back then Dr Raney explained one of the distinctions to me.
> Stacks in use place their stack script into the message hierarchy just before the Home stack script. (In a standalone, Home is your mainstack.) This retains compatibility with HyperCard.
> Scripts inserted "into back" are placed after the Home stack script; they are the last thing before the engine gets messages.
> Another distinction is that any script of any object can be inserted into back (which allows a great deal of flexibility; the LiveCode IDE inserts button scripts into back to load things it needs.) But when a stack is put in use, only the stack script itself is inserted into the hierarchy; no other object scripts are available.
> Libraries are strictly stacks in use.
> Jacqueline Landman Gay | jacque at hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode