Removing an item from a NSTreeController
Removing an item from a NSTreeController
- Subject: Removing an item from a NSTreeController
- From: Ron Aldrich <email@hidden>
- Date: Mon, 2 Jul 2007 20:09:52 -0700
Folks,
I'm struggling with a problem that I hope someone can shed some light
on.
I have a tree controller (DeviceTreeController) which maintains a set
of objects (Device). Device objects come and go at the whim of the
IORegistry.
When a device disappears from the IORegistry, I need to remove it
from the tree, but NSTreeController does not implement - (void)
removeObject: (id) object.
What NSTreeController *does* provide is -(void)
removeObjectAtArrangedObjectIndexPath: (NSIndexPath*) indexPath.
So, my problem is, how do I determine what the index path of a given
object is, so that I can remove it from the controller?
i.e.
@implementation ServiceTreeController
- (void) removeChild: (Service*) inService
{
// ???????????
}
@end
Thanks,
Ron Aldrich
Software Architects, Inc.
_______________________________________________
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