Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First Responder (was "Re: Enable the Copy Menu")



Hi,
thank you, I have 3 objects in my window. A NSTextFiels, a NSTableView, and
a subclass of NSView I create programmatically.

I tried to do what you suggested with the NSTableView

[aTextField setNextKeyView:aTableView];

but it didn't work. Also, earlier, in Interface Builder, I tried to make a
"nextKeyView" connection between aTextField and myTableView. But it didn't
work as well.

Please note, even without this call, if I click on a row of aTableView, then
I press the TAB key, the selection goes to aTextField. Fine. But if now I
press again the TAB key, the selection doesn't go to aTableView.

I tried more to add this to MYTableView subclass, unsuccessfully.
- (BOOL)acceptsFirstResponder { return YES; }

Any idea?


Best Regards
--
Lorenzo
email: email@hidden


>> Now, since there is a NSTextField in my Window too, I would like to
>> select
>> my object typing the TAB key. So any time I type the TAB key, the
>> selection
>> switches from the NSTextField to myObject, then to the NSTextField
>> again.
>> Do you know ho to get this work?
>>
> Try NSView's
>
> setNextKeyView:
>
> - (void)setNextKeyView:(NSView *)aView
>
> Inserts aView after the receiver in the key view loop of the receiver's
> NSWindow.
>
> -Neil
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: First Responder (was "Re: Enable the Copy Menu") (From: Neil Earnshaw <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.