• 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
Removing an item from a NSTreeController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Removing an item from a NSTreeController
      • From: Felix Franz <email@hidden>
  • Prev by Date: Re: Two NSRects adjacent/touching?
  • Next by Date: Re: Cocoa and dead-code stripping
  • Previous by thread: Re: Two NSRects adjacent/touching?
  • Next by thread: Re: Removing an item from a NSTreeController
  • Index(es):
    • Date
    • Thread