On Apr 15, 2012, at 1:03 PM, Erik Stainsby wrote:

> My issue is with wiring up the menu to the NSResponder chain. When I connect 
> the Delete menu item to the FirstReponder action in IB the event never fires.

NSViewControllers are not part of the responder chain by default. You need to 
manually add them if you want to do that.


> If I connect the Delete button directly to the viewController's 
> deleteLocator: action outlet the event gets hung up in the RSWindow 
> sendEvent:  else { [super sendEvent:theEvent] } .

I don't think this has anything to do with your sendEvent implementation. It 
looks to me like you hooked up the menu item's action to the menu, not the view 
controller. (Unless the view controller is gone and the same address is now 
coincidentally being used by a menu.) Double-check the connection, and use 
NSZombie if you're absolutely certain it's hooked up correctly.



> It occurs to me I may be trying to remove the viewController from within the 
> viewController - a lifting-by-the-bootstraps problem ?  Should I make the 
> RSWindow do the removal/deletion ? Or AppDelegate ?

That occurred to me as well before getting to your stack trace, but that's not 
what the problem is here. And it is fine for it to remove itself, just as long 
as nothing else after the removal references the view controller further if the 
removal causes a deallocation.





--
Seth Willits

_______________________________________________

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

This email sent to arch...@mail-archive.com

Reply via email to