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")



I've found that the table view doesn't show that it is the key view until you press a key. Tab from the text field to the table, then press the down arrow.

-Neil


On Tuesday, September 2, 2003, at 11:28 AM, Lorenzo wrote:

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


Neil Earnshaw
Consultant Software Engineer
Object Software Engineers Ltd
email@hidden
Tel : 01747 854 852
Mbl : 07870 209 102
_______________________________________________
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: Lorenzo <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.