Hello,
I’m using several combo boxes in my app. One of them behaves differently, but I don’t know why.
I made my app the delegate of this combo, bind a property list of value as “content value”, and another property, gFormNumber, as “value”. Then I test a new entry in two way, depending of the notification:
If the user types a value, all is updated immediately and correctly:
on controlTextDidChange_(aNotification)
if aNotification's object is gFormNumberCtrl then
log gFormNumber
end if
end
logs the typing character by character and updates the value. Fine. But if the user chooses a value by the pop menu:
on comboBoxSelectionDidChange_(aNotification)
log gFormNumber
end
does log the previous value of gFormNumber, even if the text box shows the newly chosen value.
I have forgotten something, but what? I look again and again, comparing with other (working) combo boxes, and can’t find what.
I’m beginning to test everything. has the AS {list} that I bind to the “Control value” to be completed by a nil, i.e. {“10”, "15, “20”, “30”, missing value}?
I think the problem is that when you select from the list it populates the text field part of the combo box, but it’s still highlighted – that is, it hasn’t given up first responder status yet. If you pick from the list and then push tab or return, then the right value shows up. It doesn’t seem like the best way for the control to operate, but it is what it is.