LZX does not have "class methods" in the C++ sense (they have been
proposed as an addition). But, it looks to me like you mean TaskBar
to be a singleton and you should be calling TaskBar.addWindowButton.
On 2006-04-30, at 21:04 EDT, Stéphane . wrote:
> Hi there, i'm trying to create a taskbar. My code is at the end.
> I don't understand why I can't call addWindowButton method of the
> taskbar class!
> If someone can help, thanks !
> <?
>
> xml version="1.0" encoding ="UTF-8" ?>
> <
>
> canvas width="100%" height="100%" debug="true">
> <
>
> class name="fos_taskbar_button" extends="button">
>
> <attribute name="height" value="100%" />
>
> <attribute name="windowID" value="-1" />
>
> <method name="clicked" event="onclick">
> var relatedWindow = windowID;
>
> var visible = relatedWindow.visible ? false : true;
>
> relatedWindow.setAttribute("visible", visible);
>
>
> </method>
> </
>
> class>
> <
>
> class name="fos_taskbar" extends="view">
>
> <attribute name="height" value="30" />
>
> <attribute name="width" value="100%" />
>
> <attribute name="y" value="${immediateparent.height - this.height}" />
>
> <attribute name="defaultplacement" value="'insideview'" />
>
> <fos_taskbar_button id="fos_taskbar_startButton" text="Demarrer"
> onclick="alert('this')" />
>
> <view name="insideview" width="${parent.width}" height="$
> {parent.height}" />
>
>
> <method name="addWindowButton" args="windowObject">
> newTBButton = new fos_taskbar_button(this.insideview, {title:
> windowObject.title, windowID: windowObject.id});
>
>
> </method>
> </
>
> class>
> <
>
> class name="fos_window" extends ="window" oninit="this.setup()">
>
> <attribute name="closeable" value="true" />
>
> <attribute name="resizable" value="true" />
>
> <method name="setup" event="oninit">
> fos_taskbar.addWindowButton(this);
>
>
> </method>
> </
>
> class>
>
> <
>
> fos_taskbar id="TaskBar">
> </
>
> fos_taskbar>
> <
>
> fos_window>
>
> <attribute name="title" value="Title" />
> </
>
> fos_window>
> </
>
> canvas>
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user