- Inherits from:
- NSControl : NSView : NSResponder : NSObject
- Conforms to:
- NSCoding
- (NSResponder)
- NSObject (NSObject)
Declared in:
- AppKit/NSMatrix.h
NSMatrix is a class used for creating groups of NSCells that work together in various ways. It includes methods for arranging NSCells in rows and columns, either with or without space between them. NSCells in an NSMatrix are numbered by row and column, each starting with 0; for example, the top left NSCell would be at (0, 0), and the NSCell that's second down and third across would be at (1, 2).
The cell objects that an NSMatrix contains are usually of a single subclass of NSCell, but they can be of multiple subclasses of NSCell. The only restriction is that all cell objects must be the same size. An NSMatrix can be set up to create new NSCells by copying a prototype object, or by allocating and initializing instances of a specific NSCell class. Cells created by or added to an NSMatrix are retained by the matrix.
An NSMatrix adds to NSControl's target/action paradigm by allowing a separate target and action for each of its NSCells in addition to its own target and action. It also allows for an action message that's sent when the user double-clicks an NSCell, which is sent in addition to the single-click action message. If an NSCell doesn't have an action, the NSMatrix sends its own action to its own target. If an NSCell doesn't have a target, the NSMatrix sends the NSCell's action to its own target. The double-click action of an NSMatrix is always sent to the target of the NSMatrix.
Since the user might press the mouse button while the cursor is within the NSMatrix and then drag the mouse around, NSMatrix offers four "selection modes" that determine how NSCells behave when the NSMatrix is tracking the mouse:
NSTrackModeMatrix
is
the most basic mode of operation. In this mode the NSCells are asked
to track the mouse with trackMouse:inRect:ofView:untilMouseUp: whenever
the mouse is inside their bounds. No highlighting is performed.
An example of this mode might be a "graphic equalizer" NSMatrix
of sliders, where moving the mouse around causes the sliders to
move under the mouse.NSHighlightModeMatrix
is a
modification of NSTrackModeMatrix
.
In this mode, an NSCell is highlighted before it's asked to track
the mouse, then unhighlighted when it's done tracking. This is
useful for multiple unconnected NSCells that use highlighting to
inform the user that they are being tracked (like push-buttons and
switches).NSRadioModeMatrix
is used when
you want no more than one NSCell to be selected at a time. It can be
used to create a set of buttons of which one and only one is selected
(there's the option of allowing no button to be selected). Any
time an NSCell is selected, the previously selected NSCell is unselected.
The canonical example of this mode is a set of radio buttons.NSListModeMatrix
is the opposite
of NSTrackModeMatrix
. NSCells are
highlighted, but don't track the mouse. This mode can be used
to select a range of text values, for example. NSMatrix supports the
standard multiple-selection paradigms of dragging to select, using
the shift key to make discontinuous selections, and using the alternate
key to extend selections. Browsers use this mode.These constants determine how NSCells behave when the NSMatrix is tracking the mouse. For more information, see the Class Description.
Constant | Description |
NSTrackModeMatrix |
The NSCells are asked to track the mouse with trackMouse:inRect:ofView:untilMouseUp: whenever the mouse is inside their bounds. No highlighting is performed.l |
NSHighlightModeMatrix |
An NSCell is highlighted before it's asked to track the mouse, then unhighlighted when it's done tracking. . |
NSRadioModeMatrix |
Selects no more than one NSCell at a time. Any time an NSCell is selected, the previously selected NSCell is unselected. |
NSListModeMatrix |
NSCells are highlighted, but don't track the mouse. |
- Initializing an NSMatrix object
- - initWithFrame:
- - initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:
- - initWithFrame:mode:prototype:numberOfRows:numberOfColumns:
- Setting the selection mode
- - mode
- - setMode:
- Configuring the NSMatrix
- - allowsEmptySelection
- - isSelectionByRect
- - setAllowsEmptySelection:
- - setSelectionByRect:
- Setting the cell class
- - cellClass
- - prototype
- - setCellClass:
- - setPrototype:
- Laying out the NSMatrix
- - addColumn
- - addColumnWithCells:
- - addRow
- - addRowWithCells:
- - cellFrameAtRow:column:
- - cellSize
- - getNumberOfRows:columns:
- - insertColumn:
- - insertColumn:withCells:
- - insertRow:
- - insertRow:withCells:
- - intercellSpacing
- - makeCellAtRow:column:
- - numberOfColumns
- - numberOfRows
- - putCell:atRow:column:
- - removeColumn:
- - removeRow:
- - renewRows:columns:
- - setCellSize:
- - setIntercellSpacing:
- - sortUsingFunction:context:
- - sortUsingSelector:
- Finding matrix coordinates
- - getRow:column:forPoint:
- - getRow:column:ofCell:
- Modifying individual cells
- - setState:atRow:column:
- - setToolTip:forCell:
- - toolTipForCell:
- Selecting cells
- - deselectAllCells
- - deselectSelectedCell
- - keyCell
- - selectAll:
- - selectCellAtRow:column:
- - selectCellWithTag:
- - selectedCell
- - selectedCells
- - selectedColumn
- - selectedRow
- - setKeyCell:
- - setSelectionFrom:to:anchor:highlight:
- Finding cells
- - cellAtRow:column:
- - cellWithTag:
- - cells
- Modifying graphic attributes
- - backgroundColor
- - cellBackgroundColor
- - drawsBackground
- - drawsCellBackground
- - setBackgroundColor:
- - setCellBackgroundColor:
- - setDrawsBackground:
- - setDrawsCellBackground:
- Editing text in cells
- - selectText:
- - selectTextAtRow:column:
- - textDidBeginEditing:
- - textDidChange:
- - textDidEndEditing:
- - textShouldBeginEditing:
- - textShouldEndEditing:
- Setting tab key behavior
- - nextText
- - previousText
- - setNextText:
- - setPreviousText:
- - setTabKeyTraversesCells:
- - tabKeyTraversesCells
- Assigning a delegate
- - delegate
- - setDelegate:
- Resizing the matrix and its cells
- - autosizesCells
- - setAutosizesCells:
- - setValidateSize:
- - sizeToCells
- Scrolling
- - isAutoscroll
- - scrollCellToVisibleAtRow:column:
- - setAutoscroll:
- - setScrollable:
- Displaying
- - drawCellAtRow:column:
- - highlightCell:atRow:column:
- Target and action
- - doubleAction
- - errorAction
- - sendAction
- - sendAction:to:forAllCells:
- - sendDoubleAction
- - setDoubleAction:
- - setErrorAction:
- Handling event and action messages
- - acceptsFirstMouse:
- - mouseDown:
- - mouseDownFlags
- - performKeyEquivalent:
- Managing the cursor
- - resetCursorRects
- (BOOL)acceptsFirstMouse:(NSEvent
*)theEvent
NO
if
the selection mode of the NSMatrix is NSListModeMatrix
, YES if
the NSMatrix is in any other selection mode. The
NSMatrix does not accept first mouse in NSListModeMatrix
to
prevent the loss of multiple selections. The NSEvent parameter, theEvent,
is ignored.See Also: - mode
- (void)addColumn
If the number of rows or columns in the NSMatrix has been changed with renewRows:columns:, new cells are created only if they are needed. This allows you to grow and shrink an NSMatrix without repeatedly creating and freeing the cells.
This method doesn't redraw the NSMatrix. Accordingly, after calling this method you should send setNeedsDisplay to the NSMatrix. Your code may also need to use sizeToCells after sending this method to resize the NSMatrix to fit the newly added cells.
See Also: - cellClass, - insertColumn:, - prototype
- (void)addColumnWithCells:(NSArray
*)newCells
This method doesn't redraw the NSMatrix. Accordingly, after calling this method you should send setNeedsDisplay to the NSMatrix. Your code may also need to use sizeToCells after sending this method to resize the NSMatrix to fit the newly added cells.
See Also: - insertColumn:withCells:
- (void)addRow
If the number of rows or columns in the NSMatrix has been changed with renewRows:columns:, then new cells are created only if they are needed. This allows you to grow and shrink an NSMatrix without repeatedly creating and freeing the cells.
This method doesn't redraw the NSMatrix. Accordingly, after calling this method you should send setNeedsDisplay to the NSMatrix. Your code may also need to use sizeToCells after sending this method to resize the NSMatrix to fit the newly added cells.
See Also: - cellClass, - insertRow:, - prototype
- (void)addRowWithCells:(NSArray
*)newCells
This method doesn't redraw the NSMatrix. Accordingly, after calling this method you should send setNeedsDisplay to the NSMatrix. Your code may also need to use sizeToCells after sending this method to resize the NSMatrix to fit the newly added cells.
See Also: - insertRow:withCells:
- (BOOL)allowsEmptySelection
See Also: - mode
- (BOOL)autosizesCells
YES
if
cells are resized proportionally to the NSMatrix when its size changes
(and inter-cell spacing is kept constant). Returns NO
if
the cell size remains constant (and inter-cell spacing changes).- (NSColor *)backgroundColor
See Also: - cellBackgroundColor, - drawsBackground
- (id)cellAtRow:(int)row
column:(int)column
See Also: - getRow:column:ofCell:
- (NSColor *)cellBackgroundColor
See Also: - backgroundColor, - drawsCellBackground
- (Class)cellClass
See Also: - prototype, - makeCellAtRow:column:
- (NSRect)cellFrameAtRow:(int)row
column:(int)column
See Also: - cellSize
- (NSSize)cellSize
See Also: - cellFrameAtRow:column:, - intercellSpacing
- (id)cellWithTag:(int)anInt
See Also: - selectCellWithTag:, - setTag: (NSActionCell)
- (NSArray *)cells
See Also: - cellAtRow:column:
- (id)delegate
See Also: - textShouldBeginEditing:, - textShouldEndEditing:
- (void)deselectAllCells
NSRadioModeMatrix
and
empty selection is not allowed, this method does nothing.See Also: - allowsEmptySelection, - mode, - selectAll:
- (void)deselectSelectedCell
NSRadioModeMatrix
and
empty selection is not allowed, or if nothing is currently selected,
this method does nothing. This method doesn't redisplay the NSMatrix.See Also: - allowsEmptySelection, - mode, - selectCellAtRow:column:
public NSSelector doubleAction()
- (SEL)doubleAction
See Also: - action (NSControl), - target (NSControl), - ignoresMultiClick (NSControl), - sendDoubleAction
- (void)drawCellAtRow:(int)row
column:(int)column
See Also: - drawCell: (NSControl), - drawCellInside: (NSControl)
- (BOOL)drawsBackground
See Also: - backgroundColor, - drawsCellBackground
- (BOOL)drawsCellBackground
See Also: - cellBackgroundColor, - drawsBackground
- (SEL)errorAction
See Also: - action (NSControl), - target (NSControl), - textShouldEndEditing:
- (void)getNumberOfRows:(int
*)rowCount
columns:(int *)columnCount
See Also: - numberOfColumns, - numberOfRows
- (BOOL)getRow:(int
*)row
column:(int *)column
forPoint:(NSPoint)aPoint
YES
if aPoint lies
within one of the cells in the receiver, and returns by reference
the row and column for the cell within which the specified point
lies. If aPoint falls
outside the bounds of the receiver or lies within an intercell spacing, getRow:column:forPoint: returns NO
. Make sure aPoint is in the coordinate system of the receiver.
See Also: - getRow:column:ofCell:
- (BOOL)getRow:(int
*)row
column:(int *)column
ofCell:(NSCell *)aCell
YES
if aCell is
one of the cells in the receiver, and returns by reference the row
and column of the cell. If aCell is
not found within the receiver, getRow:column:ofCell: returns NO
. See Also: - getRow:column:forPoint:
- (void)highlightCell:(BOOL)flag
atRow:(int)row
column:(int)column
NO
)
the specified cell.- (id)initWithFrame:(NSRect)frameRect
NSRadioModeMatrix
.
The default cell class is NSActionCell.- (id)initWithFrame:(NSRect)frameRect
mode:(int)aMode
cellClass:(Class)factoryId
numberOfRows:(int)numRows
numberOfColumns:(int)numColumns
The new NSMatrix creates and uses cells of class classId, which can be obtained by sending a class message to the desired subclass of NSCell.
This method is the designated initializer for matrices that add cells by creating instances of an NSCell subclass.
- (id)initWithFrame:(NSRect)frameRect
mode:(int)aMode
prototype:(NSCell *)aCell
numberOfRows:(int)numRows
numberOfColumns:(int)numColumns
The
new Matrix creates cells by copying aCell
,
which should be an instance of a subclass of NSCell.
This method is the designated initializer for matrices that add cells by copying an instance of an NSCell subclass.
- (void)insertColumn:(int)column
If the number of rows or columns in the receiver has been changed with renewRows:columns:, new cells are created only if they're needed. This allows you to grow and shrink an NSMatrix without repeatedly creating and freeing the cells.
See Also: - addColumn, - insertRow:
- (void)insertColumn:(int)column
withCells:(NSArray *)newCells
This method doesn't redraw the receiver. Accordingly, after calling this method you should send setNeedsDisplay to the receiver. Your code may also need to use sizeToCells after sending this method to resize the receiver to fit the newly added cells.
See Also: - addColumnWithCells:, - insertRow:withCells:
- (void)insertRow:(int)row
If the number of rows or columns in the receiver has been changed with renewRows:columns:, then new cells are created only if they're needed. This allows you to grow and shrink an NSMatrix without repeatedly creating and freeing the cells.
See Also: - addRow, - insertColumn:
- (void)insertRow:(int)row
withCells:(NSArray *)newCells
This method doesn't redraw the receiver. Accordingly, after calling this method you should send setNeedsDisplay to the receiver. Your code may also need to use sizeToCells after sending this method to resize the receiver to fit the newly added cells.
See Also: - addRowWithCells:, - insertColumn:withCells:
- (NSSize)intercellSpacing
See Also: - cellSize
- (BOOL)isAutoscroll
See Also: - scrollCellToVisibleAtRow:column:, - setScrollable:
- (BOOL)isSelectionByRect
YES
if
a the user can select a rectangle of cells in the receiver by dragging
the cursor, NO
otherwise.See Also: - setSelectionFrom:to:anchor:highlight:
- (id)keyCell
See Also: - nextText , - tabKeyTraversesCells
- (NSCell *)makeCellAtRow:(int)row
column:(int)column
Your code should never invoke this method directly; it's used by addRow and other methods when a cell must be created. It may be overridden to provide more specific initialization of cells.
See Also: - addColumn, - addRow, - insertColumn:, - insertRow:, - setCellClass:, - setPrototype:
- (NSMatrixMode)mode
See Also: - initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:, - initWithFrame:mode:prototype:numberOfRows:numberOfColumns:
- (void)mouseDown:(NSEvent
*)theEvent
Your code should never invoke this method, but you may override it to implement different mouse tracking than NSMatrix does. The response of the receiver depends on its selection mode, as explained in the class description.
See Also: - sendAction, - sendDoubleAction
- (int)mouseDownFlags
See Also: - sendActionOn: (NSCell)
- (id)nextText
See Also: - nextKeyView (NSView), - previousText, - setNextText:
- (int)numberOfColumns
See Also: - getNumberOfRows:columns:
- (int)numberOfRows
See Also: - getNumberOfRows:columns:
- (BOOL)performKeyEquivalent:(NSEvent
*)theEvent
YES
if
a cell in the receiver responds to the key equivalent in theEvent, NO
if
no cell responds.Your code should never send this message-it is sent when the receiver or one of its superviews is the first responder and the user presses a key. You may want to override this method to change the way key equivalents are performed or displayed, or to disable them in your subclass.
- (id)previousText
See Also: - nextKeyView (NSView), - nextText, - setPreviousText:
- (id)prototype
See Also: - initWithFrame:mode:prototype:numberOfRows:numberOfColumns:, - makeCellAtRow:column:
- (void)putCell:(NSCell
*)newCell
atRow:(int)row
column:(int)column
- (void)removeColumn:(int)column
See Also: - removeRow:, - addColumn, - insertColumn:
- (void)removeRow:(int)row
See Also: - removeColumn:, - addRow, - insertRow:
- (void)renewRows:(int)newRows
columns:(int)newCols
See Also: - addColumn, - addRow, - removeColumn:, - removeRow:
- (void)resetCursorRects
See Also: - resetCursorRect:inView: (NSCell), - addCursorRect:cursor: (NSView)
- (void)scrollCellToVisibleAtRow:(int)row
column:(int)column
See Also: - scrollRectToVisible: (NSView)
- (void)selectAll:(id)sender
See Also: - selectCell: (NSControl)
- (void)selectCellAtRow:(int)row
column:(int)column
NSRadioModeMatrix
and doesn't
allow empty selection). Redraws the affected cells.See Also: - allowsEmptySelection, - mode, - selectCell: (NSControl)
- (BOOL)selectCellWithTag:(int)anInt
YES
if
the receiver contains a cell whose tag matches anInt,
or NO
if no such cell exists.See Also: - cellWithTag:, - selectCell: (NSControl)
- (void)selectText:(id)sender
See Also: - keyCell, - selectText: (NSTextField)
- (id)selectTextAtRow:(int)row
column:(int)column
See Also: - selectText:
- (id)selectedCell
- (NSArray *)selectedCells
See Also: - selectedCell
- (int)selectedColumn
- (int)selectedRow
- (BOOL)sendAction
YES
if an
action was successfully sent to a target.If the selected cell
is disabled, this method does nothing and returns NO
.
See Also: - sendDoubleAction, - action (NSCell), - target (NSCell)
- (void)sendAction:(SEL)aSelector
to:(id)anObject
forAllCells:(BOOL)flag
YES
),
or just the selected cells in the receiver (if flag is NO
),
sending aSelector to anObject for
each. Iteration begins with the cell in the upper-left corner
of the receiver, proceeding through the appropriate entries in the
first row, then on to the next.aSelector must
represent a method that takes a single argument: the id of
the current cell in the iteration. aSelector's
return value must be a BOOL. If aSelector returns NO
for
any cell, sendAction:to:forAllCells: terminates
immediately, without sending the message for the remaining cells.
If it returns YES
, sendAction:to:forAllCells: proceeds
to the next cell.
This method is not invoked to send action messages to target objects in response to mouse-down events in the receiver. Instead, you can invoke it if you want to have multiple cells in an NSMatrix interact with an object. For example, you could use it to verify the titles in a list of items, or to enable a series of radio buttons based on their purpose in relation to anObject.
- (void)sendDoubleAction
If the selected cell is disabled, this method does nothing.
Your code shouldn't invoke this method; it's sent in response to a double-click event in the NSMatrix. Override it if you need to change the search order for an action to send.
See Also: - sendAction, - ignoresMultiClick (NSControl)
- (void)setAllowsEmptySelection:(BOOL)flag
YES
,
then the receiver will allow one or zero cells to be selected. If flag is NO
,
then the receiver will allow one and only one cell (not zero cells)
to be selected. This setting has effect only in the NSRadioModeMatrix
selection
mode.- (void)setAutoscroll:(BOOL)flag
YES
and
the receiver is in a scrolling view, it will be automatically scrolled
whenever the mouse is dragged outside the receiver after a mouse-down
event within the bounds of the receiver.- (void)setAutosizesCells:(BOOL)flag
YES
,
then whenever the receiver is resized, the sizes of the cells change
in proportion, keeping the inter-cell space constant; further, this
method verifies that the cell sizes and inter-cell spacing add up
to the exact size of the receiver, adjusting the size of the cells
and updating the receiver if they don't. If flag is NO
,
then the inter-cell space changes when the receiver is resized,
with the cell size remaining constant.- (void)setBackgroundColor:(NSColor
*)aColor
See Also: - drawsBackground, - setCellBackgroundColor:
- (void)setCellBackgroundColor:(NSColor
*)aColor
See Also: - drawsCellBackground, - setBackgroundColor:
- (void)setCellClass:(Class)aClass
You only need to use this method with matrices initialized with initWithFrame:, because the other initializers allow you to specify an instance-specific cell class or cell prototype.
See Also: - addColumn, - addRow, - insertColumn:, - insertRow:, - makeCellAtRow:column:, - setPrototype:
- (void)setCellSize:(NSSize)aSize
See Also: - calcSize (NSControl)
- (void)setDelegate:(id)anObject
See Also: - textShouldBeginEditing:, - textShouldEndEditing:
- (void)setDoubleAction:(SEL)aSelector
NO
; otherwise, it leaves the flag
unchanged.If an NSMatrix has no double-click action set, then by default a double-click is treated as a single-click.
See Also: - sendDoubleAction, - setAction: (NSControl), - setTarget: (NSControl)
- (void)setDrawsBackground:(BOOL)flag
See Also: - backgroundColor, - setDrawsCellBackground:
- (void)setDrawsCellBackground:(BOOL)flag
See Also: - cellBackgroundColor, - setDrawsBackground:
- (void)setErrorAction:(SEL)aSelector
See Also: - action (NSControl), - target (NSControl)
- (void)setIntercellSpacing:(NSSize)aSize
See Also: - cellSize
- (void)setKeyCell:(NSCell
*)aCell
See Also: - setNextText:, - setTabKeyTraversesCells:
- (void)setMode:(NSMatrixMode)aMode
See Also: - initWithFrame:mode:cellClass:numberOfRows:numberOfColumns:, - initWithFrame:mode:prototype:numberOfRows:numberOfColumns:
- (void)setNextText:(id)anObject
See Also: - setNextKeyView: (NSView), - setTabKeyTraversesCells:
- (void)setPreviousText:(id)anObject
See Also: - setNextKeyView: (NSView)
- (void)setPrototype:(NSCell
*)aCell
See Also: - initWithFrame:mode:prototype:numberOfRows:numberOfColumns:, - makeCellAtRow:column:
- (void)setScrollable:(BOOL)flag
YES
,
makes all the cells scrollable, so the text they contain scrolls
to remain in view if the user types past the edge of the cell. If flag is NO
,
all cells are made non-scrolling. The prototype cell, if there is
one, is also set accordingly.See Also: - prototype, - setScrollable: (NSCell)
- (void)setSelectionByRect:(BOOL)flag
YES
.See Also: - setSelectionFrom:to:anchor:highlight:
- (void)setSelectionFrom:(int)startPos
to:(int)endPos
anchor:(int)anchorPos
highlight:(BOOL)lit
startPos and endPos are used to mark where the user would have pressed the mouse button and released it, respectively. anchorPos locates the "last selected cell" with regard to extending the selection by Shift- or Alternate-clicking. Finally, lit determines whether cells selected by this method should be highlighted.
See Also: - isSelectionByRect, - selectedCells
- (void)setState:(int)value
atRow:(int)row
column:(int)column
This method redraws the affected cell.
See Also: - allowsEmptySelection, - setState: (NSCell), - selectCellAtRow:column:
- (void)setTabKeyTraversesCells:(BOOL)flag
NO
,
or if there aren't any selectable cells after the current one,
when the user presses the Tab key the next view in the window becomes
key. Pressing Shift-Tab causes the key cell to advance in the opposite
direction (if flag is NO
,
or if there aren't any selectable cells before the current one,
the previous view in the window becomes key).See Also: - selectKeyViewFollowingView: (NSWindow), - selectNextKeyView: (NSWindow), - setKeyCell:, - setNextText:
- (void)setToolTip:(NSString
*)toolTipString
forCell:(NSCell *)cell
- (void)setValidateSize:(BOOL)flag
YES
,
then the size information in the receiver is assumed to be correct. If flag is NO
, NSControl's calcSize method will be invoked before
any further drawing is done.- (void)sizeToCells
See Also: - setFrameSize: (NSView), - sizeToFit (NSControl)
- (void)sortUsingFunction:(int
(*)(id, id, void *))comparator
context:(void *)context
NSOrderedAscending
if
the first element is smaller than the second, NSOrderedDescending
if
the first element is larger than the second, and NSOrderedSame
if
the elements are equal. Each time the comparison function is called, it's
passed context as its third argument.
This allows the comparison to be based on some outside parameter,
such as whether character sorting is case-sensitive or case-insensitive.See Also: - sortUsingFunction:context: (NSMutableArray)
- (void)sortUsingSelector:(SEL)comparator
NSOrderedAscending
if
the receiver is smaller than the argument, NSOrderedDescending
if
the receiver is larger than the argument, and NSOrderedSame
if
they are equal.See Also: - sortUsingSelector: (NSMutableArray)
- (BOOL)tabKeyTraversesCells
See Also: - keyCell, - setTabKeyTraversesCells:
- (void)textDidBeginEditing:(NSNotification
*)notification
NSFieldEditor
"; the value
for this key is the text object that began editing.See Also: - textDidChange:, - textDidEndEditing:, - textShouldEndEditing:
- (void)textDidChange:(NSNotification
*)notification
NSFieldEditor
"; the value
for this key is the text object that changed.See Also: - textDidBeginEditing:, - textDidEndEditing:
- (void)textDidEndEditing:(NSNotification
*)notification
NSFieldEditor
"; the value
for this key is the text object that began editing. After posting
the notification, textDidEndEditing: sends
an endEditing: message to the selected
cell, draws and makes the selected cell key, and then takes the appropriate
action based on which key was used to end editing (Return, Tab,
or Back-Tab).See Also: - textDidBeginEditing:, - textDidChange:, - textShouldEndEditing:
- (BOOL)textShouldBeginEditing:(NSText
*)textObject
YES
, thereby allowing
text editing to proceed.See Also: - delegate
- (BOOL)textShouldEndEditing:(NSText
*)textObject
textShouldEndEditing: returns NO
if
the text field contains invalid contents, otherwise it returns the value
passed back from control:textShouldEndEditing:.
See Also: - delegate, - errorAction
- (NSString *)toolTipForCell:(NSCell
*)cell