Call a function on another card

Bob Sneidar bobsneidar at
Fri Feb 24 10:52:04 EST 2017

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 at> 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

More information about the use-livecode mailing list