problems with modal window and menu command
problems with modal window and menu command
- Subject: problems with modal window and menu command
- From: Ken Victor <email@hidden>
- Date: Mon, 4 Dec 2006 17:01:08 -0800
i've got an NSWindow that is displayed via:
[NSApp runModalForWindow:]
this window has a default button whose target is my subclass of
NSWindowController (which is setup at the nib's owner in IB) and an
action method in my subclass. if i click on this button or type
"enter" then everything works as it should.
however, i also have a menu item whose target is set to
firstResponder in IB and has the same action as the default button
above. if i select this menu item via its keyboard shortcut, again,
everything works properly.
and now for the wierdness that has been driving me crazy all day: if
i select the menu item with the mouse and am very careful to not move
the mouse after the selection and to not jiggle any keys on my
keyboard, then, while the apprpriate action method is called (which
calls stopModal btw), control never returns to the instruction after
the above runModalForWindow. i can wait indefinetly, and i never get
control back. now if i move the mouse or type on the keyboard,
everything resumes normal operation!
i'm at a loss as to what is going wrong. i'd appreciate any and all
advice/suggestions as to how to figure out what is going wrong and/or
how to fix this. pointers to appropriate documention also welcome.
or... in other words, any help GREATLY appreciated.
thanx,
ken
_______________________________________________
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