[Mono-osx] Using NSOutlineView and NSTreeController

Arakun hugo.forss at gmail.com
Wed Aug 10 03:35:38 EDT 2011


Hello,

I have a background mainly in Objective-C and Cocoa (though I'd hesitate to
call myself very experienced) and I'm currently trying to learn C# and
MonoMac. It's been a lot harder than I first anticipated; many of the Cocoa
classes look much less familiar than I thought they would be.

I'm currently stuck at trying to populate an NSOutlineView using an
NSTreeController and Cocoa Bindings. I already have an NSTableView working
as it should but the outline view proves a lot more difficult.

Question 1: What would be the most convenient way to create the tree
structure in MonoMac? Normally I'd create a tree structure from NSTreeNode
objects, however the tree nodes don't look like they're supposed to be
editable. Does that mean I shouldn't use them at all for this purpose?

Question 2: How do I add the tree structure to the NSTreeController? The
Content property is of the type NSTreeController which to me doesn't make
any sense at all. I'd expect something like an NSObject[].

Thanks in advance!

--
View this message in context: http://mono.1490590.n4.nabble.com/Using-NSOutlineView-and-NSTreeController-tp3732257p3732257.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list