- (void)bind:(NSString *)binding toObject:(id)observableController withKeyPath:(NSString) help
Hello,I need to bind an NSArrayController named "Frases Controller", with controller key "selection" and model Key Path "TextoFrase". I know how to do it through interface builder, but since I need to bind it to a custom view's NSmutableString, I need to do by code. I'm not sure if this is the right method because I'm having trouble implementing it.Any help?thanksAndres
There's a sample application "BindingsJoystick" which appears to do what you want. The example is different because he's binding a float value in an NSView. However I don't see anything very different.
http://developer.apple.com/mac/library/samplecode/BindingsJoystick
I'll confess that I've tried to cut'n'paste that code into one of my tutorials (QuartzClock) and been surprised at the complexity. As you say, it's painless in Interface Builder.
May I ask you to go and look at "BindingsJoystick" and see if that helps you. If you're still stuck after that, I'll have another look after work tomorrow evening and maybe I'll be able to post an example for you.
I'll check the exmple you say... and let you know.... thanks!
Thanks, it worked perfectly!!!