• 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: Interface item validation through first responder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface item validation through first responder


  • Subject: Re: Interface item validation through first responder
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 15 Jun 2011 12:49:36 -0700

On Jun 15, 2011, at 12:12, Luc Van Bogaert wrote:

> Because things still don't work, I have tried to visualize the responder chain by adding this into applicationDidFinishLaunching:
>
>     NSResponder *nextResponder = [self.window nextResponder];
>     do {
>         NSLog(@"%@", [nextResponder class]);
>         nextResponder = [nextResponder nextResponder];
>     } while (nextResponder);
>
> This just returns one line of output: "null"
>
> So does this mean my window doesn't have a next responder? If so, I'm completely lost about why that would be. But of course that would explain why the validation methods are never called.

It sounds like you're thinking of the chain as running "down" from the window to its subviews (and, potentially, the subview view controllers). It actually runs in the other direction, "up" from window.firstResponder towards the window object, and *ends* at the window. (I mean, the window-specific responder tree ends there. The logical responder chain continues on to the window controller, etc, just not using nextResponder links.)

If you want to see what (part of) the chain looks like, start your loop from window.firstResponder.


_______________________________________________

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

  • Follow-Ups:
    • Re: Interface item validation through first responder
      • From: Luc Van Bogaert <email@hidden>
References: 
 >Interface item validation through first responder (From: Luc Van Bogaert <email@hidden>)
 >Re: Interface item validation through first responder (From: Quincey Morris <email@hidden>)
 >Re: Interface item validation through first responder (From: Luc Van Bogaert <email@hidden>)
 >Re: Interface item validation through first responder (From: Quincey Morris <email@hidden>)
 >Re: Interface item validation through first responder (From: Luc Van Bogaert <email@hidden>)

  • Prev by Date: Re: After Autoreleasing Still Getting Leaked
  • Next by Date: Re: After Autoreleasing Still Getting Leaked
  • Previous by thread: Re: Interface item validation through first responder
  • Next by thread: Re: Interface item validation through first responder
  • Index(es):
    • Date
    • Thread