Re: Programatically selecting items in a NSTableView
Re: Programatically selecting items in a NSTableView
- Subject: Re: Programatically selecting items in a NSTableView
- From: Nick Zitzmann <email@hidden>
- Date: Sun, 15 Feb 2009 19:48:06 -0700
On Feb 15, 2009, at 2:27 PM, Damien Cooke wrote:
This does not work and I was wondering if
1: can I programatically select an item in a NSTableView?
Well, what you're doing is technically correct, although I'd recommend
using NSUInteger instead of unsigned, but that's not the problem...
2: have I done something stupid?
3: This is part of the init of the NSPanel subclass should it be
somewhere else (awakeFromNib does not work either).
Yes. What you are trying to do breaks MVC separation. If you need to
pass select messages to a table view, then you should do that from an
NSWindowController subclass, not an NSPanel subclass.
In addition, IBOutlets aren't available at initialization time; they
are only available once the nib has been loaded and instantiated.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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