Hi,
I understand this, but my main concern is : how do i return an item of
type Id from my own class model ? Should the class inherit from
NSObject ? Because this is not what i want...
Br,
Mario
On 14 Jan 2009, at 09:45, Laurent Etiemble wrote:
Hello,
NSOutlineView is almost the same as NSTableView. Wire the
NSOutlineView to an instance that acts as a datasource and a delegate,
and then responds to message to populate the NSOutlineView.
See:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSOutlineView_Class/Reference/Reference.html
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSOutlineViewDataSource_Protocol/Reference/Reference.html#/
/apple_ref/occ/cat/NSOutlineViewDataSource
As noted in the documentation, the view does not store any data, so
the view asks for data as needed. Your model should typically include
some sort of unique key that is used to identify the data row (you can
use a static int counter). When the NSOutlineView needs to display
something, it will ask for the data by passing the column identifier
and the unique key.
You can also take a look at the Cocoa samples in the SDK. There is a
sample about NSOutlineView.
Regards, Laurent Etiemble.
2009/1/12 Mario De Clippeleir <[email protected]>:
Hi,
Does anybody have experience with NSOutlineView ? Any examples out
there ?
Br,
Mario