Deprecated NSTableView Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in OS X v10.3

drawsGrid

Returns a Boolean value that indicates whether the receiver draws a grid. (Deprecated in OS X v10.3. Use gridStyleMask instead.)

- (BOOL)drawsGrid
Return Value

Returns whether the grid is drawn.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

selectColumn:byExtendingSelection:

Selects the column at the specified index, optionally extending any existing selection. (Deprecated in OS X v10.3. Use selectColumnIndexes:byExtendingSelection: instead.)

- (void)selectColumn:(NSInteger)columnIndex byExtendingSelection:(BOOL)flag
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

selectedColumnEnumerator

This method has been deprecated. (Deprecated in OS X v10.3. Use selectedColumnIndexes instead.)

- (NSEnumerator *)selectedColumnEnumerator
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

selectedRowEnumerator

This method has been deprecated. (Deprecated in OS X v10.3. Use selectedRowIndexes instead.)

- (NSEnumerator *)selectedRowEnumerator
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

selectRow:byExtendingSelection:

Selects a row at the specified index, optionally extending any existing selection. (Deprecated in OS X v10.3. Use selectRowIndexes:byExtendingSelection: instead.)

- (void)selectRow:(NSInteger)rowIndex byExtendingSelection:(BOOL)flag
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

setDrawsGrid:

Sets whether the receiver draws a grid. (Deprecated in OS X v10.3. Use setGridStyleMask: instead.)

- (void)setDrawsGrid:(BOOL)flag
Parameters
flag

Whether or not to draw the grid.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.3.
Declared In
NSTableView.h

Deprecated in OS X v10.4

autoresizesAllColumnsToFit

Returns YES if the receiver proportionally resizes its columns to fit when its superview’s frame changes, NO if it only resizes the last column. (Deprecated in OS X v10.4. Use columnAutoresizingStyle instead.)

- (BOOL)autoresizesAllColumnsToFit
Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.4.
Declared In
NSTableView.h

dragImageForRows:event:dragImageOffset:

Computes and returns an image to use for dragging. (Deprecated in OS X v10.4. Use dragImageForRowsWithIndexes:tableColumns:event:offset: instead.)

- (NSImage *)dragImageForRows:(NSArray *)dragRows event:(NSEvent *)dragEvent dragImageOffset:(NSPointPointer)dragImageOffset
Discussion

Override this to return a custom image. dragRows represents the rows participating in the drag. dragEvent is a reference to the mouse-down event that began the drag. dragImageOffset is an in/out parameter.

This method is called with dragImageOffset set to NSZeroPoint, but it can be modified to reposition the returned image. A dragImageOffset of NSZeroPoint will cause the image to be centered under the cursor.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.4.
Declared In
NSTableView.h

setAutoresizesAllColumnsToFit:

Controls whether the receiver proportionally resizes its columns to fit when its superview’s frame changes. (Deprecated in OS X v10.4. Use setColumnAutoresizingStyle: instead.)

- (void)setAutoresizesAllColumnsToFit:(BOOL)flag
Discussion

If flag is YES, the difference in width is distributed among the receiver’s table columns; if flag is NO, only the last column is resized to fit.

To preserve compatibility this method sets the autoresizing style to NSTableViewUniformColumnAutoresizingStyle , if flag is YES. Otherwise the autoresizing style is set to NSTableViewLastColumnOnlyAutoresizingStyle.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.4.
Declared In
NSTableView.h

tableView:writeRows:toPasteboard:

Writes the specified rows to the specified pasteboard. (Deprecated in OS X v10.4. This method has been deprecated. You should implement tableView:writeRowsWithIndexes:toPasteboard: instead.)

- (BOOL)tableView:(NSTableView *)aTableView writeRows:(NSArray *)rows toPasteboard:(NSPasteboard *)pboard
Parameters
aTableView

The table view.

rows

An array of row indexes.

pboard

The pasteboard.

Return Value

Return YES to allow the drag: otherwise NO to refuse the drag.

Discussion

Invoked by aTableView after it has been determined that a drag should begin, but before the drag has been started. To refuse the drag, return NO. To start a drag, return YES and place the drag data onto pboard (data, owner, and so on). The drag image and other drag-related information will be set up and provided by the table view once this call returns with YES. rows is the list of row numbers that will be participating in the drag.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.4.
Declared In
NSTableView.h

Deprecated in OS X v10.5

columnsInRect:

Returns a range of indexes for the receiver’s columns that lie wholly or partially within the horizontal boundaries of the specified rectangle. (Deprecated in OS X v10.5. Use columnIndexesInRect: instead.)

- (NSRange)columnsInRect:(NSRect)aRect
Parameters
aRect

A rectangle in the coordinate system of the receiver.

Return Value

A range of indexes for the receiver’s columns that lie wholly or partially within the horizontal boundaries of aRect. If the width or height of aRect is 0, returns an NSRange whose length is 0.

Discussion

The location of the range is the first such column’s index, and the length is the number of columns that lie in aRect.

Availability
  • Available in OS X v10.0 and later.
  • Deprecated in OS X v10.5.
Declared In
NSTableView.h