Re: Background app, NSStatusItem, tight loop, event handling
Re: Background app, NSStatusItem, tight loop, event handling
- Subject: Re: Background app, NSStatusItem, tight loop, event handling
- From: Dave Camp <email@hidden>
- Date: Thu, 5 Feb 2004 10:32:11 -0800
On Feb 5, 2004, at 9:59 AM, Dave Hersey wrote:
I have a background app with an NSStatusItem. When I use the
StatusItem to
start some data processing, a number of tight loops are entered and
events
to the StatusItem are blocked until the processing completes. Other
status
items remain responsive during this time.
Clicking on my menu does nothing until the processing completes, at
which
time the menu pops down. Unfortunately, once of the menu items in the
status
item is a Cancel option, so I'd really like to be able to click on the
thing
and pull down that item before processing completes.
The correct solution would be to move your tight loops into a separate
thread, which would leave the main thread available for event
processing. I would suggest reading the documentation for NSThread and
friends.
Dave
---
It is dark; you are likely to be eaten by a grue. -Zork
_______________________________________________
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.