Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

satyam90

macrumors regular
Original poster
Jul 30, 2007
242
0
Bangalore, India
I am using Cocoa with Obj C. I am working on XCode 2.4.1
I am having a NSArrayController object which holds a class Collections. Collections class is having different member variables and associated methods. "Type" is one variable in that
Now I am using this NSArrayController object and binding it to NSTableView to populate necessary data in it.
Now I want to change this to NSTableView to NSOutlineView so that I can have tree structure inside it. By using "Type" in my class object, can I bind (or some other method) to populate my NSOutlineView and show the classified data depending on "Type"
For eg:
Fruits
Apple
Banana
Flowers
Rose
Lilly
Birds
Pegion
Crow
.
.
.
Here Fruits, Flowers, Birds etc are "Types" in my Collections.
Is it possible?
 
I am using Cocoa with Obj C. I am working on XCode 2.4.1
I am having a NSArrayController object which holds a class Collections. Collections class is having different member variables and associated methods. "Type" is one variable in that
Now I am using this NSArrayController object and binding it to NSTableView to populate necessary data in it.
Now I want to change this to NSTableView to NSOutlineView so that I can have tree structure inside it. By using "Type" in my class object, can I bind (or some other method) to populate my NSOutlineView and show the classified data depending on "Type"
For eg:
Fruits
Apple
Banana
Flowers
Rose
Lilly
Birds
Pegion
Crow
.
.
.
Here Fruits, Flowers, Birds etc are "Types" in my Collections.
Is it possible?

I don't think that is possible with bindings. If you want to do it without you have to use the NSOutlineViews delegate methods.

http://developer.apple.com/document.../NSOutlineView_Class/Reference/Reference.html


I think their is a NSOutlineView Example which gets installed along side Xcode.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.