• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
When do bound UI items set their data source?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: When do bound UI items set their data source?
      • From: Pontus Ilbring <email@hidden>
  • Prev by Date: disabling right-mouse click and ctrl+click?
  • Next by Date: NSSlider and mouse events
  • Previous by thread: disabling right-mouse click and ctrl+click?
  • Next by thread: Re: When do bound UI items set their data source?
  • Index(es):
    • Date
    • Thread