• 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: Object -> NSTreeNode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object -> NSTreeNode?


  • Subject: Re: Object -> NSTreeNode?
  • From: Charles Srstka <email@hidden>
  • Date: Wed, 18 Feb 2009 21:24:23 -0600

On Feb 18, 2009, at 10:59 AM, Tomas Franzén wrote:

Hi,

I'm transitioning my app from using a NSOutlineView data source to NSTreeController.
I want to start editing a row programmatically, so I need to call editColumn:row:withEvent:select:, but then I need the row index. I can get that with rowForItem:, but as far as the NSOutlineView is concerned, it deals with NSTreeNodes. So I need a way to get the NSTreeNode for a given object.


+ treeNodeWithRepresentedObject: doesn't help since it creates a new node.

This seems like something that should be easy, but I can't figure it out.

AFAIK, there's no way to do this other than employing somewhat ugly and inefficient hacks such as iterating through the entire tree structure looking for the node whose represented object is the object you're looking for.


In my opinion, NSTreeController is still limited enough that it raises some questions about whether it really should be used.

Charles_______________________________________________

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


References: 
 >Object -> NSTreeNode? (From: Tomas Franzén <email@hidden>)

  • Prev by Date: Re: Drop Down Toolbar Button
  • Next by Date: Re: Large layers in Core Animation
  • Previous by thread: Object -> NSTreeNode?
  • Next by thread: DeleteKey problem
  • Index(es):
    • Date
    • Thread