• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stop editing session of NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stop editing session of NSTextField


  • Subject: Re: Stop editing session of NSTextField
  • From: Erik Buck <email@hidden>
  • Date: Wed, 24 Feb 2010 22:37:32 -0500

send [[textField window] makeFirstResponder:[textField window]]; to finish any editing in progress in textField or any other text field within the window.

or see "Forcing the End of Editing" at http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/TextEditing/Tasks/BatchEditing.html

Some people like
if (![myWindow makeFirstResponder: myWindow])
{
[myWindow endEditingFor: nil];
}


FYI: This question has been answered many times in the list archives. :)

On Feb 24, 2010, at 8:05 AM, Nikhil Khandelwal wrote:

> Hi,
>
> How can I end the editing session for NSTextField forcefully. I tried abortEditing however it does not accept the changes made to NSTextField.
> I want the changes made to NSTextField acceptable when I quit the editing session.
> Thanks in advance.
>
> ----
> Nikhil
>
> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
> _______________________________________________
>
> 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

_______________________________________________

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

References: 
 >Stop editing session of NSTextField (From: Nikhil Khandelwal <email@hidden>)

  • Prev by Date: How to call on id
  • Next by Date: Re: How to call on id
  • Previous by thread: Re: Stop editing session of NSTextField
  • Next by thread: Need to duplicate the look & feel of the upper-left traffic-lights on a borderless window app
  • Index(es):
    • Date
    • Thread