When do bound UI items set their data source?
When do bound UI items set their data source?
- Subject: When do bound UI items set their data source?
- From: Nicko van Someren <email@hidden>
- Date: Thu, 3 Mar 2005 13:33:29 +0000
I'm having a problem with a program I'm writing that uses bindings to
allow the user to edit the model and then uses an action to carry out
processing based on the data in the model. Pretty standard I would
have thought. In the simplest case I have one NSTextField bound,
through and NSObjectController, to my data and one NSButton to fire the
action. The problem is that my model does not seem to get updated when
I need it to be. If I type text into the text field, hit return and
then press the button all is fine but if I type the text in and then
just click on the button, which I assert is the natural thing for the
user to do, then the new text has not made its way to the bound
variable by the time the action is received.
So my questions are what controls when bound data sources get updated
and how can I change the behaviour? I've tried changing the "send
action on" flag for the text field but to no avail; this does change
the action sending behaviour but the data in my model still lags behind
what the user has entered.
Any help would be appreciated.
Nicko
_______________________________________________
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