Re: Immediate sending of changes to text fields
Re: Immediate sending of changes to text fields
- Subject: Re: Immediate sending of changes to text fields
- From: Kai Brüning <email@hidden>
- Date: Thu, 6 Dec 2007 12:22:05 +0100
>Le 6 déc. 07 à 11:09, Kai Brüning a écrit :
>
>>I am having both a normal NSTextField and a NSTokenField, for which I need to process changes immediately after the user made a change. Both fields are connected to their controller via the value binding.
>>
>>I tried to call -[NSController commitEditing] when receiving a NSControlTextDidChangeNotification. This does update the value, but also resigns the first responder state of the field in question, which is not wanted.
>>
>>By searching this list I found a hint that -[NSControll validateEditing] might help, but it does not, at least for me.
>>
>>Of course I can use -[NSControl objectValue] inside NSControlTextDidChangeNotification, but this is not really how bindings should work in my opinion.
>>
>>This must be not so seldom a request, mustn't it?
>>
>>Thanks,
>>Kai
>
>In Interace Builder, in your binding settings, check the box: "Continuously Updates Value"
>
>Jean-Daniel Dupas
Thanks a lot, so easy. I was just too focused on the NSTextField Attributes settings...
Kai
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden