• 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: OutlineView, bindings and array of NSDictionaries.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OutlineView, bindings and array of NSDictionaries.


  • Subject: Re: OutlineView, bindings and array of NSDictionaries.
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 17 Nov 2008 15:45:44 -0800

On Nov 17, 2008, at 13:51, Sandro Noel wrote:

I cant seem to get my data to display properly in the Outline View, and i am sure it is because of the organisation of my data

See here:

	http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTreeController_Class/Reference/Reference.html

(the overview), and here:

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/CntrlContent.html#/ /apple_ref/doc/uid/TP40002147-185041

You're basically going to need an additional set of objects that represent the servers, each of which has an array of volumes. The trick is making sure that they all properly respond to the "children", "countOfChildren" and "isLeaf" property names that you specify to the tree controller.

In the simplest case, you just just need a "children" property:

Dictionary 0
	serverName = Server1
	VolumeName = @""
	children = {Dictionary 1, Dictionary 2, Dictionary 3}

Dictionary 1
	serverName = Server1
	VolumeName = Volume1
	children = {}

Dictionary 2
	serverName = Server1
	VolumeName = Volume2
	children = {}

Dictionary 3
	serverName = Server1
	VolumeName = Volume3
	children = {}

and then bind either the server dictionary as the content object for the tree controller or (if there are multiple servers) an array of server dictionaries as the content array.


_______________________________________________

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: OutlineView, bindings and array of NSDictionaries.
      • From: Sandro Noel <email@hidden>
References: 
 >OutlineView, bindings and array of NSDictionaries. (From: Sandro Noel <email@hidden>)

  • Prev by Date: Re: NSDateFormatter strangeness
  • Next by Date: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)
  • Previous by thread: OutlineView, bindings and array of NSDictionaries.
  • Next by thread: Re: OutlineView, bindings and array of NSDictionaries.
  • Index(es):
    • Date
    • Thread