Inheritance in Revolution?

Sarah Reichelt sarahr at genesearch.com.au
Thu Sep 9 23:18:14 EDT 2004


> What I'm looking for is something in the Property Inspector that would 
> allow
> me to specify an object as the script provider for another object.
> References like target and me would still operate as if the actual 
> control
> were used, but it would be as if you had typed the same script into 
> fifty
> buttons manually. Change the code in the master control, and all the 
> others
> immediately have access to the changes.
>
> Unless this ability already exists, in which case, carry on...

Select your 50 buttons (or whatever objects you want to inherit the 
script) and group them. Now put your script in the group's script, not 
in each buttons. If you click in one of the buttons, but there is no 
"on mouseUp" in the button script, the message will pass to the 
button's container, in this case the group, and can be handled there. 
If you want all the objects on your card to call the same handlers, you 
can put the handler in the card script.

Cheers,
Sarah



More information about the use-livecode mailing list