• 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
Re: Binding directly to instance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding directly to instance


  • Subject: Re: Binding directly to instance
  • From: Jeff LaMarche <email@hidden>
  • Date: Tue, 3 Jan 2006 14:03:19 -0500


On Jan 3, 2006, at 1:57 PM, Matt Neuburg wrote:
How about if you just type "self" as the model key path in the
doubleClickTarget binding?

Tried that. Also tried creating an "accessor" that returns self. It crashes in both instances. I was able to work around this by using other bindings (selectedIndex in this case), but it's annoying :(


Namely, the NSArrayController's arrangedObjects? m.

Nope, also tried that and it didn't work. While you do bind the contentValues or contentObjects to arrangedObjects, you're supposed to bind content to an array controller. arrangedObjects returns an array, not an array controller. Again, I was able to work around this by doing it old school by setting the target and doubleAction of the table in awakeFromNib:, but it's annoying that there's no way to get around the model key path or controller key being required; there are times when you have a valid reason to bind directly to an instance without need to specify a key. Instances are objects, just like those things returned by using getValueForKey:




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Binding directly to instance (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Binding directly to instance
  • Next by Date: Re: Problem with linking against a private framework
  • Previous by thread: Re: Binding directly to instance
  • Next by thread: Re: Binding directly to instance
  • Index(es):
    • Date
    • Thread