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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to