This is NSText.rtf in view mode; [Download] [Up]
paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc. All Rights Reserved. s4 li100 fi0 ri1007 ql f0 b fs36 fs100 fs36 NSText pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSView : NSResponder : NSObject fs20 fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSChangeSpelling, NSIgnoreMisspelledWords fi0 NSCoding (NSResponder) fi0 NSObject (NSObject) fs20 fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSTextView.h fs20 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 fs28 Class Description fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 The NSText class declares the programmatic interface to objects that manage text. NSText objects are used by the Application Kit wherever text appears in interface objects: An NSText object draws the title of a window, the commands in a menu, the title of a button, and the items in a browser. Your application inherits these uses of the NSText class when it incorporates any of these objects into its interface. Your application can also create NSText objects for its own purposes. fs16 fs28 The NSText class is unlike most other classes in the Application Kit in its complexity and range of features. One of its design goals is to provide a comprehensive set of text-handling features so that you'27ll rarely need to create a subclass. An NSText object can (among other things): fs16 fs28 pard s3 li1231 fi-376 ri1007 ql tx1231 tx2872 tx3250 'b7tab Control the color of its text and background. fs16 fs28 'b7tab Control the font and layout characteristics of its text. fs16 fs28 'b7tab Control whether text is editable. fs16 fs28 'b7tab Wrap text on a word or character basis. fs16 fs28 'b7tab Display graphic images within its text. fs16 fs28 'b7tab Write text to or read text from files in the form of RTFD'd0Rich Text Format files that contain TIFF or EPS images. fs16 fs28 'b7tab Let another object, the delegate, dynamically control its properties. fs16 fs28 'b7tab Let the user copy and paste text within and between applications. fs16 fs28 'b7tab Let the user copy and paste font and format information between NSText objects. fs16 fs28 'b7tab Let the user check the spelling of words in its text. fs16 fs28 'b7tab Let the user control the format of paragraphs by manipulating a ruler. fs16 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 Graphical user-interface building tools (such as Interface Builder) may give you access to NSText objects in several different configurations, such as those found in the NSTextField, NSForm, and NSScrollView objects. These classes configure an NSText object for their own specific purposes. Additionally, all NSTextFields, NSForms, NSButtons within the same window'd0in short, all objects that access an NSText object through associated Cells'd0share the same NSText object, reducing the memory demands of an application. Thus, it'27s generally best to use one of these classes whenever it meets your needs, rather than create NSText objects yourself. If one of these classes doesn'27t provide enough flexibility for your purposes, you can create NSText objects programatically. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Plain and Rich NSText Objects fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 When you create an NSText object directly, by default it allows only one font, line height, text color, and paragraph format for the entire text. Once an NSText object is created, you can alter its global settings using methods such as b setFont:b0 and b setTextColor:b0 . For convenience, such an NSText object will be called a i plaini0 NSText object. fs16 fs28 To allow multiple values for attributes such as font and color, you must send the NSText object a b setRichText:YESb0 message. An NSText object that allows multiple fonts also allows multiple paragraph formats, line heights, and so on. For convenience, such an NSText object will be called a i richi0 NSText object. fs16 fs28 A rich NSText object can use RTF (Rich Text Format) as an interchange format. Not all RTF control words are supported: On input, an NSText object ignores any control word it doesn'27t recognize; some of those it can read and interpret it doesn'27t write out. These are the RTF control words that an NSText object recognizes. fs16 fs28 pard s20 li854 fi0 ri1007 ql f0 b fs24 tx3124 tx5140 Control Wordtab Readtab Write fs6 fs24 s19 f1 b0 fs28 \ansitab yestab yes fs6 fs28 \btab yestab yes fs6 fs28 \cbtab yestab yes fs6 fs28 \cftab yestab yes fs6 fs28 \colortbltab yestab yes fs6 fs28 \dnntab yestab yes fs6 fs28 \fintab yestab yes fs6 fs28 \fntab yestab yes fs6 fs28 \fonttbltab yestab yes fs6 fs28 \fsntab yestab yes fs6 fs28 \itab yestab yes fs6 fs28 \lintab yestab yes fs6 fs28 \margrntab yestab yes fs6 fs28 \paperwntab yestab yes fs6 fs28 \mactab yestab no fs6 fs28 \marglntab yestab yes fs6 fs28 \partab yestab yes fs6 fs28 \pardtab yestab no fs6 fs28 \pcatab yestab no fs6 fs28 \qctab yestab yes fs6 fs28 \qltab yestab yes fs6 fs28 \qrtab yestab yes fs6 fs28 \sntab yestab no fs6 fs28 \tabtab yestab yes fs6 fs28 \upntab yestab yes fs6 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 fs10 fs28 NSText objects are designed to work closely with various other objects. Some of these'd0such as the delegate or an embedded graphic object'd0require a degree of programming on your part. Others'd0such as the Font panel, spelling checker, or ruler'd0take no effort other than deciding whether the service should be enabled or disabled. The following sections discuss these interrelationships. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Notifying the NSText Object's Delegate fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 Many of an NSText object'27s actions can be controlled through an associated object, the NSText object'27s delegate. If it implements any of the following methods, the delegate receives the corresponding message at the appropriate time: fs16 fs28 pard s2 li1231 fi0 ri1007 ql tx2872 tx3250 tx3642 b textDidBeginEditing: fi0 textDidChange: fi0 textDidEndEditing: fi0 textShouldBeginEditing: fi0 textShouldEndEditing: fs16 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 b0 So, for example, if the delegate implements the b textDidBeginEditing:b0 method, it will receive notification upon the user'27s first attempt to change the text. Moreover, depending on the method'27s return value, the delegate can either allow or prohibit changes to the text. See 'aaMethods Implemented by the Delegate'ba. The delegate can be any object you choose, and one delegate can control multiple NSText objects. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Adding Graphics to the Text fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 A rich NSText object allows graphics to be embedded in the text. Each graphic is treated as a single (possibly large) 'aacharacter'ba: The text'27s line height and character placement are adjusted to accommodate the graphic 'aacharacter.'ba Graphics are embedded in the text in either of two ways: programmatically or directly through user actions. In the programmatic approach, graphic objects are added using the b replaceRange:WithRTFD:b0 method. fs16 fs28 An alternate means of adding an image to the text is for the user to drag an EPS or TIFF file icon directly into an NSText object. The NSText object automatically creates a graphic object to manage the display of the image. This feature requires a rich NSText object that has been configured to receive dragged images'd0see the b setImportsGraphics:b0 method. fs16 fs28 Images that have been imported in this way can be written as RTFD documents. Programmatic creation of RTFD documents is not supported in this version of OpenStep. RTFD documents use a file package, or directory, to store the components of the document (the 'aaD'ba stands for 'aadirectory'ba). The file package has the name of the document plus a 'aa.rtfd'ba extension. The file package always contains a file called TXT.rtf for the text of the document, and one or more TIFF or EPS files for the images. An NSText object can transfer information in an RTFD document to a file and read it from a file'd0see the b writeRTFDToFile:atomically:b0 and b readRTFDFromFile:b0 methods. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Cooperating with Other Objects and Services fs14 fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 fs28 NSText objects are designed to work with the Application Kit'27s font conversion system. By default, an NSText object keeps the Font panel updated with the font of the current selection. It also changes the font of the selection (for a rich NSText object) or of the entire text (for a default NSText object) to reflect the user'27s choices in the Font panel or menu. To disconnect an NSText object from this service, send it a b setUsesFontPanel:NOb0 message. fs16 fs28 If an NSText object is a subview of an NSScrollView, it can cooperate with the NSScrollView to display and update a ruler that displays formatting information. The NSScrollView retiles its subviews to make room for the ruler, and the NSText object updates the ruler with the format information of the paragraph containing the selection. The b toggleRuler:b0 method controls the display of this ruler. Users can modify paragraph formats by manipulating the components of the ruler. fs16 fs28 Coordinates and sizes mentioned in the method descriptions below are in PostScript units'd01/72 of an inch. fs16 fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 fs28 Getting and Setting Contents fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b replaceRange:b0 (NSRange)i rangei0 tab Replaces the characters within the specified i rangei0 of s9 li7030 fi-6553 fi-5796 b withRTF:b0 (NSData *)i rtfDatai0 tab tab text with the RTF data i rtfDatai0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b replaceRange:b0 (NSRange)i rangei0 tab Replaces the characters within the specified i rangei0 of s9 li7030 fi-6553 fi-5796 b withRTFD:b0 (NSData *)i rtfdDatai0 tab tab text with the RTFD data i rtfdDatai0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (NSData *)b RTFDFromRange:b0 (NSRange)i rangei0 tab Extracts the specified i rangei0 of RTFD text from the NSText object and returns an data object initialized with that text. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSData *)b RTFFromRange:b0 (NSRange)i rangei0 tab Extracts the specified i rangei0 of RTF text from the NSText object and returns a data object initialized with that text. This data is formatted according to the RTF file format. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setText:b0 (NSString *)i stringi0 tab Sets the contents of the NSText object to be i stringi0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setText:b0 (NSString *)i stringi0 tab Replaces the characters in the specified i rangei0 of text in the s9 li7030 fi-6553 fi-5796 b range:b0 (NSRange)i rangei0 tab tab NSText object to bei string. s8 li7029 fi-5794 fi-6552 i0 fs16 fs28 fi-6552 {f3 -} (NSString *)b textb0 tab Returns the contents of the NSText object as a immutable string object. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing Global Characteristics fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSTextAlignment)b alignmentb0 tab Returns how text in the NSText object is aligned between the margins. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b drawsBackgroundb0 tab Returns whether the NSText object draws its own background. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b importsGraphicsb0 tab Returns whether the NSText object can accept images. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isEditableb0 tab Returns whether users can edit the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isRichTextb0 tab Returns whether the text in the NSText object is RTF. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isSelectableb0 tab Returns whether users can select text in the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setAlignment:b0 (NSTextAlignment)i modei0 tab Sets how the text in the NSText object is aligned between the margins. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDrawsBackground:b0 (BOOL)i flagi0 tab Sets whether the NSText object draws its own background. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setEditable:b0 (BOOL)i flagi0 tab Sets whether users can edit text in the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setImportsGraphics:b0 (BOOL)i flagi0 tab Sets whether the NSText object can accept images. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setRichText:b0 (BOOL)i flagi0 tab Sets whether the text in the NSText object allows for multiple values of attributes, such as color and font (i.e. RTF). fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setSelectable:b0 (BOOL)i flagi0 tab Sets whether users can select text in the NSText object. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing Font and Color fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSColor *)b backgroundColorb0 tab Returns the background color for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b changeFont:b0 (id)i senderi0 tab Initiates a font-change session. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSFont *)b fontb0 tab Returns the default NSFont object for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setBackgroundColor:b0 (NSColor *)i colori0 tab Sets the background color for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setColor:b0 (NSColor *)i colori0 tab Sets the color for the specified i rangei0 of text in the s9 li7030 fi-6553 fi-5796 b ofRange:b0 (NSRange)i rangei0 tab tab NSText object to i colori0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setFont:b0 (NSFont *)i obji0 tab Sets the default NSFont object for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setFont:b0 (NSFont *)i fonti0 tab Sets the font for the specified i rangei0 of text in the s9 li7030 fi-6553 fi-5796 b ofRange:b0 (NSRange)i rangei0 tab tab NSText object to i fonti0 . s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setTextColor:b0 (NSColor *)i colori0 tab Sets the textual color for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setUsesFontPanel:b0 (BOOL)i flagi0 tab Sets whether the NSText object uses the font panel. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSColor *)b textColorb0 tab Returns the textual color for the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b usesFontPanelb0 tab Returns whether the NSText object uses the font panel pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing the Selection fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (NSRange)b selectedRangeb0 tab Returns the range of the selected text in the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setSelectedRange:b0 (NSRange)i rangei0 tab Sets the i rangei0 of selected text in the NSText object. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Sizing the Frame Rectangle fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b isHorizontallyResizableb0 tab Returns whether the frame width can change. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b isVerticallyResizableb0 tab Returns whether the frame height can change. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSSize)b maxSizeb0 tab Gets the maximum size of the NSTextView'27s frame. fi-6552 fs16 fs28 fi-6552 {f3 -} (NSSize)b minSizeb0 tab Gets the minimum size of the NSTextView'27s frame. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setHorizontallyResizable:b0 (BOOL)i flagi0 tab Sets whether the frame'27s width can change. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setMaxSize:b0 (NSSize)i newMaxSizei0 tab Sets the maximum size of the NSText object to i newMaxSizei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setMinSize:b0 (NSSize)i newMinSizei0 tab Sets the minimum size of the NSText object to i newMinSizei0 . fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setVerticallyResizable:b0 (BOOL)i flagi0 tab Sets whether the frame'27s height can change. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b sizeToFitb0 tab Resizes the frame to fit just around the text. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Responding to Editing Commands fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b alignCenter:b0 (id)i senderi0 tab Centers the selected text between the margins. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b alignLeft:b0 (id)i senderi0 tab Aligns selected text to the left margin. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b alignRight:b0 (id)i senderi0 tab Aligns selected text the right margin. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b copy:b0 (id)i senderi0 tab Copies the selected text to the pasteboard. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b copyFont:b0 (id)i senderi0 tab Copies the selected text'27s font to the pasteboard. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b copyRuler:b0 (id)i senderi0 tab Copies the selected text'27s ruler to the pasteboard. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b cut:b0 (id)i senderi0 tab Deletes the selected text and copies it to the pasteboard. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b delete:b0 (id)i senderi0 tab Deletes the selected text. This method posts the notification NSTextDidChangeNotification with the receiving object to the default notification center and may post the NSTextDidBeginEditing notification as well. (NSTextDidEndEditingNotification gets posted when the first responder changes.) fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b paste:b0 (id)i senderi0 tab Replaces the selected text with the contents of the pasteboard. This method posts the notification NSTextDidChangeNotification with the receiving object to the default notification center and may post the NSTextDidBeginEditing notification as well. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b pasteFont:b0 (id)i senderi0 tab Replaces the selection'27s font with the pasteboard contents. This method posts the NSTextDidChangeNotification notification with the receiving object to the default notification center and may post the NSTextDidBeginEditing notification as well. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b pasteRuler:b0 (id)i senderi0 tab Replaces the selection'27s ruler with the pasteboard contents. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b selectAll:b0 (id)i senderi0 tab Selects all text in the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b subscript:b0 (id)i senderi0 tab Subscripts the current selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b superscript:b0 (id)i senderi0 tab Superscripts the current selection. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b underline:b0 (id)i senderi0 tab Underlines the selected text. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b unscript:b0 (id)i senderi0 tab Removes superscript or subscript in the current selection. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing the Ruler fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b isRulerVisibleb0 tab Returns whether the ruler is visible. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b toggleRuler:b0 (id)i senderi0 tab Displays the ruler if it'27s not visible, and removes it if it is visible. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Spelling fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b checkSpelling:b0 (id)i senderi0 tab Initiates a spell-checking session. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b showGuessPanel:b0 (id)i senderi0 tab Displays the spell-checker'27s Show Guess panel. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Scrolling fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b scrollRangeToVisible:b0 (NSRange)i rangei0 tab Scrolls the NSText object so that the i rangei0 of text is visible. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Reading and Writing RTFD Files fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b readRTFDFromFile:b0 (NSString *)i pathi0 tab Reads RTFD data from the file package specified by i pathi0 and initializes an NSText object with it; returns whether the operation succeeded. fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b writeRTFDToFile:b0 (NSString *)i pathi0 tab Writes RTFD data from the receiving NSText object s9 li7030 fi-6553 fi-5796 b atomically:b0 (BOOL)i flagi0 tab tab to the file package specified by i pathi0 . i flagi0 determines whether writing occurs atomically. Returns whether the operation succeeded. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing the Field Editor fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (BOOL)b isFieldEditorb0 tab Returns whether the receiving NSText object gives up First Responder status on tab, carriage return, etc. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setFieldEditor:b0 (BOOL)i flagi0 tab Sets whether the receiving NSText object is to be used as a field editor. i flagi0 indicates whether to end on carriage return, tab, or other terminating character. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Managing the Delegate fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (id)b delegateb0 tab Returns the delegate of the NSText object. fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b setDelegate:b0 (id)i anObjecti0 tab Makes i anObjecti0 the NSText object'27s delegate. pard s16 li100 fi0 ri1007 ql f0 b fs48 fs28 Implemented by the Delegate fs14 fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 fs28 fi-6552 {f3 -} (void)b textDidBeginEditing:b0 (NSNotification *)i aNotification s9 li7030 fi-6553 fi-5796 i0 tab Sent by the default notification center to the delegate; i aNotificationi0 is always NSTextDidBeginEditingNotification. If the delegate implements this method, it'27s automatically registered to receive this notification. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b textDidChange:b0 (NSNotification *)i aNotificationi0 tab s9 li7030 fi-6553 fi-5796 tab Sent by the default notification center to the delegate; i aNotificationi0 is always NSTextDidChangeNotification. If the delegate implements this method, it'27s automatically registered to receive this notification. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (void)b textDidEndEditing:b0 (NSNotification *)i aNotification s9 li7030 fi-6553 fi-5796 i0 tab Sent by the default notification center to the delegate; i aNotificationi0 is always NSTextDidEndEditingNotification. If the delegate implements this method, it'27s automatically registered to receive this notification. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b textShouldBeginEditing:b0 (NSText *)i textObjecti0 tab s9 li7030 fi-6553 fi-5796 tab Sent directly by i textObjecti0 to the delegate. Informs delegate of an impending textual change. YES means go ahead and make the change. s8 li7029 fi-5794 fi-6552 fs16 fs28 fi-6552 {f3 -} (BOOL)b textShouldEndEditing:b0 (NSText *)i textObjecti0 tab s9 li7030 fi-6553 fi-5796 tab Sent directly by i textObjecti0 to the delegate. Warns delegate of the impending loss of First Responder status. YES means go ahead and change status. }
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.