[Lazarus] Strange dependency of units

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Thu Apr 5 17:36:25 CEST 2012



On Thu, 5 Apr 2012, Michael Schnell wrote:

> On 04/05/2012 04:45 PM, Michael Van Canneyt wrote:
>> 
>> 
>> 
>> Exactly. That is called 'polling' windows...
>> 
>> ...
>> You have a strange definition of polling.
>> 
>> Polling = Checking something at regular intervals.
>
> Sorry for being tense, but what has been described (and acknowledged by you) 
> is _not_ doing something at regular intervals. The API only returns when a 
> message arrives. some might come in some microsecond intervals and then there 
> might be a gap of days. To me this is not "regular intervals".

Can you try to open your mind a bit and get the spirit of the definition ? Please ?

Then try this:

Polling = Asking or checking something.

This is as opposed to 'interrupts', where you're not asking, but where the
environment interrupts whatever you're doing and forces you to handle the
event right there and then.

The 'regular intervals' you seem to insist on, means you just put a timeout on the
time you wait for your answer when polling.

>> Qt/GTK/X11 allow for this design as well.
>
> So there is a possibility to feed user events to the queue in GTK ? If so, I 
> don't understand why the GTK Widget Type (other than the Windows Widget Type) 
> implements additional (an) queue(s) in Pascal code. (I never took a look at 
> QT.)

Just add a file descriptor to the main loop mechanism, and write something to it
from wherever you want to send an event.

Michael.




More information about the Lazarus mailing list