Inheritance in Revolution?

MisterX b.xavier at internet.lu
Tue Sep 14 01:25:21 EDT 2004


That's more the XOS way than going nuts trying to parse a tree of 
class properties in an object to act on a script that you can't 
debug or maintain easily!


> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com]On Behalf Of Frank Leahy
> Sent: Monday, September 13, 2004 21:14
> To: use-revolution at lists.runrev.com
> Subject: Re: Inheritance in Revolution?
> 
> 
> 
> On Sep 11, 2004, at 11:58 PM, use-revolution-request at lists.runrev.com 
> wrote:
> 
> > From: Richard Gaskin <ambassador at fourthworld.com>
> > Subject: Re: Inheritance in Revolution?
> > To: How to use Revolution <use-revolution at lists.runrev.com>
> > Message-ID: <41437564.60804 at fourthworld.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > Arthur Urban wrote:
> >
> >>>> There is something similar that's been in
> >>>> discussion and will hopefully be
> >>>> implemented in the next version (or the one
> >>>> after that), and it's being
> >>>> called "parentScripts". Sort of an
> >>>> object-specific "backscript", you can
> >>>> assign the script of an object as the
> >>>> "parentScript" to one or more other
> >>>> objects. This would allow 25 buttons to use the
> >>>> same script of its parent.
> >>>
> >>> isn't this what a group script for
> >>> 25 grouped buttons should do?
> >>
> >>
> >> Sure. But what if your 25 buttons aren't on the same card or the same 
> >> stack?
> >> They may still all need the exact same behaviour.
> >
> > Use a frontscript that differentiates based on a property setting.
> 
> Why not create a script "MyButtonScript" (for example), and then call 
> it in each button's "on mouseDown" (or mouseUp, or any other handler)?
> 
> In button:
> 
> on mouseDown
>      MyButtonScript
> end mouseDown
> 
> In home stack, or in a stack that you've done a start using on:
> 
> on MyButtonScript
>    -- do common stuff here
> end MyButtonScript
> 
> I know it's not "inheritance" per se, but it has the same general 
> impact at runtime.  Or did I miss something about what you want to do?
> 
> As for parent scripts, sounds interesting, but it will be interesting 
> to see how they're implemented, and whether (and how) you'll be able to 
> override specific handlers on a per button instance basis.
> 
> -- Frank
> 
> Web Photos Pro: Software for Photo Bloggers and Other Photo Power Users
> See us on the web at http://www.webphotospro.com/
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution


More information about the use-livecode mailing list