When I asked about this on the list before, Scott Raney wrote:

> Richard Gaskin <[EMAIL PROTECTED]> wrote:
> 
>> It's my understanding that MC puts all backscripts effectively into one
>> "layer" in the script hierarchy.
> 
> They're actually kept separate, and are executed in the order
> returned by the backScripts function, which happens to be the
> reverse of the order in which they were inserted.
>
>> If that's correct, how are namespace collisions resolved (two backscripts
>> containing a handler of the same name)?
> 
> Not an issue: the most recently added script gets the message
> first.
> 
>> Also, are libraries stacks before, on the same level as, or after
>> backscripts?
> 
> They are executed before backScripts, again in reverse order
> that they were added.
> Regards,
> Scott

Here's what confuses me:

If I have a function defined on a card and I call that function from a stack
without using "call", the attempt to call the function will fail, since the
card is higher in the hierarchy than the stack.

But in a simple example stack I posted to
<ftp://ftp.fourthworld.com/MetaCard/backscript_test.mc.sit>, I have two
backscript buttons ("bs1" and "bs2"), and there are two test buttons which
insert the bs1 and bs2 scripts into the backscripts.  The button "Test 1"
inserts bs1 first, then bs2.  The button "Test 2" inserts them in the
reverse order.

Oddly, in both cases all backscript handlers are available to all other
backscript handlers.

While I very strongly prefer this to SuperCard's implementation (in which
you need to be very careful about the insertion order lest you make calls
unavailable to lower backscripts) this example stack seems to contradict my
understanding of what you wrote.

Based on my revised understanding, it seems that the "layering" of
backscripts only comes into play with name space collisions, using the rules
you noted above -- in all other cases, all backscript handlers are
effectively available to all backscripts, regardless of the order in which
they were inserted.

Is this correct?

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Multimedia Design and Development for Mac, Windows, UNIX, and the Web
 _____________________________________________________________________
 [EMAIL PROTECTED]                 http://www.FourthWorld.com
 Tel: 323-225-3717           ICQ#60248349            Fax: 323-225-0716


backscript_test.mc

Reply via email to