• 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: Graham Cox <email@hidden>
  • Date: Thu, 4 Feb 2010 21:56:15 +1100

On 04/02/2010, at 9:47 PM, 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).
>
> [parentObject removeObject:item];
>
>
> Suppose if i have to delete, i have to delete it from all groups, hence i am using same pointer.
>
> Please let me know if there is any solution to return exact parent item.

There isn't an exact parent item, because your data model doesn't have a unique parent item for the row's object, it has two. NSOutlineView relies on your data model giving it its data. The fix to this lies entirely with your data model. Perhaps you need a way to find all parent items of a given object within your data model, instead of relying on NSOutlineView to tell you, since it is expecting a simple tree.

NSOutlineView is a view - you're trying to force it to be more like a controller for your data model. Give it up, it's a bad approach.

--Graham


_______________________________________________

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: Outlineview ParentObject
  • Next by Date: Re: objc_msgSend() tour
  • Previous by thread: RE: Outlineview ParentObject
  • Next by thread: Re: Outlineview ParentObject
  • Index(es):
    • Date
    • Thread