On Thu, 21 Jun 2007 22:00:47 +0200
Micha Nelissen <[EMAIL PROTECTED]> wrote:

> Felipe Monteiro de Carvalho wrote:
> > It turns out that on Carbon widgetset OnIdle event will not be fired
> > unless something happens on the application, like moving the mouse
> > over it, unlike Delphi, where it is just fired non-stop.
> 
> There is a boolean parameter that you can set to fire the OnIdle
> again, IIRC. I thought the default was to fire only once, but I could
> be mistaken.

Correct.
OnIdle is called after all messages have been handled.
Under windows there are always some messages flying around, so you
could misuse OnIdle as timer.
Under carbon and gtk there are less messages, so it can not be used as
timer.
But as Micha said the OnIdle event has a 'Done' parameter to tell, that
it should not wait for the next message. Then it will fire constantly.
This is not the same as misusing the OnIdle under windows, because
using 'Done' will guarantee 100% cpu. This 'Done' is needed for games
and animations.
All others should use TTimer.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to