A question about binding and use
A question about binding and use
- Subject: A question about binding and use
- From: Jason Beauvais <email@hidden>
- Date: Mon, 7 Mar 2005 09:41:44 -0500
Hello,
I'm new to Obj-C and was familiarizing myself with the use of Cocoa
bindings. I have successfully been able to set up user defaults in a
preference panel and then in turn reference those persistent
preferences in the main NSDocument window. I'm now taking it a bit
further and instead of creating my own controller class to manage
IBAction events use cocoa bindings. Besides learning about Cocoa
bindings, the problem I'm having is that since the binding replaces the
controller, in essence, it also removes the action method. I was using
the Cocoa Bindings example found at,
http://www.cocoadevcentral.com/articles/000080.php, as an example of
how to use Cocoa Bindings but to me it falls short of explaining how to
truly do something that is useful.
How would you add customization of an action when you are trying to
take advantage of the Cocoa bindings. For example I'm writing an
enterprise application which accesses a MySQL database. When a button
is selected, i.e. IBAction, I will need to make MySQL accesses to the
database to pull data and then present it in textfields, etc. Maybe
the answer is you can't use binding when you need to do something as
specific as this. I noticed that in under the bindings tab in IB that
for the selected Button there is a "target" field is this the place
where one could add a selector method which in turn would be where I
place my MySQL code to make my queries? Can some one fill me in on how
to use this in the general case on the the example I have presented
above? Any other examples on Bindings I should be referencing?
Thanks in advance...
Jay
_______________________________________________
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