[Laszlo-dev] undefined property problem
Henry Minsky
henry.minsky at gmail.com
Thu Nov 17 08:13:08 PST 2005
That is also my thoughts - the constraint might be running before the parent
has a value, and getting a NaN value, which will be sticky and turn every
other number it encounters into a NaN if you do arithmetic on it.
On 11/17/05, P T Withington <ptw at pobox.com> wrote:
>
> Perhaps a race condition between the constraint and the class
> initializer. What happens if you set the class `duration` value
> using an attribute tag rather than in the class tag?
>
> On 16 Nov 2005, at 23:18, Denis Bohm wrote:
>
> > I'm having this problem with version 3.1.
> >
> > When I try to run the code below I get the following warnings in
> > the debugger:
> >
> > WARNING: problem.lzx:6: reference to undefined property 'duration'
> >
> > I'm trying to figure out how to set a default value for the
> > duration attribute. Does anyone see what's wrong?
> >
> > <canvas width="600" height="600">
> >
> > <class name="fade" extends="animatorgroup" process="sequential"
> > duration="5000">
> > <attribute name="lead" value="1000" type="number"/>
> > <animator attribute="opacity" from="0" to="1"
> > motion="easeboth" duration="${parent.lead}"/>
> > <animator duration="${parent.duration - 2 * parent.lead}"/>
> > <animator attribute="opacity" from="1" to="0"
> > motion="easeboth" duration="${parent.lead}"/>
> > </class>
> >
> > <view>
> > <animatorgroup process="sequential">
> > <fade target="v1" duration="5000"/>
> > <fade target="v2" lead="1000"/>
> > </animatorgroup>
> > <view id="v1" width="600" height="600" opacity="0"
> > bgcolor="red"/>
> > <view id="v2" width="600" height="600" opacity="0"
> > bgcolor="blue"/>
> > </view>
> > </canvas>
> >
> > _______________________________________________
> > Laszlo-dev mailing list
> > Laszlo-dev at openlaszlo.org
> > http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openlaszlo.org/pipermail/laszlo-dev/attachments/20051117/74cf6b49/attachment.html
More information about the Laszlo-dev
mailing list