Manually updating a data bound value of a bound text field

2009-06-18 Thread Ramakrishna Vavilala
I have a window (displayed as a sheet) with a text field and some other controls. I can not set the binding mode to continuous so I use non continuous binding. Everything works fine as long as I press tab and switch to a different control. However when the the text field is the key view and I press

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Ken Thomases
On Jun 18, 2009, at 9:49 AM, Ramakrishna Vavilala wrote: I have a window (displayed as a sheet) with a text field and some other controls. I can not set the binding mode to continuous so I use non continuous binding. Everything works fine as long as I press tab and switch to a different control.

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Ramakrishna Vavilala
Unfortunately, I used incorrect design by binding text field to properties of the file's owner (which happens to be a NWindowController) which does not respond to commitEditing message. Any other ideas? On Thu, Jun 18, 2009 at 8:21 AM, Ken Thomases wrote: > On Jun 18, 2009, at 9:49 AM, Ramakrishna

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Clark S. Cox III
Then change that and do the right thing. :) Just add an intermediate NSObjectController to your nib in between your bound field and the file's owner. Sent from my iPhone On Jun 18, 2009, at 9:17, Ramakrishna Vavilala wrote: Unfortunately, I used incorrect design by binding text field t

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Ken Thomases
On Jun 18, 2009, at 11:17 AM, Ramakrishna Vavilala wrote: Unfortunately, I used incorrect design by binding text field to properties of the file's owner (which happens to be a NWindowController) which does not respond to commitEditing message. Any other ideas? Fix the design? It should be rel

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Ramakrishna Vavilala
That works well. I eventually implemented - (void)objectDidBeginEditing:(id)editor and - (void)objectDidEndEditing:(id)editor It works like a charm. I agree that the better design would be to use an object controller. But I was also trying to understand how the whole binding thing works so it i

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Matt Neuburg
On Thu, 18 Jun 2009 07:49:15 -0700, Ramakrishna Vavilala said: >I have a window (displayed as a sheet) with a text field and some >other controls. I can not set the binding mode to continuous so I use >non continuous binding. Everything works fine as long as I press tab >and switch to a different