NSPanel not receiving events.
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