Skip navigation.
 
mlRe: NSTextField value binding and button click
FROM : Quincey Morris
DATE : Tue Jan 29 19:39:53 2008

On Jan 29, 2008, at 02:56, Lieven Dekeyser wrote:

> Unfortunately, it doesn't seem to be working as advertised. When I 
> use an NSObjectController, I still have to call -commitEditing on it 
> when the button is clicked, otherwise my model is not updated... I'd 
> expect NSTextField to lose focus and commit automatically when the 
> user clicks a button, but the field doesn't seem to lose focus...


It occurs to me you'd probably need to connect the button to the 
NSObjectController too (i.e. set its target/action through bindings), 
if you haven't tried that already.

Clicking a button is not in general going to automatically end editing 
in a text field, because you need to be able to have buttons like 
"Bold" or "Clear" that affect the text field's contents during editing.

Related mailsAuthorDate
mlNSTextField value binding and button click Lieven Dekeyser Jan 28, 22:11
mlRe: NSTextField value binding and button click Kyle Sluder Jan 28, 22:45
mlRe: NSTextField value binding and button click Quincey Morris Jan 28, 23:35
mlRe: NSTextField value binding and button click Lieven Dekeyser Jan 29, 11:56
mlRe: NSTextField value binding and button click Kyle Sluder Jan 29, 19:36
mlRe: NSTextField value binding and button click Quincey Morris Jan 29, 19:39
mlRe: NSTextField value binding and button click Lieven Dekeyser Jan 30, 16:09