Yes, but Peter has a single behavior for all his cards, but unique script local 
variables for each card. He wants those script local variables to be visible to 
his behavior. 

In a related note, I want to say again that properties can act as scoped 
variables using the method I described. So properties of a stack or a card or 
of anything can have the same names, like tableName for instance for each card 
displaying data from different SQL tables for instance. A behavior script for 
all the cards can call a function in the actual script of each card and 
depending on the card you are on will retrieve the properties specific to that 
card. 

A poor man's variable scoping as I have called it before. 

Bob S


> On Feb 23, 2017, at 17:42 , Richard Gaskin via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Bob Sneidar wrote:
> 
> > I did a quick little test. The card's script local variables are not
> > accessible from the behavior script.
> 
> True, but you may not need to:  each object subscribed to a behavior script 
> maintains its own set of script-local variables.
> 
> -- 
> Richard Gaskin


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to