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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to