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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to