RE: Outlineview ParentObject
RE: Outlineview ParentObject
- Subject: RE: Outlineview ParentObject
- From: "Poonam Virupaxi Shigihalli" <email@hidden>
- Date: Thu, 4 Feb 2010 16:17:28 +0530
- Thread-topic: Outlineview ParentObject
Dear All,
NSOutlineView displays as follows:
Group1
---Cocoa
---Mac
Group2
----Cocoa
----Macbook
Cocoa is a duplicate entry present in two groups also.
I have rightmousedown action for outlineview. when the user right clicks on any of the group items. i has the following operations:
Add into group.
Remove from group and soon.
Suppose i have to delete the string "COCOA" when user selects remove option from rightmousedown event>
I use the following piece of code to access the item:
row = [outlineview rowAtPoint:eventPoint];
item = [outlineview itemAtRow:row];
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.
Regards,
Poonam.
_______________________________________________
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