• 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
NSPanel not receiving events.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPanel not receiving events.


  • Subject: NSPanel not receiving events.
  • From: "David Springer" <email@hidden>
  • Date: Thu, 14 Aug 2008 16:25:06 -0600

Folks,

I have an NSPanel (not modal), with one button on it.  If I
instantiate this panel and let the normal app loop run, everything
works fine: clicking the button sends a message to the appropriate
object.

However, if I try to instantiate this panel, then run [NSRunLoop
currentRunLoop] myself (I have tried the three run loop modes in the
docs, none work) - the button no longer responds to mouse clicks, and
the panel stops working.  This is the code that does not work (object
names have been changed to protect my job):

  PanelController *panelController = // PanelController is a subclass
of NSObject
      [[PanelController alloc] init];

  NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
  do {
    [runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
  } while (![panelController isCancelled]);

Seems like I am missing some rudimentary thing relative to the event
loop here.  But what?  Help?

Thanks!
- Dave.S
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

  • Follow-Ups:
    • Re: NSPanel not receiving events.
      • From: "Kyle Sluder" <email@hidden>
  • Prev by Date: Making a bound view re-read its value
  • Next by Date: Re: Making a bound view re-read its value
  • Previous by thread: Re: Making a bound view re-read its value
  • Next by thread: Re: NSPanel not receiving events.
  • Index(es):
    • Date
    • Thread