Re: Cocoa really needs to be thread-safe
Re: Cocoa really needs to be thread-safe
- Subject: Re: Cocoa really needs to be thread-safe
- From: Cameron Hayne <email@hidden>
- Date: Tue, 05 Nov 2002 03:25:52 -0500
On 4/11/02 10:03 pm, "James DiPalma" <email@hidden> wrote:
>
Once
>
started my app happily updates once a second like a digital clock. If I
>
depress a button, all time updates stop. If I begin a window resize,
>
all time updates stop.
I suspect you need to use NSEventTrackingRunLoopMode when you register the
timer. See my sample project "TestButtonDown" at:
http://hayne.net/MacDev/TestButtonDown/
which shows a counter quite happily incrementing even while a button is held
down.
On 5/11/02 12:19 am, "Andy Lee" <email@hidden> wrote:
>
> Many if not all of cocoa's widgets block (or simply wait for
>
> nextEventMatchingMask:) to return a mouse-up event during mouse
>
> down. I'm surprised anyone actually noticed.
>
>
This is one of the *first* things I noticed about OS X. I think I
>
first noticed it with a scroll bar while multiple browser windows
>
were busy drawing themselves. The windows would stop drawing while I
>
had the mouse down. I was pretty embarrassed by this, since I had
>
assumed OS X's UI would be at least as smoothly multithreaded as
>
Windows. It looked like widgets were handling mouse-downs inside a
>
blocking loop, which is *so* OS 9.
I don't think that behaviour is the fault of the Cocoa widgets. It seems
more likely to have been the fault of the application programmer.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.