On 15 Jun 2011, at 19:25, Quincey Morris wrote:
> On Jun 15, 2011, at 08:56, Luc Van Bogaert wrote:
>
>> I'm not sure I understand how to accomplish this. What I have already tried,
>> is message the window with "makeFirstResponder:" passing my view controllers
>> as a parameter. This initially seemed to work fine; until I add an extra
>> view with some textfields to the content pane. Now, it appears that my
>> validation method does not get called anymore, leading me to the conclusion
>> that somehow my view controllers are no longer part of the responder chain.
>>
>> I used NSLog to find out the kind of object that is my window's "first
>> responder" and "next responder"; but the last method returns nil, which I
>> don't understand.
>
> I think there's still a small confusion here. For each window, there's a tree
> structure of NSResponder objects with the window at the root and the views as
> intermediate and leaf nodes. The nodes of this tree are linked
> (uni-directionally) by the "nextResponder" property.
>
Thanks for your help with this. It's very much appreciated.
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.
_______________________________________________
Cocoa-dev mailing list ([email protected])
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]