Skip navigation.
 
mlNSTextField binding problem
FROM : Sean Todd
DATE : Mon Nov 22 19:54:44 2004

I have run across a problem where a particular text field (with number 
formatter) 'looses' any change at the end of editing (cursor moved to 
another field). Any ideas on what might be wrong or what to try next 
would be appreciated.

Details:

I have an inspector window containing a table view with 2 
columns—'assignment' and 'grade' (master view) and 2 text fields 
(detail view) that show the data of the item selected in the table. 
These are bound to an NSArrayController. The contentArray of the 
controller is bound to 'Shared Application' via the path: 
mainWindow.windowController.document.studentController.selection.assignm
ents. The problem is that when the grade is changed in the text field, 
the grade displayed in the field reverts to the old entry even though 
the new grade shows up in the table view. This is a one-way problem. 
Any grade change in the table view shows up correctly in the text field 
as do any changes made via undos. Moreover, no other text fields, 
including the 'assignment' text field, show this behavior. The bindings 
of both fields are setup the same way.

One other bit of wierdness, the method -controlTextDidEndEditing: does 
not get called in the delegate when this happens.

Using Xcode 1.5.

What I've tried:

nibtool didn't show any problems
I went so far as to create a new inspector nib but the problem remained
I tried reproducing the problem in a simplified project but could not.

Thanks,

Sean

Related mailsAuthorDate
No related mails found.