What happens when you declare methods event="onstuff" in a class and in its subclass? I see they're both called, and I seem to remember I saw something about this in the doc, but I can't find it again.
Is there anything set about the order in which the methods are called?

In my case, I'm trying to make a somewhat reuseable calendar class (which uses event="ondate"), and extend it in my application. The extended class would also use event="ondate", but I need variables that are set in the superclass's ondate. Am I guaranteed that the superclass's ondate will execute first, or should I find another way to do it?



I tried to do it with generating a different event that said "hey, I'm updated" in the superclass and catch it in my extended classes, but it didn't work:

<class name="calendar">
<attribute name="date"/>
<method event="oninit">
        this.del=new LzDelegate(this,"oncalupdate");
        this.del.register(this,"calupdate");
</method>
<method event="ondate">
        <!-- lots of stuff -->
        this.calupdate.sendEvent();
</method>
</class>

<class name="extendedcal" extends="calendar">
<method event="oncalupdate">
        Debug.write("Event: calupdate");
</method>
</class>

but I never got anything in the extendedcal instances, so I suppose there's something I didn't understand in the way events+delegates work.

--
Mathieu Guillaume <[EMAIL PROTECTED]>
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to