[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GUI updating while application is working
From: |
Riccardo Mottola |
Subject: |
Re: GUI updating while application is working |
Date: |
Mon, 23 Jul 2012 18:20:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; NetBSD i386; rv:13.0) Gecko/20120621 Thunderbird/13.0 |
Hi,
On 07/23/12 15:01, Ivan Vučica wrote:
I don't have code here, but under cocoa it should be:
[[NSRunLoop mainLoop] runUntilDate:[NSDate distantPast]];
I made that:
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]];
and that was indeed what I was looking for. I was using the "perform
selector" with 0.0 sec delay previously (seen also in mac dev. forums a
long time ago), but somehow this tricks works better and works on
gnustep too. Possibly that is why the application performed a little bit
better on Cocoa.
As you guessed my intervals are too long to perform any decent user
interaction, but they do help showing the UI well drawn. I tried
clicking on menus or other windows and with some luck i get the event
processed. THus either I find defined places where to process events
without harm in smaller intervals or I will resort to proper threading.
But it is already a good improvement!
Riccardo