• 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: Outlineview ParentObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outlineview ParentObject


  • Subject: Re: Outlineview ParentObject
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 4 Feb 2010 09:18:53 -0800


On Feb 4, 2010, at 2:47 AM, Poonam Virupaxi Shigihalli wrote:

parentObject = [outlineview parentObject:item]; //Here it always returns Groups2 even though i want to remove from Group1 one, since cocoa is a duplicate entry(Same memory location).

You can't have the same item in two places in an NSOutlineView.

You're going to need to use separate item objects for the two appearances of 'Cocoa', even though they both refer to the same object in your model. You can do this by making an 'OutlineItem' class that has a single property that points to your model object. Then your data- source methods will wrap each model object in an OutlineItem before returning it to NSOutlineView.

—Jens_______________________________________________

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: 
 >RE: Outlineview ParentObject (From: "Poonam Virupaxi Shigihalli" <email@hidden>)

  • Prev by Date: Re: NSFullUserName() always returns the user name at app launch?
  • Next by Date: Re: NSFullUserName() always returns the user name at app launch?
  • Previous by thread: Re: Outlineview ParentObject
  • Next by thread: Yong Li has invited you to Dropbox
  • Index(es):
    • Date
    • Thread