Re: Astoundingly dumb bindings question
Re: Astoundingly dumb bindings question
- Subject: Re: Astoundingly dumb bindings question
- From: Keary Suska <email@hidden>
- Date: Sun, 01 Jul 2007 12:38:07 -0600
- Thread-topic: Astoundingly dumb bindings question
on 6/30/07 5:58 PM, email@hidden purportedly said:
> OK, I have looked at the docs, the archives, google, etc. I seem to
> be having no luck doing something that should be crazy easy. I want
> to have an NSPopUpButton, which is bound to an array of NSNumbers. I
> have an action, which wants to grab the number from the selection of
> the popup, and do something with it, displaying the results of the
> calculation in a textfield.
>
> I could do this programmatically, but I was thinking some of this
> might be easier and quicker with bindings.
Not necessarily. And in your case specifically, not likely. Anyway, it's
really a matter of understanding what bindings are about. Bindings are
solely a means to synchronize data between (primarily) view objects and
model objects. Nothing more.
So, you will see you are missing up to two elements: the model object that
contains the number to be calculated (which the popup binds to via
selectedObject), and possibly the object that contains the calculated value.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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