• 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
Temporarily Editable NSTextField
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Temporarily Editable NSTextField


  • Subject: Temporarily Editable NSTextField
  • From: Graham <email@hidden>
  • Date: Mon, 2 May 2005 12:29:43 -0400

Hi,

I am creating an NSTextField subclass that is not editable until clicked upon and I wish it to return to being non-editable when the user presses enter (to accept their edit) or Escape (to cancel their edit).

I've successfully achieved this except for canceling the edit when ESC key is pressed.

In the textDidEndEditing method I do: setEditable(false), setDrawsBackground(false) and setBezeled(false), and in the context of this method, those calls all work fine, but that method is only called when enter is pressed. So to handle the ESC key I am listening for keyUp events and when ESC key is pressed I call those same three methods, but in this context they have no effect.

Any pointers would be appreciated.

Thanks

Graham

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: (freely) Rotating Text
  • Next by Date: Spotlight Importer / NSMetadataQuery question...
  • Previous by thread: Re: [OT] Submitting app listing to Apple's product site
  • Next by thread: Re: Temporarily Editable NSTextField
  • Index(es):
    • Date
    • Thread