Windows events queue 
Author Message
 Windows events queue

Hi,

while running long loops, Dolphin doesn't process any queued Windows events.
This is sometimes very annoying. Is there a possibility to force a polling
of the events queue  (Like 'DoEvents' in VB) ?

Thanks
Ingo



Sat, 01 Nov 2003 09:20:25 GMT  
 Windows events queue
Ingo,

Quote:
> while running long loops, Dolphin doesn't process any queued Windows
events.
> This is sometimes very annoying. Is there a possibility to force a polling
> of the events queue  (Like 'DoEvents' in VB) ?

There are at least two alternatives.

The preferred method is probably to fork another process, with the preferred
priority (usually) being Processor userBackgroundPriority.  Updates to the
GUI from such a thread are often happiest when "synchronized" with it using
#queueDeferredAction:.

In rare circumstances in which you really need to explicitly run a message
loop, you can follow the example of MouseTracker>>startTracking:.

If you are spending a lot of time in external calls, then you might need to
overlap them to get the results you want, but, be careful to respect the
(very few actually) rules if venture into it.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.



Sat, 01 Nov 2003 13:25:38 GMT  
 Windows events queue
Ingo

Quote:

> while running long loops, Dolphin doesn't process any queued Windows
events.
> This is sometimes very annoying. Is there a possibility to force a polling
> of the events queue  (Like 'DoEvents' in VB) ?

The direct equivalent would be:

    SessionManager inputState pumpMessages.

There is also #loopWhile:, which gives more control.

However there are alternatives to polling not available in VB, as Bill
mentions, since Dolphin can run background threads.

Regards

Blair



Sat, 01 Nov 2003 18:42:16 GMT  
 Windows events queue
Thank you Bill !


Is it possible, that my mail got junked by a spam filter ?

Bye
Ingo



Sat, 01 Nov 2003 18:42:25 GMT  
 Windows events queue

arts.com says...

Quote:

> The direct equivalent would be:

>     SessionManager inputState pumpMessages.

> There is also #loopWhile:, which gives more control.

> However there are alternatives to polling not available in VB, as Bill
> mentions, since Dolphin can run background threads.

   DSDN (great tool!) blocks the whole of Dolphin during a search. I've
often thought of changing it so that I could do something else while the
search is progressing (I like to multitask my time...). For something
like that, which of these suggestions would best fit? I thought of
forking the search into another thread, but then you have to deal with
the cancel button differently and I haven't made any attempts to
actually do it beyond some experimenting with sample objects. Where
would one include the SessionManager inputState pumpMessasges call, for
example?

Joey

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----



Sun, 02 Nov 2003 22:17:36 GMT  
 Windows events queue
Joey,

Quote:
>    DSDN (great tool!) blocks the whole of Dolphin during a search. I've
> often thought of changing it so that I could do something else while the
> search is progressing (I like to multitask my time...).

Go to DsdnShell>>search and edit the last half of the method to read ...

found := OrderedCollection new.
[elapsed := Time millisecondsToRun: [
    search searchAndCollectIn: found.
    classes searchAndCollectIn: found.
    methods searchAndCollectIn: found.
    packages searchAndCollectIn: found.
    archive searchAndCollectIn: found.
    ec searchAndCollectIn: found.
    wiki searchAndCollectIn: found.
    info searchAndCollectIn: found].
    search setDocuments: found.
    Sound bell.

    status value: ' ', elapsed printString, ' milliseconds'.
    Processor sleep: 1500.
    self updateStatus] forkAt: Processor userBackgroundPriority

... and you should be able to continue working while the search progresses,
albeit a little sluggishly. It might be better to avoid shutting down DSDN
while a background search is in progress though - he says, just in case <g>

I did spend some time trying to speed up the DSDN search, it was the main
reason for the inclusion of the caching mechanism for all data loaded from
files. On my box a full search, with an empty cache, takes about 20 seconds
and subsequent searches about 2 seconds, which I thought reasonable. On
slower machines (mine's a 750 P3) a background search would probably make
more sense.

Ian



Sun, 02 Nov 2003 23:12:47 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Adding event to the event queue

2. CLASSes and QUEUEs (was: Re: QUEUE in QUEUE)

3. Clearing the EVENT Queue

4. Sending messages to an event queue

5. Error 95: Event Queue could not be created

6. queue state machine with event-driven

7. DUIM event queue

8. Question concerning the Verilog Events queue

9. Event queue question

10. how to post event to the message queue?

11. Deleting event from queue

12. Checking event queue

 

 
Powered by phpBB® Forum Software