Right-clicking outside the column bounds previously attempted to retrieve the CPTableColumn at index -1, raising an exception that prevented the contextual menu from displaying. The menu delegate now receives nil for the column parameter in this case, matching the documented delegate contract.
Includes two unit tests covering context clicks on a populated row and outside the column bounds (with the table hosted inside a CPScrollView so the view extends beyond its column widths).
Previously, clicking a control cell (such as a checkbox) in a
non-editable column mutated its value and committed the change because
-_hitTest: routed non-text-field control cell mouse-downs to the
control without checking whether the column was editable.
Matching AppKit, control cells in non-editable columns no longer handle
the click, allowing the table view to select the row instead.
-_enumerateViewsInRows:columns:usingBlock: and
-_enumerateViewsInRows:tableColumns:usingBlock: previously executed a run loop
pass before visiting views. Running timers, delayed performs, and the display
server mid-operation caused views to render prematurely before load, selection,
or expansion changes completed.
- CPTableView: Restrict -_enumerateViewsInRows:columns:usingBlock: and
-_enumerateViewsInRows:tableColumns:usingBlock: to enumerating existing
views without pumping the run loop.
- CPTableView: Call -layoutIfNeeded to complete reloads in
-enumerateAvailableViewsUsingBlock: and -removeTableColumn:.
- Tests: Update tests affected by the removal of the implicit run loop pass
and the interaction test helper fix—dispatch events once through the
application in the interaction test helper (which command-click and
shift-click tests depend on), force layout prior to assertions in the reload
and lazy preparation tests, and target clicks below the rows of a
scroll-view-hosted table in the click-outside tests.
Returning a flag constant instead of evaluating it allowed tables and outlines to initiate double-click edits even when neither the data source nor a binding supported storing the value.
- CPTableView: Evaluate the setObjectValue capability against implemented
data source methods rather than returning a static flag constant.
- CPTableView: Track click slop on all clicks to ensure bound tables correctly reject edits after pointer movement.
- CPOutlineView: Test whether the outline data source implements -outlineView:setObjectValue:forTableColumn:byItem: rather than inheriting the table view check.
- CPTableViewInteractionTest: Add tests covering read-only data sources, bound tables, and movements within and beyond click slop thresholds.
- CPOutlineViewInteractionTest: Add tests for outline data sources with and without -outlineView:setObjectValue:forTableColumn:byItem:.
Protects the selection, editing and drag and drop contracts of tables and
outlines by verifying the events, delegate calls and data source calls that
applications depend on. A drop retargeted between the children of an item is
delivered to that item.
* CPOutlineView: Set the retargeted drop operation in
setDropItem:dropChildIndex:.
* CPTableViewInteractionTest: Verify selection by mouse and keyboard, editing,
drag initiation and drop handling, including refusal and retargeting by the
delegate and data source.
* CPOutlineViewInteractionTest: Verify dragged items, proposed parents and child
indexes, drop retargeting, and expansion and its cancellation during a hover.