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:
NSSecureTextFieldCell, a subclass of NSTextFieldCell and the cell which does most of the work
NSSecureTextField, a subclass of NSTextField and the control that contains that cell
Every method in NSSecureTextFieldCell has a cover in NSSecureTextField. (A cover is a method of the same name that calls the original method.)
© 1997, 2004 Apple Computer, Inc. All Rights Reserved. (Last updated: 2004-02-09)