Hi

I have a document application with multiple window controllers. The document contains an array of objects (custom classes no Core Data here), called "entities" (NSMutableArray*) In one of the window,I would like to have an NSOutlineView (one column for now) with a binding for its content to the array.

So I went through docs and made the following
- create a NSTreeController in the nib files
- establish a binding between the NSOutlineview column value and the the NSTreeController arrangedObjects (wih model key path to the an accessor of the custom object) - establish a binding betwen the NSTreeController contentaArray and "document.entities" (on File's Owner which is the window controller)

I then try to add an entity through the NSTreeController addObject method, and ...nothing happens, except a message in the console that says "Cocoa Bindings: Cannot create NSArray from object NSCFString of class NSCFString". The outline view stays empty

If I add the object manually to the "entities" NSArray and then reassign the content of the NSTreeController to this array everything is fine and displays in the outline view

Besides doing simple examples this is the first time I deal with collection binding and here I get lost to where I should look for a problem. How can I debug this (and understand what I made wrong and why this was wrong)?

Thanks

laurent

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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