• 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: Programatically selecting items in a NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Programatically selecting items in a NSTableView
      • From: Damien Cooke <email@hidden>
References: 
 >Programatically selecting items in a NSTableView (From: Damien Cooke <email@hidden>)

  • Prev by Date: Custom Progress Indicator
  • Next by Date: RTFD -> HTML ( NSHTMLTextDocumentType )
  • Previous by thread: Programatically selecting items in a NSTableView
  • Next by thread: Re: Programatically selecting items in a NSTableView
  • Index(es):
    • Date
    • Thread