• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Finding my way through binding
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Finding my way through binding


  • Subject: Finding my way through binding
  • From: Laurent Cerveau <email@hidden>
  • Date: Thu, 15 May 2008 15:54:00 +0200

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Finding my way through binding
      • From: "Hamish Allan" <email@hidden>
  • Prev by Date: Re: Basic info about outlets
  • Next by Date: Re: Basic info about outlets
  • Previous by thread: Re: iPhone SDK List?
  • Next by thread: Re: Finding my way through binding
  • Index(es):
    • Date
    • Thread