Seems a bit silly...

Scott Rossi scott at tactilemedia.com
Thu Oct 7 16:07:52 EDT 2004


Recently, Frank D. Engel, Jr. wrote:

> Should this, or should it not, be valid Transcript code for a
> preOpenStack handler in a stack script:
> 
> if the target is the first card of me then
> 
> Upon execution, that code results in the complaint:
> 
> Chunk: source is not a container
> 
> 
> So I try this:
> 
> if the name of the target is the name of the first card of me then
> 
> Which is accepted; however, this is in a main stack; opening one of its
> substacks should NOT cause the code within the 'if' block to execute,
> correct?  But it does...
> 
> How can I avoid this problem?

Are you trying to limit preOpenStack messages to the main stack only?  If
so, move the preOpenStack handler to the script of the first card of the
main stack, instead of the stack itself.  Then you shouldn't need to worry
about checking the target at all.

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list