• 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: NSTreeNode/representedObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTreeNode/representedObject


  • Subject: Re: NSTreeNode/representedObject
  • From: David Riggle <email@hidden>
  • Date: Fri, 9 Nov 2007 13:44:01 -0800

Never mind, I figured it out: item is now a subclass of NSTreeNode. Here's the new code.

- (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem: (id)item
{
id myObject = LEOPARD_OR_LATER ? [item representedObject] : [item observedObject];
[myObject setExpanded:NO];
return YES;
}


On Nov 9, 2007, at 10:03 AM, David Riggle wrote:

Can somebody explain how we're supposed to use the new NSTreeNode/ representedObject to replace the NSOutlineView observedObject hack that was so darned convenient? The following code

- (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem: (id)item
{
id myObject = [item observedObject];
[myObject setExpanded:NO];
return YES;
}


now produces an error message on the console:

WARNING: Using deprecated NSTreeController internal API. Break on 'observedObject' to debug. Use of this method should be replaced by NSTreeNode/representedObject


_______________________________________________

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


  • Prev by Date: Re: Smart way to get "etched" borders in Leopard
  • Next by Date: Re: SenTestingKit fails when using CG-Only
  • Previous by thread: Re: Leopard: fileExtensionsFromType: deprecation breaks saving with extension
  • Next by thread: NSString subStringToIndex gives EXC_BAD_ACCESS
  • Index(es):
    • Date
    • Thread