• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa really needs to be thread-safe
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: Cocoa really needs to be thread-safe (From: James DiPalma <email@hidden>)

  • Prev by Date: Decoding ANSI c string from win32
  • Next by Date: Re: Decoding ANSI c string from win32
  • Previous by thread: Re: Cocoa really needs to be thread-safe
  • Next by thread: Re: Cocoa really needs to be thread-safe
  • Index(es):
    • Date
    • Thread