• 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: Application halts when using popup or app menu?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Application halts when using popup or app menu?


  • Subject: Re: Application halts when using popup or app menu?
  • From: "Stephen F. Booth" <email@hidden>
  • Date: Sun, 17 Jun 2007 14:03:40 -0700

I have an application that receives data over a TCP/IP network between 2 and
5 times per second. Communication is done using NSStreams.
When I enter the application menu, or a popup menu in the interface, the
network stream is no longer monitored (datafeed shuts down). It appears that
the application does not follow the normal run loop in which the streams are
handled.
Obviously, I want the network to be monitored continuously, at all times.
Is there a way to keep it going also when using menus?

Menus are run in the NSEventTrackingRunLoopMode- if you want the connection to be monitored most of the time, use scheduleInRunLoop:forMode: to add the stream to NSDefaultRunLoopMode, NSModalPanelRunLoopMode, and NSEventTrackingRunLoopMode. I say "most" because there could always be custom run loop modes that you aren't aware of.


Stephen
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: How to compute optimal NSField size?
  • Next by Date: Bizarre crashing bug
  • Previous by thread: Application halts when using popup or app menu?
  • Next by thread: How to compute optimal NSField size?
  • Index(es):
    • Date
    • Thread