< Previous PageNext Page > Hide TOC

About Secure Text Fields

A secure text field is a type of text field that hides its text from display or other access via the user interface. It’s suitable for use as a password-entry object, or for any item in which a secure value must be kept. Your code can get the text field’s string value using the standard stringValue method, but users can’t see it or access it. It overrides many aspects of text editing to prevent passing of the object’s value out by mechanisms available to the user (namely, through Cut, Copy, and Paste commands, and the Services facility). This object also overrides the text system’s drawing routine to draw no text at all.

A secure text field is implemented by two classes:

Every method in NSSecureTextFieldCell has a cover in NSSecureTextField. (A cover is a method of the same name that calls the original method.)



< Previous PageNext Page > Hide TOC


© 1997, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-02-09)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.