Hi All,
Is there some kind of onIdle event available in qooxdoo 0.8? We are 
working on quite a large application and mainly coming from a C++ 
background. With Borland's VCL there was an onIdle event that you could 
hook into and was ideal for enabling/disabling controls depending on an 
application's state.

If not, this is the best solution we could come up with after looking at 
the source code:
* Create a class that implements qx.event.IDispatcher (more than likely 
this would also be a singleton)
* Register this in qx.event.Registration.addDispatcher with a high priority
* qx.event.Manager will call our canDispatchEvent method for every 
(correct?) event fired
* For all events that can change the 'state' of our application, e.g. 
click and and key press we do something along the lines of the following 
but always return false
     killTimeout(this.timer);
     this.timer = setTimeout(... , 0);
* Once all events have been handled our last time-out will fire once, 
when the browser becomes 'idle'
* The timeout then dispatches an 'idle' event to all widgets that are 
interested.

That's the plan. The idea is then we can add an event listener for this 
'idle' function whenever we need it. The code inside these handlers will 
be quick, simple things such as enabling a control as long as checkbox 
is ticked.

What are peoples thoughts on this?

Many Thanks In Advance,
Matthew


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to