From 8a8a9ad46083c94ef1fd462e182ca310005b2747 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Mon, 6 Apr 2026 10:00:12 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20cappucci?= =?UTF-8?q?no/cappuccino@c4032ecd1d28b10253fc865468b8f15b868f581c=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppKit/Browser.environment/AppKit.sj | 41 ++- .../AppKit/CommonJS.environment/AppKit.sj | 41 ++- Resources/CPOutlineViewTest/AppController.j | 13 + Resources/TableTest/DataView/AppController.j | 24 ++ Resources/recipes.txt | 290 +++++++++--------- 5 files changed, 254 insertions(+), 155 deletions(-) diff --git a/Frameworks/AppKit/Browser.environment/AppKit.sj b/Frameworks/AppKit/Browser.environment/AppKit.sj index 04a009db7..931700053 100644 --- a/Frameworks/AppKit/Browser.environment/AppKit.sj +++ b/Frameworks/AppKit/Browser.environment/AppKit.sj @@ -21652,7 +21652,7 @@ class_addMethods(meta_class, [new objj_method(sel_getUid("openPanel"), function ,["id"])]); } -p;15;CPOutlineView.jt;124374;@STATIC;1.0;i;10;CPButton.ji;15;CPTableColumn.ji;13;CPTableView.jt;124300;objj_executeFile("CPButton.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableView.j", YES);CPOutlineViewColumnDidMoveNotification = "CPOutlineViewColumnDidMoveNotification"; +p;15;CPOutlineView.jt;126416;@STATIC;1.0;i;10;CPButton.ji;15;CPTableColumn.ji;13;CPTableView.jt;126342;objj_executeFile("CPButton.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableView.j", YES);CPOutlineViewColumnDidMoveNotification = "CPOutlineViewColumnDidMoveNotification"; CPOutlineViewColumnDidResizeNotification = "CPOutlineViewColumnDidResizeNotification"; CPOutlineViewItemDidCollapseNotification = "CPOutlineViewItemDidCollapseNotification"; CPOutlineViewItemDidExpandNotification = "CPOutlineViewItemDidExpandNotification"; @@ -22367,7 +22367,21 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithFrame:"), funct return (objj_getClass("CPOutlineView").super_class.method_dtable["frameOfDataViewAtColumn:row:"] || _objj_forward)(self, "frameOfDataViewAtColumn:row:", aColumn, aRow); } -,["CGRect","CPInteger","CPInteger"]), new objj_method(sel_getUid("setDropItem:dropChildIndex:"), function $CPOutlineView__setDropItem_dropChildIndex_(self, _cmd, theItem, theIndex) +,["CGRect","CPInteger","CPInteger"]), new objj_method(sel_getUid("_applyToolTipToDataView:forTableColumn:row:"), function $CPOutlineView___applyToolTipToDataView_forTableColumn_row_(self, _cmd, aDataView, aTableColumn, aRow) +{ + if (self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_toolTipForView_rect_tableColumn_item_mouseLocation_) + { + var item = (self.isa.method_msgSend["itemAtRow:"] || _objj_forward)(self, "itemAtRow:", aRow), + tooltip = (self.isa.method_msgSend["_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:"] || _objj_forward)(self, "_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:", aDataView, (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["frame"] || _objj_forward)(aDataView, "frame")), aTableColumn, item, CGPointMakeZero()); + (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["setToolTip:"] || _objj_forward)(aDataView, "setToolTip:", tooltip)); + } + else + { + (objj_getClass("CPOutlineView").super_class.method_dtable["_applyToolTipToDataView:forTableColumn:row:"] || _objj_forward)(self, "_applyToolTipToDataView:forTableColumn:row:", aDataView, aTableColumn, aRow); + } +} + +,["void","CPView","CPTableColumn","CPInteger"]), new objj_method(sel_getUid("setDropItem:dropChildIndex:"), function $CPOutlineView__setDropItem_dropChildIndex_(self, _cmd, theItem, theIndex) { if (self._dropItem !== theItem && theIndex < 0 && (self.isa.method_msgSend["isExpandable:"] || _objj_forward)(self, "isExpandable:", theItem) && !(self.isa.method_msgSend["isItemExpanded:"] || _objj_forward)(self, "isItemExpanded:", theItem)) { @@ -22814,7 +22828,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithFrame:"), funct var ___r1; } -,["void","CPTableView","CPArray"]), new objj_method(sel_getUid("tableView:shouldSelectRow:"), function $CPOutlineView__tableView_shouldSelectRow_(self, _cmd, theTableView, theRow) +,["void","CPTableView","CPArray"]), new objj_method(sel_getUid("_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:"), function $CPOutlineView___sendDelegateToolTipForView_rect_tableColumn_item_mouseLocation_(self, _cmd, aView, aRect, aTableColumn, anItem, aPoint) +{ + if (!(self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_toolTipForView_rect_tableColumn_item_mouseLocation_)) + return nil; + return ((___r1 = self._outlineViewDelegate), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["outlineView:toolTipForView:rect:tableColumn:item:mouseLocation:"] || _objj_forward)(___r1, "outlineView:toolTipForView:rect:tableColumn:item:mouseLocation:", self, aView, aRect, aTableColumn, anItem, aPoint)); + var ___r1; +} + +,["CPString","id","CGRect","CPTableColumn","id","CGPoint"]), new objj_method(sel_getUid("tableView:shouldSelectRow:"), function $CPOutlineView__tableView_shouldSelectRow_(self, _cmd, theTableView, theRow) { return !(self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_) || ((___r1 = self._outlineViewDelegate), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["outlineView:shouldSelectItem:"] || _objj_forward)(___r1, "outlineView:shouldSelectItem:", self, (self.isa.method_msgSend["itemAtRow:"] || _objj_forward)(self, "itemAtRow:", theRow))); var ___r1; @@ -34223,7 +34245,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_ ,["void","CPCoder"])]); } -p;13;CPTableView.jt;325226;@STATIC;1.0;I;20;Foundation/CPArray.jI;23;Foundation/CPIndexSet.ji;24;CPDragServer_Constants.ji;12;CGGradient.ji;7;CPCib.ji;17;CPCompatibility.ji;11;CPControl.ji;13;CPImageView.ji;12;CPScroller.ji;14;CPScrollView.ji;15;CPTableColumn.ji;19;CPTableHeaderView.ji;8;CPText.ji;15;_CPCornerView.jt;324927;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPIndexSet.j", NO);objj_executeFile("CPDragServer_Constants.j", YES);objj_executeFile("CGGradient.j", YES);objj_executeFile("CPCib.j", YES);objj_executeFile("CPCompatibility.j", YES);objj_executeFile("CPControl.j", YES);objj_executeFile("CPImageView.j", YES);objj_executeFile("CPScroller.j", YES);objj_executeFile("CPScrollView.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableHeaderView.j", YES);objj_executeFile("CPText.j", YES);objj_executeFile("_CPCornerView.j", YES);CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; +p;13;CPTableView.jt;326290;@STATIC;1.0;I;20;Foundation/CPArray.jI;23;Foundation/CPIndexSet.ji;24;CPDragServer_Constants.ji;12;CGGradient.ji;7;CPCib.ji;17;CPCompatibility.ji;11;CPControl.ji;13;CPImageView.ji;12;CPScroller.ji;14;CPScrollView.ji;15;CPTableColumn.ji;19;CPTableHeaderView.ji;8;CPText.ji;15;_CPCornerView.jt;325991;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPIndexSet.j", NO);objj_executeFile("CPDragServer_Constants.j", YES);objj_executeFile("CGGradient.j", YES);objj_executeFile("CPCib.j", YES);objj_executeFile("CPCompatibility.j", YES);objj_executeFile("CPControl.j", YES);objj_executeFile("CPImageView.j", YES);objj_executeFile("CPScroller.j", YES);objj_executeFile("CPScrollView.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableHeaderView.j", YES);objj_executeFile("CPText.j", YES);objj_executeFile("_CPCornerView.j", YES);CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; CPTableViewColumnDidResizeNotification = "CPTableViewColumnDidResizeNotification"; CPTableViewSelectionDidChangeNotification = "CPTableViewSelectionDidChangeNotification"; CPTableViewSelectionIsChangingNotification = "CPTableViewSelectionIsChangingNotification"; @@ -36274,11 +36296,20 @@ class_addMethods(the_class, [new objj_method(sel_getUid("disableAutomaticResizin if (!self._isViewBased) (self.isa.method_msgSend["_setEditingState:forView:"] || _objj_forward)(self, "_setEditingState:forView:", NO, dataView); (self.isa.method_msgSend["_sendDelegateWillDisplayView:forTableColumn:row:"] || _objj_forward)(self, "_sendDelegateWillDisplayView:forTableColumn:row:", dataView, tableColumn, row); + (self.isa.method_msgSend["_applyToolTipToDataView:forTableColumn:row:"] || _objj_forward)(self, "_applyToolTipToDataView:forTableColumn:row:", dataView, tableColumn, row); return dataView; var ___r1; } -,["CPView","CPInteger","CPInteger","BOOL"]), new objj_method(sel_getUid("_setObjectValueForTableColumn:row:forView:"), function $CPTableView___setObjectValueForTableColumn_row_forView_(self, _cmd, aTableColumn, aRow, aDataView) +,["CPView","CPInteger","CPInteger","BOOL"]), new objj_method(sel_getUid("_applyToolTipToDataView:forTableColumn:row:"), function $CPTableView___applyToolTipToDataView_forTableColumn_row_(self, _cmd, aDataView, aTableColumn, aRow) +{ + var tooltip = nil; + if (self._implementedDelegateMethods & CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_) + tooltip = (self.isa.method_msgSend["_sendDelegateToolTipForView:rect:tableColumn:row:mouseLocation:"] || _objj_forward)(self, "_sendDelegateToolTipForView:rect:tableColumn:row:mouseLocation:", aDataView, (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["frame"] || _objj_forward)(aDataView, "frame")), aTableColumn, aRow, CGPointMakeZero()); + (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["setToolTip:"] || _objj_forward)(aDataView, "setToolTip:", tooltip)); +} + +,["void","CPView","CPTableColumn","CPInteger"]), new objj_method(sel_getUid("_setObjectValueForTableColumn:row:forView:"), function $CPTableView___setObjectValueForTableColumn_row_forView_(self, _cmd, aTableColumn, aRow, aDataView) { (self.isa.method_msgSend["_setObjectValueForTableColumn:row:forView:useCache:"] || _objj_forward)(self, "_setObjectValueForTableColumn:row:forView:useCache:", aTableColumn, aRow, aDataView, !self._invalidateObjectValuesCache); } diff --git a/Frameworks/AppKit/CommonJS.environment/AppKit.sj b/Frameworks/AppKit/CommonJS.environment/AppKit.sj index 43d8b1e08..13ae18207 100644 --- a/Frameworks/AppKit/CommonJS.environment/AppKit.sj +++ b/Frameworks/AppKit/CommonJS.environment/AppKit.sj @@ -20888,7 +20888,7 @@ class_addMethods(meta_class, [new objj_method(sel_getUid("openPanel"), function ,["id"])]); } -p;15;CPOutlineView.jt;124374;@STATIC;1.0;i;10;CPButton.ji;15;CPTableColumn.ji;13;CPTableView.jt;124300;objj_executeFile("CPButton.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableView.j", YES);CPOutlineViewColumnDidMoveNotification = "CPOutlineViewColumnDidMoveNotification"; +p;15;CPOutlineView.jt;126416;@STATIC;1.0;i;10;CPButton.ji;15;CPTableColumn.ji;13;CPTableView.jt;126342;objj_executeFile("CPButton.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableView.j", YES);CPOutlineViewColumnDidMoveNotification = "CPOutlineViewColumnDidMoveNotification"; CPOutlineViewColumnDidResizeNotification = "CPOutlineViewColumnDidResizeNotification"; CPOutlineViewItemDidCollapseNotification = "CPOutlineViewItemDidCollapseNotification"; CPOutlineViewItemDidExpandNotification = "CPOutlineViewItemDidExpandNotification"; @@ -21603,7 +21603,21 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithFrame:"), funct return (objj_getClass("CPOutlineView").super_class.method_dtable["frameOfDataViewAtColumn:row:"] || _objj_forward)(self, "frameOfDataViewAtColumn:row:", aColumn, aRow); } -,["CGRect","CPInteger","CPInteger"]), new objj_method(sel_getUid("setDropItem:dropChildIndex:"), function $CPOutlineView__setDropItem_dropChildIndex_(self, _cmd, theItem, theIndex) +,["CGRect","CPInteger","CPInteger"]), new objj_method(sel_getUid("_applyToolTipToDataView:forTableColumn:row:"), function $CPOutlineView___applyToolTipToDataView_forTableColumn_row_(self, _cmd, aDataView, aTableColumn, aRow) +{ + if (self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_toolTipForView_rect_tableColumn_item_mouseLocation_) + { + var item = (self.isa.method_msgSend["itemAtRow:"] || _objj_forward)(self, "itemAtRow:", aRow), + tooltip = (self.isa.method_msgSend["_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:"] || _objj_forward)(self, "_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:", aDataView, (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["frame"] || _objj_forward)(aDataView, "frame")), aTableColumn, item, CGPointMakeZero()); + (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["setToolTip:"] || _objj_forward)(aDataView, "setToolTip:", tooltip)); + } + else + { + (objj_getClass("CPOutlineView").super_class.method_dtable["_applyToolTipToDataView:forTableColumn:row:"] || _objj_forward)(self, "_applyToolTipToDataView:forTableColumn:row:", aDataView, aTableColumn, aRow); + } +} + +,["void","CPView","CPTableColumn","CPInteger"]), new objj_method(sel_getUid("setDropItem:dropChildIndex:"), function $CPOutlineView__setDropItem_dropChildIndex_(self, _cmd, theItem, theIndex) { if (self._dropItem !== theItem && theIndex < 0 && (self.isa.method_msgSend["isExpandable:"] || _objj_forward)(self, "isExpandable:", theItem) && !(self.isa.method_msgSend["isItemExpanded:"] || _objj_forward)(self, "isItemExpanded:", theItem)) { @@ -22050,7 +22064,15 @@ class_addMethods(the_class, [new objj_method(sel_getUid("initWithFrame:"), funct var ___r1; } -,["void","CPTableView","CPArray"]), new objj_method(sel_getUid("tableView:shouldSelectRow:"), function $CPOutlineView__tableView_shouldSelectRow_(self, _cmd, theTableView, theRow) +,["void","CPTableView","CPArray"]), new objj_method(sel_getUid("_sendDelegateToolTipForView:rect:tableColumn:item:mouseLocation:"), function $CPOutlineView___sendDelegateToolTipForView_rect_tableColumn_item_mouseLocation_(self, _cmd, aView, aRect, aTableColumn, anItem, aPoint) +{ + if (!(self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_toolTipForView_rect_tableColumn_item_mouseLocation_)) + return nil; + return ((___r1 = self._outlineViewDelegate), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["outlineView:toolTipForView:rect:tableColumn:item:mouseLocation:"] || _objj_forward)(___r1, "outlineView:toolTipForView:rect:tableColumn:item:mouseLocation:", self, aView, aRect, aTableColumn, anItem, aPoint)); + var ___r1; +} + +,["CPString","id","CGRect","CPTableColumn","id","CGPoint"]), new objj_method(sel_getUid("tableView:shouldSelectRow:"), function $CPOutlineView__tableView_shouldSelectRow_(self, _cmd, theTableView, theRow) { return !(self._implementedOutlineViewDelegateMethods & CPOutlineViewDelegate_outlineView_shouldSelectItem_) || ((___r1 = self._outlineViewDelegate), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["outlineView:shouldSelectItem:"] || _objj_forward)(___r1, "outlineView:shouldSelectItem:", self, (self.isa.method_msgSend["itemAtRow:"] || _objj_forward)(self, "itemAtRow:", theRow))); var ___r1; @@ -33357,7 +33379,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_ ,["void","CPCoder"])]); } -p;13;CPTableView.jt;325226;@STATIC;1.0;I;20;Foundation/CPArray.jI;23;Foundation/CPIndexSet.ji;24;CPDragServer_Constants.ji;12;CGGradient.ji;7;CPCib.ji;17;CPCompatibility.ji;11;CPControl.ji;13;CPImageView.ji;12;CPScroller.ji;14;CPScrollView.ji;15;CPTableColumn.ji;19;CPTableHeaderView.ji;8;CPText.ji;15;_CPCornerView.jt;324927;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPIndexSet.j", NO);objj_executeFile("CPDragServer_Constants.j", YES);objj_executeFile("CGGradient.j", YES);objj_executeFile("CPCib.j", YES);objj_executeFile("CPCompatibility.j", YES);objj_executeFile("CPControl.j", YES);objj_executeFile("CPImageView.j", YES);objj_executeFile("CPScroller.j", YES);objj_executeFile("CPScrollView.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableHeaderView.j", YES);objj_executeFile("CPText.j", YES);objj_executeFile("_CPCornerView.j", YES);CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; +p;13;CPTableView.jt;326290;@STATIC;1.0;I;20;Foundation/CPArray.jI;23;Foundation/CPIndexSet.ji;24;CPDragServer_Constants.ji;12;CGGradient.ji;7;CPCib.ji;17;CPCompatibility.ji;11;CPControl.ji;13;CPImageView.ji;12;CPScroller.ji;14;CPScrollView.ji;15;CPTableColumn.ji;19;CPTableHeaderView.ji;8;CPText.ji;15;_CPCornerView.jt;325991;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPIndexSet.j", NO);objj_executeFile("CPDragServer_Constants.j", YES);objj_executeFile("CGGradient.j", YES);objj_executeFile("CPCib.j", YES);objj_executeFile("CPCompatibility.j", YES);objj_executeFile("CPControl.j", YES);objj_executeFile("CPImageView.j", YES);objj_executeFile("CPScroller.j", YES);objj_executeFile("CPScrollView.j", YES);objj_executeFile("CPTableColumn.j", YES);objj_executeFile("CPTableHeaderView.j", YES);objj_executeFile("CPText.j", YES);objj_executeFile("_CPCornerView.j", YES);CPTableViewColumnDidMoveNotification = "CPTableViewColumnDidMoveNotification"; CPTableViewColumnDidResizeNotification = "CPTableViewColumnDidResizeNotification"; CPTableViewSelectionDidChangeNotification = "CPTableViewSelectionDidChangeNotification"; CPTableViewSelectionIsChangingNotification = "CPTableViewSelectionIsChangingNotification"; @@ -35408,11 +35430,20 @@ class_addMethods(the_class, [new objj_method(sel_getUid("disableAutomaticResizin if (!self._isViewBased) (self.isa.method_msgSend["_setEditingState:forView:"] || _objj_forward)(self, "_setEditingState:forView:", NO, dataView); (self.isa.method_msgSend["_sendDelegateWillDisplayView:forTableColumn:row:"] || _objj_forward)(self, "_sendDelegateWillDisplayView:forTableColumn:row:", dataView, tableColumn, row); + (self.isa.method_msgSend["_applyToolTipToDataView:forTableColumn:row:"] || _objj_forward)(self, "_applyToolTipToDataView:forTableColumn:row:", dataView, tableColumn, row); return dataView; var ___r1; } -,["CPView","CPInteger","CPInteger","BOOL"]), new objj_method(sel_getUid("_setObjectValueForTableColumn:row:forView:"), function $CPTableView___setObjectValueForTableColumn_row_forView_(self, _cmd, aTableColumn, aRow, aDataView) +,["CPView","CPInteger","CPInteger","BOOL"]), new objj_method(sel_getUid("_applyToolTipToDataView:forTableColumn:row:"), function $CPTableView___applyToolTipToDataView_forTableColumn_row_(self, _cmd, aDataView, aTableColumn, aRow) +{ + var tooltip = nil; + if (self._implementedDelegateMethods & CPTableViewDelegate_tableView_toolTipForView_rect_tableColumn_row_mouseLocation_) + tooltip = (self.isa.method_msgSend["_sendDelegateToolTipForView:rect:tableColumn:row:mouseLocation:"] || _objj_forward)(self, "_sendDelegateToolTipForView:rect:tableColumn:row:mouseLocation:", aDataView, (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["frame"] || _objj_forward)(aDataView, "frame")), aTableColumn, aRow, CGPointMakeZero()); + (aDataView == null ? aDataView : (aDataView.isa.method_msgSend["setToolTip:"] || _objj_forward)(aDataView, "setToolTip:", tooltip)); +} + +,["void","CPView","CPTableColumn","CPInteger"]), new objj_method(sel_getUid("_setObjectValueForTableColumn:row:forView:"), function $CPTableView___setObjectValueForTableColumn_row_forView_(self, _cmd, aTableColumn, aRow, aDataView) { (self.isa.method_msgSend["_setObjectValueForTableColumn:row:forView:useCache:"] || _objj_forward)(self, "_setObjectValueForTableColumn:row:forView:useCache:", aTableColumn, aRow, aDataView, !self._invalidateObjectValuesCache); } diff --git a/Resources/CPOutlineViewTest/AppController.j b/Resources/CPOutlineViewTest/AppController.j index cbab1aed5..c27ff5976 100644 --- a/Resources/CPOutlineViewTest/AppController.j +++ b/Resources/CPOutlineViewTest/AppController.j @@ -308,4 +308,17 @@ var rowHeights = [ ]; return anItem.customHeight; } +- (CPString)outlineView:(CPOutlineView)anOutlineView toolTipForView:(CPView)aView rect:(CGRect)aRect tableColumn:(CPTableColumn)aTableColumn item:(id)anItem mouseLocation:(CGPoint)aPoint +{ + if (anItem === nil) + return nil; + + var title = [anItem title], + childCount = [[anItem children] count], + childString = childCount === 1 ? @"1 child" : childCount + @" children"; + + // Dynamischer Tooltip basierend auf dem 'Menu' Objekt + return [CPString stringWithFormat:@"Outline Node: %@\nContains: %@", title, childString]; +} + @end diff --git a/Resources/TableTest/DataView/AppController.j b/Resources/TableTest/DataView/AppController.j index 9ab88c35b..ec5c38dd1 100644 --- a/Resources/TableTest/DataView/AppController.j +++ b/Resources/TableTest/DataView/AppController.j @@ -64,6 +64,9 @@ var AppControllerInstance = nil; - (void)awakeFromCib { [[tableView tableColumns][0] setDataView:dataView]; + + // Set the delegate so we can test the new toolTip feature + [tableView setDelegate:self]; rows = [ [CPDictionary dictionaryWithJSObject:{ id:1, filename: "Jack.png", size:1327, uploading:NO, progress:0 }], @@ -88,6 +91,27 @@ var AppControllerInstance = nil; return !uploading; } +// -------------------------------------------------------------------------------------- +// Tool tip test +// -------------------------------------------------------------------------------------- +- (CPString)tableView:(CPTableView)aTableView toolTipForView:(CPView)aView rect:(CGRect)aRect tableColumn:(CPTableColumn)aTableColumn row:(CPInteger)aRowIndex mouseLocation:(CGPoint)aPoint +{ + // Make sure the row exists + if (aRowIndex < 0 || aRowIndex >= [rows count]) + return nil; + + var info = [rows objectAtIndex:aRowIndex], + filename = [info valueForKey:@"filename"], + isUploading = [info valueForKey:@"uploading"], + progress = [info valueForKey:@"progress"]; + + // Provide a dynamic tooltip based on the state of the data in the row + if (isUploading) + return [CPString stringWithFormat:@"Uploading '%@' (%d%% complete)", filename, progress]; + + return [CPString stringWithFormat:@"File: %@\nStatus: Idle", filename]; +} + - (@action)start:(id)sender { // Note we use setUploading:YES instead of uploading = YES. diff --git a/Resources/recipes.txt b/Resources/recipes.txt index dcd179a51..65bfe1a28 100644 --- a/Resources/recipes.txt +++ b/Resources/recipes.txt @@ -1,145 +1,145 @@ -1775235700244|ArrayController1| -1775235700258|ArrayControllerInitialSelectionTest| -1775235700271|ArrayControllerRemovingFirstTest| -1775235700284|AttachedSheet| -1775235700298|AttachedSheet2| -1775235700311|Bindings| -1775235700324|CGCanvasContext| -1775235700338|CGPath| -1775235700351|CPAlertTest| -1775235700364|CPAnimatablePropertyContainerTest| -1775235700378|CPAnimationContextTest| -1775235700391|CPAnimationTest| -1775235700405|CPBinder-echo-bug| -1775235700418|CPBoxCibTest| -1775235700432|CPBoxTest| -1775235700445|CPBrowserTest| -1775235700459|CPButtonBarTest| -1775235700472|CPButtonKeyEquivalentDefaultTest| -1775235700486|CPButtonTest| -1775235700500|CPByteCountFormatter| -1775235700513|CPCollectionViewNibTest| -1775235700527|CPColor-CPImage-description| -1775235700540|CPColorWellBindings| -1775235700553|CPComboBoxTest| -1775235700567|CPControlPerformClickExceptionTest| -1775235700580|CPControlSize| -1775235700594|CPCursor| -1775235700607|CPDateFormatterTest| -1775235700621|CPDatePickerTest| -1775235700634|CPDictionaryControllerTest| -1775235700648|CPDocumentControllerTest| -1775235700661|CPFormatterTest| -1775235700675|CPGraphicsTest| -1775235700689|CPImageAndTextViewImageScaling| -1775235700702|CPImageViewAlignmentScaling| -1775235700716|CPImageViewTest| -1775235700729|CPImageViewbindingsTest| -1775235700743|CPLevelIndicator| -1775235700756|CPLocalizationTest| -1775235700770|CPLogTest| -1775235700783|CPMenuCALayerTest| -1775235700797|CPMenuEnabledBindingsTest| -1775235700810|CPMenuKeyEquivalents| -1775235700823|CPMenuRemoveAllTest| -1775235700837|CPMenuSubmenuPlacementConstraints| -1775235700850|CPMenuTest| -1775235700863|CPOutlineViewCibTest| -1775235700877|CPOutlineViewTest| -1775235700890|CPOutlineViewViewBasedCibTest| -1775235700903|CPPanelTest| -1775235700916|CPPlatformWindow| -1775235700930|CPPlattformWindowMinSize| -1775235700943|CPPopUpButtonBindings| -1775235700957|CPPopUpButtonTest| -1775235700970|CPPopover| -1775235700984|CPPredicateEditorCibTest| -1775235700997|CPProgressIndicator| -1775235701011|CPPropertyListSerializationTest| -1775235701024|CPRadioBindings| -1775235701038|CPRuleEditorCibTest| -1775235701051|CPScrollView| -1775235701065|CPScrollView2| -1775235701078|CPSearchField| -1775235701091|CPSearchFieldPredicateBinding| -1775235701105|CPSegmentedControlBindings| -1775235701118|CPSegmentedControlTest| -1775235701131|CPSoundTest| -1775235701145|CPSplitViewDivider| -1775235701158|CPSplitViewTest| -1775235701172|CPStackViewTest| -1775235701185|CPStepperBindings| -1775235701198|CPStepperNibTest| -1775235701212|CPTabView2| -1775235701225|CPTabViewBindings| -1775235701239|CPTabViewNib| -1775235701252|CPTableViewGroupRows| -1775235701265|CPTextField| -1775235701279|CPTextFieldEditingStyleTest| -1775235701293|CPTextFieldHeightTest| -1775235701306|CPTextFieldMovementsTest| -1775235701320|CPTextFieldMultiline| -1775235701333|CPTextView| -1775235701347|CPTextViewCibTest| -1775235701360|CPTextViewDelegateAndNotifications| -1775235701374|CPTimeZone| -1775235701387|CPTokenFieldTest| -1775235701401|CPToolTip| -1775235701414|CPToolbarTest| -1775235701427|CPTreeControllerTest| -1775235701441|CPURLConnectionAsyncTest| -1775235701454|CPURLConnectionSynchronousTest| -1775235701468|CPUserDefaults| -1775235701482|CPUserDefaultsControllerTest| -1775235701495|CPUserNotificationTest| -1775235701509|CPViewController| -1775235701522|CPVisualEffectViewTest| -1775235701536|CPWebViewTest| -1775235701549|CPWebViewTest2| -1775235701562|CPWindowLiveResizeTest| -1775235701576|CPWindowMovableTest| -1775235701589|CPWindowResizeStyle| -1775235701603|ChildWindows| -1775235701616|CompilationTests| -1775235701629|ContinuouslyUpdatesValueBinding| -1775235701643|CopyAndPaste| -1775235701656|CrossOriginTest| -1775235701670|FF4096Test| -1775235701684|FontEnhancementTest| -1775235701697|FontMetricsExplorer| -1775235701711|KeyEquivalents| -1775235701724|KeyViewLoopTest| -1775235701737|KeyWindowInTheBackgroundActivation| -1775235701751|LayoutTest| -1775235701765|LoadTimeTest| -1775235701778|LongBindings| -1775235701792|MobileTest| -1775235701805|MultipleValueBindings| -1775235701819|NSBoxTest| -1775235701832|NSBrowserTest| -1775235701846|NewTextFieldBezel| -1775235701859|Nib2CibAlignment| -1775235701873|Nib2CibBaselineAlignementTest| -1775235701887|Nib2CibSubviewsOrderTest| -1775235701900|NibAppRemixed| -1775235701914|PatternFillTest| -1775235701927|PlatformWindows| -1775235701941|PopUpButtonEscTest| -1775235701954|ScalingTest| -1775235701967|ScalingTest2| -1775235701981|ScrollviewTheming| -1775235701995|SheetWindowOrderFrontIssue| -1775235702008|SimpleBindings2| -1775235702022|SmartFoldersDemo| -1775235702035|TableTest| -1775235702049|ThemeBrowser| -1775235702062|ThemeKitchenSink| -1775235702076|TrackingArea| -1775235702089|UndoRedoWithMenuUpdate| -1775235702103|UserlandNSTest| -1775235702116|layoutEphemeralSubviewTest| -1775235702129|loadDynamicFrameworks| -1775235702143|performKeyEquivalentTest| -1775235702156|predicateWithFormat| -1775235702170|resignFirstResponder-CPControlTextDidEndEditing| -1775235702183|sizeToFitFix| +1775469607887|ArrayController1| +1775469607901|ArrayControllerInitialSelectionTest| +1775469607914|ArrayControllerRemovingFirstTest| +1775469607928|AttachedSheet| +1775469607941|AttachedSheet2| +1775469607954|Bindings| +1775469607967|CGCanvasContext| +1775469607981|CGPath| +1775469607994|CPAlertTest| +1775469608007|CPAnimatablePropertyContainerTest| +1775469608021|CPAnimationContextTest| +1775469608034|CPAnimationTest| +1775469608047|CPBinder-echo-bug| +1775469608060|CPBoxCibTest| +1775469608073|CPBoxTest| +1775469608087|CPBrowserTest| +1775469608100|CPButtonBarTest| +1775469608113|CPButtonKeyEquivalentDefaultTest| +1775469608127|CPButtonTest| +1775469608140|CPByteCountFormatter| +1775469608153|CPCollectionViewNibTest| +1775469608167|CPColor-CPImage-description| +1775469608180|CPColorWellBindings| +1775469608193|CPComboBoxTest| +1775469608206|CPControlPerformClickExceptionTest| +1775469608219|CPControlSize| +1775469608233|CPCursor| +1775469608246|CPDateFormatterTest| +1775469608259|CPDatePickerTest| +1775469608273|CPDictionaryControllerTest| +1775469608286|CPDocumentControllerTest| +1775469608299|CPFormatterTest| +1775469608312|CPGraphicsTest| +1775469608326|CPImageAndTextViewImageScaling| +1775469608339|CPImageViewAlignmentScaling| +1775469608352|CPImageViewTest| +1775469608365|CPImageViewbindingsTest| +1775469608379|CPLevelIndicator| +1775469608392|CPLocalizationTest| +1775469608405|CPLogTest| +1775469608418|CPMenuCALayerTest| +1775469608432|CPMenuEnabledBindingsTest| +1775469608445|CPMenuKeyEquivalents| +1775469608458|CPMenuRemoveAllTest| +1775469608472|CPMenuSubmenuPlacementConstraints| +1775469608485|CPMenuTest| +1775469608498|CPOutlineViewCibTest| +1775469608511|CPOutlineViewTest| +1775469608524|CPOutlineViewViewBasedCibTest| +1775469608538|CPPanelTest| +1775469608551|CPPlatformWindow| +1775469608564|CPPlattformWindowMinSize| +1775469608577|CPPopUpButtonBindings| +1775469608591|CPPopUpButtonTest| +1775469608604|CPPopover| +1775469608617|CPPredicateEditorCibTest| +1775469608630|CPProgressIndicator| +1775469608644|CPPropertyListSerializationTest| +1775469608657|CPRadioBindings| +1775469608670|CPRuleEditorCibTest| +1775469608684|CPScrollView| +1775469608697|CPScrollView2| +1775469608710|CPSearchField| +1775469608723|CPSearchFieldPredicateBinding| +1775469608737|CPSegmentedControlBindings| +1775469608750|CPSegmentedControlTest| +1775469608763|CPSoundTest| +1775469608776|CPSplitViewDivider| +1775469608790|CPSplitViewTest| +1775469608803|CPStackViewTest| +1775469608816|CPStepperBindings| +1775469608830|CPStepperNibTest| +1775469608843|CPTabView2| +1775469608856|CPTabViewBindings| +1775469608869|CPTabViewNib| +1775469608882|CPTableViewGroupRows| +1775469608896|CPTextField| +1775469608909|CPTextFieldEditingStyleTest| +1775469608922|CPTextFieldHeightTest| +1775469608935|CPTextFieldMovementsTest| +1775469608948|CPTextFieldMultiline| +1775469608962|CPTextView| +1775469608975|CPTextViewCibTest| +1775469608988|CPTextViewDelegateAndNotifications| +1775469609001|CPTimeZone| +1775469609014|CPTokenFieldTest| +1775469609028|CPToolTip| +1775469609041|CPToolbarTest| +1775469609054|CPTreeControllerTest| +1775469609068|CPURLConnectionAsyncTest| +1775469609081|CPURLConnectionSynchronousTest| +1775469609094|CPUserDefaults| +1775469609107|CPUserDefaultsControllerTest| +1775469609121|CPUserNotificationTest| +1775469609134|CPViewController| +1775469609147|CPVisualEffectViewTest| +1775469609161|CPWebViewTest| +1775469609174|CPWebViewTest2| +1775469609187|CPWindowLiveResizeTest| +1775469609200|CPWindowMovableTest| +1775469609213|CPWindowResizeStyle| +1775469609227|ChildWindows| +1775469609240|CompilationTests| +1775469609253|ContinuouslyUpdatesValueBinding| +1775469609266|CopyAndPaste| +1775469609280|CrossOriginTest| +1775469609293|FF4096Test| +1775469609306|FontEnhancementTest| +1775469609319|FontMetricsExplorer| +1775469609333|KeyEquivalents| +1775469609346|KeyViewLoopTest| +1775469609359|KeyWindowInTheBackgroundActivation| +1775469609373|LayoutTest| +1775469609386|LoadTimeTest| +1775469609399|LongBindings| +1775469609412|MobileTest| +1775469609426|MultipleValueBindings| +1775469609439|NSBoxTest| +1775469609452|NSBrowserTest| +1775469609465|NewTextFieldBezel| +1775469609479|Nib2CibAlignment| +1775469609492|Nib2CibBaselineAlignementTest| +1775469609505|Nib2CibSubviewsOrderTest| +1775469609519|NibAppRemixed| +1775469609532|PatternFillTest| +1775469609545|PlatformWindows| +1775469609559|PopUpButtonEscTest| +1775469609572|ScalingTest| +1775469609585|ScalingTest2| +1775469609598|ScrollviewTheming| +1775469609612|SheetWindowOrderFrontIssue| +1775469609625|SimpleBindings2| +1775469609638|SmartFoldersDemo| +1775469609651|TableTest| +1775469609665|ThemeBrowser| +1775469609678|ThemeKitchenSink| +1775469609691|TrackingArea| +1775469609704|UndoRedoWithMenuUpdate| +1775469609717|UserlandNSTest| +1775469609731|layoutEphemeralSubviewTest| +1775469609744|loadDynamicFrameworks| +1775469609757|performKeyEquivalentTest| +1775469609771|predicateWithFormat| +1775469609784|resignFirstResponder-CPControlTextDidEndEditing| +1775469609797|sizeToFitFix|