• 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: Source list using bindings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Source list using bindings?


  • Subject: Re: Source list using bindings?
  • From: "Hamish Allan" <email@hidden>
  • Date: Wed, 26 Mar 2008 00:45:44 +0000

Hi Jon,

On Tue, Mar 25, 2008 at 9:49 PM, Jonathan Dann <email@hidden> wrote:

> As of 10.5 it's the Apple-sanctioned way to go!  I've used it for ages
>  now, no problems at all.  The tree node is a proxy for whatever 'real'
>  item you add to the tree.

I just wondered why it was NSTreeControllerTreeNode rather than
NSTreeNode. I'm just naturally wary of solutions beginning "class-dump
shows..."!

>  You can also get the selectedNodes, which returns treeNode objects, or
>  the selectedObjects, which returns the 'real' obejcts that you've
>  created.

Splendid!

>  My isGroupItem just compares an NSString *nodeName of the represented
>  object to a list of strings I want to have as groups, i.e @"SOURCES",
>  @"PLAYLISTS", etc.

I just treat everything at the top level as a group item:

- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item
{
	return ([outlineView parentForItem:item] == nil);
}

Thank you for your autosaving advice; I did see your code for that on
the list recently, and it will doubtless be very useful.

Best wishes,
Hamish
_______________________________________________

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: Source list using bindings?
      • From: Jonathan Dann <email@hidden>
References: 
 >Source list using bindings? (From: "Hamish Allan" <email@hidden>)
 >Re: Source list using bindings? (From: Rob Keniger <email@hidden>)
 >Re: Source list using bindings? (From: "Hamish Allan" <email@hidden>)
 >Re: Source list using bindings? (From: Jonathan Dann <email@hidden>)

  • Prev by Date: Re: Best practice for overridden initializers in subclasses
  • Next by Date: Re: Appropriate interface element for representing a dropped file
  • Previous by thread: Re: Source list using bindings?
  • Next by thread: Re: Source list using bindings?
  • Index(es):
    • Date
    • Thread