Re: How to eliminate field editor from NSTextField?
Re: How to eliminate field editor from NSTextField?
- Subject: Re: How to eliminate field editor from NSTextField?
- From: Tron Thomas <email@hidden>
- Date: Tue, 23 Mar 2010 16:52:41 -0700
I tried that, and it did not work. The field editor remains sitting on top of the NSTextField.
On Mar 23, 2010, at 16:39 o'clock, Kyle Sluder wrote:
> On Tue, Mar 23, 2010 at 4:17 PM, Tron Thomas <email@hidden> wrote:
>> However, this desired behavior after the edit has completed is not achieved because, when editing of the control begins, a field editor is assigned to the control and the editing takes place in that field editor. Once editing is complete, the field editor remains sitting on top of the control and any right clicks from the mouse are now set to the field editor which displays its own context menu for editing text rather than the context menu for the NSTextField.
>
> That's because you never end editing.
>
>> Methods related to changing the first responder for the window are ineffective because they do not change the location of the field editor.
>
> You end editing by sending the window -makeFirstResponder: with itself
> as an argument. For example: [theWindow setFirstResponder:theWindow].
> This might fail if the field editor's value is invalid (for example,
> you have bound the text field to a key-value validated property, or
> you have attached a formatter to the field).
>
> --Kyle Sluder
_______________________________________________
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