• 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
Binding to selection of NSArrayController manually
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Binding to selection of NSArrayController manually


  • Subject: Binding to selection of NSArrayController manually
  • From: Ivy Feraco <email@hidden>
  • Date: Fri, 13 Mar 2009 11:42:24 -0400

Hello everybody

Bindings problem:

I have an NSArrayController subclass and an NSPopUpButton subclass.
I am trying to bind the NSPopUpButton's selected object to the selection of my array controller.
I have to do this manually for reasons I won't get into here.


But when I do this (self is myPopUpButton)
[self bind:@"selectedObject" toObject:ArrayController withKeyPath:@"selection" options:nil];


I get the error that my array controller is not KVC for the key path selection.
"selection" is definitely a controller key option in Interface Builder, is it possible that this doesn't work programmatically?
Has anyone else run into this problem???


I want to bind to the selected object, not the index... so it seems my only option here is selectedObjects, which I will have to pass an array of one object to.

Ivy Feraco
UI Developer
email@hidden

_______________________________________________

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: Binding to selection of NSArrayController manually
      • From: Keary Suska <email@hidden>
  • Prev by Date: NSButton manual drawing
  • Next by Date: Re: Performance problem with GC enabled
  • Previous by thread: NSButton manual drawing
  • Next by thread: Re: Binding to selection of NSArrayController manually
  • Index(es):
    • Date
    • Thread