Are you using bindings for your user interface?

If you are using bindings, each binding has an option which reads something 
like "Continuously updates value". Enable this option for the text field's 
value binding. This will give you the desired effect.

Kiel
"The best way to cheer yourself up is to try to cheer somebody else up."
Mark Twain


On 06/01/2010, at 9:50 AM, cocoa-dev wrote:

> I have two controls (NSTextField and a NSTableView column) that are bound to 
> the same attribute in core data. I've set up a timer that starts after the 
> NSTextField starts editing and I'd like it to periodically commit the editing 
> as the user is typing. If the user hits the Enter key I do see the text in 
> both places but I want those updates to go as the user is typing so the text 
> will show in both fields as the typing is happening.
> 
> When my timer launches I tried calling:
> 
> [myTextField commitEditing] // but this didn't work, nothing happened.
> 
> I then tried:
> 
> [[myTextField window] endEditingFor:nil] // which worked but the NSTextField 
> loses focus so that's not a good solution.
> 
> Any ideas?_______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/kiel.gillard%40gmail.com
> 
> This email sent to kiel.gill...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to