• 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
Re: Responder chain inclarity
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responder chain inclarity


  • Subject: Re: Responder chain inclarity
  • From: Seth Willits <email@hidden>
  • Date: Sun, 15 Apr 2012 16:32:47 -0700

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 (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

References: 
 >Responder chain inclarity (From: Erik Stainsby <email@hidden>)

  • Prev by Date: Re: Dictionary not returning objects
  • Next by Date: Re: Question about hebrew in textfields and textviews
  • Previous by thread: Responder chain inclarity
  • Next by thread: How to cancel an NSInvocationOperation
  • Index(es):
    • Date
    • Thread