[Laszlo-dev] For Review: Change change.YnPVbvuCF.txt Summary: Rewrite LzTimer to use setInterval/clearInterval instead of LzIdle

P T Withington ptw at openlaszlo.org
Wed Jun 28 06:57:46 EDT 2006


Cool!

I am pretty sure that it is more efficient to write `x instanceof  
Object` than `typeof x == 'object'`

This is a nit:  { d : d } is confusing.  { 'd': d } might be clearer,  
or better yet { delegate: d }?

Flash 8 includes setTimeout, which will make your code simpler (it's  
a one-shot).

I'm confused.  How can this work:  `this.timerList[d]` (where d is a  
delegate, hence an object?)

Do we need to maintain the complexity of multiple timers on a  
delegate, or is that a generality of the old system that was actually  
never used?  Can we change to only allow a single timer per  
delegate?  If we do have to support multiple timers on a delegate,  
maybe it would be better to store the timer id's on the delegate?   
And if we do have to support this complexity, there ought to be a  
test for it.

On 2006-06-28, at 01:01 EDT, Jim Grandy wrote:

> Change change.YnPVbvuCF.txt by jgrandyw at jgrandy-pb.local /Volumes/ 
> data/Users/jgrandyw/dev/svn/openlaszlo/trunk/ on 2006-06-27  
> 21:55:28 PDT
>
> Summary: Rewrite LzTimer in trunk to use setInterval/clearInterval  
> instead of LzIdle
>
> Bugs Fixed:LPP-296
>
> Technical Reviewer: max
> QA Reviewer: mamye
> Doc Reviewer:
>
> Release Notes:LzTimer now uses the ECMAScript standard functions  
> setInterval and
> clearInterval, and as a result is more efficient than the previous  
> implementation,
> which was based on polling through LzIdle.
>
> Tests:test/doubleclick.lzx, examples/mobile/clock/clock-test.lzx,  
> smoketest
>
> Files:
> M      test/doubleclick.lzx
> M      WEB-INF/lps/lfc/services/LzTimer.as
>
> <patch.jgrandyw.8hMF.tgz>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev at openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev



More information about the Laszlo-dev mailing list