• 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: Background app, NSStatusItem, tight loop, event handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Background app, NSStatusItem, tight loop, event handling
      • From: Dave Hersey <email@hidden>
References: 
 >Background app, NSStatusItem, tight loop, event handling (From: Dave Hersey <email@hidden>)

  • Prev by Date: Re: RETRIEVING AN ARRAY ENTRY FROM AN ARRAY
  • Next by Date: Re: Background app, NSStatusItem, tight loop, event handling
  • Previous by thread: Background app, NSStatusItem, tight loop, event handling
  • Next by thread: Re: Background app, NSStatusItem, tight loop, event handling
  • Index(es):
    • Date
    • Thread