Lefora Free Forum
login join
Loading
466 views

- (void)bind:(NSString *)binding toObject:(id)observableController withKeyPath:(NSString) help

Page 1
1–5
novice - member
13 posts

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

?
288 posts


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. 


__________________
novice - member
13 posts

I'll check the exmple you say... and let you know.... thanks!

novice - member
13 posts

Thanks, it worked perfectly!!!

?
288 posts

Ah, that's great. Thanks for letting me know.

__________________
Page 1
1–5

Locked Topic


You must be a member to post in this forum

Join Now!