Xojo Developer Conference
Join us from 25th to 27th April 2018 in Denver.

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items

NSTableControlMBS.updateDraggingItemsForDrag(draggingInfo as NSDraggingInfoMBS)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Implement this method to allow the table to update dragging items as they are dragged over a view.
Notes:
The dragging information.

Required for multi-image dragging. Typically this will involve invoking enumerateDraggingItemsWithOptions on the draggingInfo parameter value and setting the draggingItem object’s imageComponentsProvider to a proper image based on the content.
For view-based table views, you can use the NSTableCellView method draggingImageComponents. For cell-based tables, use the NSCell method draggingImageComponentsWithFrame.
NSTableControlMBS.validateDrop(info as NSDraggingInfoMBS, proposedRow as Integer, dropOperation as Integer) as Integer
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Used by aTableView to determine a valid drop target.
Notes:
info: An object that contains more information about this dragging operation.
row: The index of the proposed target row.
operation: The type of dragging operation proposed.

Returns the dragging operation the data source will perform.

The data source may retarget a drop by calling setDropRow and returning something other than NSDragOperationNone. A data source might retarget for various reasons, such as to provide better visual feedback when inserting into a sorted position.
To propose a drop on the second row, row would be 2 and operation would be NSTableViewDropOn. To propose a drop below the last row, row would be TableView.numberOfRows and operation would be NSTableViewDropAbove.
NSTableControlMBS.view(tableColumn as NSTableColumnMBS, row as Integer) as NSViewMBS
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Asks the delegate for a view to display the specified row and column.
Notes:
see also
https://developer.apple.com/reference/appkit/nstableviewdelegate/1527449-tableview?language=objc

See also:

NSTableControlMBS.willDisplayCell(cell as NSCellMBS, tableColumn as NSTableColumnMBS, row as Int64)
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 15.2, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Informs you that the tableview will display the specified cell at the row in the column.
Notes:
Cell: The cell to be displayed.
TableColumn: The table column.
row: The row index.

The event can modify the display attributes of cell to alter the appearance of the cell.

Because cell is reused for every row in tableColumn, the event must set the display attributes both when drawing special cells and when drawing normal cells.

Note: The implementation of this method must not draw portions of the cell. It should only alter the state of the passed in cell.
NSTableControlMBS.willTile
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: The tableview will tile.
Notes: The internal tile function properly sizes the table view and its header view and marks it as needing display.
NSTableControlMBS.writeRowsWithIndexes(rowIndexes as NSIndexSetMBS, pboard as NSPasteboardMBS) as boolean
event, Cocoa Controls, MBS CocoaControls Plugin (NSTableControl), control NSTableControlMBS,
Plugin version: 17.1, Mac: Yes, Win: No, Linux: No, Console & Web: No, Feedback.

Function: Returns a Boolean value that indicates whether a drag operation is allowed.
Notes:
rowIndexes: An index set of row numbers that will be participating in the drag.
pboard: The pasteboard to which to write the drag data.

Returns true if the drag operation is allowed, false otherwise.

Called by TableView after it has been determined that a drag should begin, but before the drag has been started.
To refuse the drag, return false. To start a drag, return true 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 true.

Previous items

The items on this page are in the following plugins: MBS CocoaControls Plugin.




Links
MBS Xojo blog