Deploying to gh-pages from @ cappuccino/cappuccino@7c81471a3a 🚀

This commit is contained in:
daboe01
2025-12-26 10:37:35 +00:00
parent 3435d0ac20
commit ffc2cf1d6f
4 changed files with 205 additions and 145 deletions
@@ -60100,7 +60100,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_
,["void","CPTheme"])]);
}
p;8;CPMenu.jt;74963;@STATIC;1.0;I;20;Foundation/CPArray.jI;25;Foundation/CPDictionary.jI;33;Foundation/CPNotificationCenter.jI;21;Foundation/CPString.ji;19;CPKeyValueBinding.ji;12;CPMenuItem.ji;9;CALayer.ji;18;_CPMenuBarWindow.ji;15;_CPMenuWindow.jt;74727;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPDictionary.j", NO);objj_executeFile("Foundation/CPNotificationCenter.j", NO);objj_executeFile("Foundation/CPString.j", NO);objj_executeFile("CPKeyValueBinding.j", YES);objj_executeFile("CPMenuItem.j", YES);objj_executeFile("CALayer.j", YES);{var the_protocol = objj_allocateProtocol("CPMenuDelegate");
p;8;CPMenu.jt;75233;@STATIC;1.0;I;20;Foundation/CPArray.jI;25;Foundation/CPDictionary.jI;33;Foundation/CPNotificationCenter.jI;21;Foundation/CPString.ji;19;CPKeyValueBinding.ji;12;CPMenuItem.ji;9;CALayer.ji;18;_CPMenuBarWindow.ji;15;_CPMenuWindow.jt;74997;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPDictionary.j", NO);objj_executeFile("Foundation/CPNotificationCenter.j", NO);objj_executeFile("Foundation/CPString.j", NO);objj_executeFile("CPKeyValueBinding.j", YES);objj_executeFile("CPMenuItem.j", YES);objj_executeFile("CALayer.j", YES);{var the_protocol = objj_allocateProtocol("CPMenuDelegate");
var aProtocol = objj_getProtocol("CPObject");
if (!aProtocol) throw new SyntaxError("*** Could not find definition for protocol \"CPMenuDelegate\"");
protocol_addProtocol(the_protocol, aProtocol);
@@ -60196,6 +60196,8 @@ class_addMethods(the_class, [new objj_method(sel_getUid("menuBarHeight"), functi
{
if ((aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["menu"] || _objj_forward)(aMenuItem, "menu")) !== self || !self._items)
return;
if (self._menuWindow)
((___r1 = ((___r2 = self._menuWindow), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["_menuView"] || _objj_forward)(___r2, "_menuView"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tile"] || _objj_forward)(___r1, "tile"));
(aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["setValue:forKey:"] || _objj_forward)(aMenuItem, "setValue:forKey:", (aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["valueForKey:"] || _objj_forward)(aMenuItem, "valueForKey:", "changeCount")) + 1, "changeCount"));
((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:userInfo:"] || _objj_forward)(___r1, "postNotificationName:object:userInfo:", CPMenuDidChangeItemNotification, self, (___r2 = (CPDictionary.isa.method_msgSend["alloc"] || _objj_forward)(CPDictionary, "alloc"), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["initWithObjects:forKeys:"] || _objj_forward)(___r2, "initWithObjects:forKeys:", [((___r3 = self._items), ___r3 == null ? ___r3 : (___r3.isa.method_msgSend["indexOfObjectIdenticalTo:"] || _objj_forward)(___r3, "indexOfObjectIdenticalTo:", aMenuItem))], ["CPMenuItemIndex"]))));
var ___r1, ___r2, ___r3;
@@ -57995,7 +57995,7 @@ var meta_class = the_class.isa;class_addMethods(the_class, [new objj_method(sel_
,["void","CPTheme"])]);
}
p;8;CPMenu.jt;74710;@STATIC;1.0;I;20;Foundation/CPArray.jI;25;Foundation/CPDictionary.jI;33;Foundation/CPNotificationCenter.jI;21;Foundation/CPString.ji;19;CPKeyValueBinding.ji;12;CPMenuItem.ji;9;CALayer.ji;18;_CPMenuBarWindow.ji;15;_CPMenuWindow.jt;74474;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPDictionary.j", NO);objj_executeFile("Foundation/CPNotificationCenter.j", NO);objj_executeFile("Foundation/CPString.j", NO);objj_executeFile("CPKeyValueBinding.j", YES);objj_executeFile("CPMenuItem.j", YES);objj_executeFile("CALayer.j", YES);{var the_protocol = objj_allocateProtocol("CPMenuDelegate");
p;8;CPMenu.jt;74980;@STATIC;1.0;I;20;Foundation/CPArray.jI;25;Foundation/CPDictionary.jI;33;Foundation/CPNotificationCenter.jI;21;Foundation/CPString.ji;19;CPKeyValueBinding.ji;12;CPMenuItem.ji;9;CALayer.ji;18;_CPMenuBarWindow.ji;15;_CPMenuWindow.jt;74744;objj_executeFile("Foundation/CPArray.j", NO);objj_executeFile("Foundation/CPDictionary.j", NO);objj_executeFile("Foundation/CPNotificationCenter.j", NO);objj_executeFile("Foundation/CPString.j", NO);objj_executeFile("CPKeyValueBinding.j", YES);objj_executeFile("CPMenuItem.j", YES);objj_executeFile("CALayer.j", YES);{var the_protocol = objj_allocateProtocol("CPMenuDelegate");
var aProtocol = objj_getProtocol("CPObject");
if (!aProtocol) throw new SyntaxError("*** Could not find definition for protocol \"CPMenuDelegate\"");
protocol_addProtocol(the_protocol, aProtocol);
@@ -58091,6 +58091,8 @@ class_addMethods(the_class, [new objj_method(sel_getUid("menuBarHeight"), functi
{
if ((aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["menu"] || _objj_forward)(aMenuItem, "menu")) !== self || !self._items)
return;
if (self._menuWindow)
((___r1 = ((___r2 = self._menuWindow), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["_menuView"] || _objj_forward)(___r2, "_menuView"))), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["tile"] || _objj_forward)(___r1, "tile"));
(aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["setValue:forKey:"] || _objj_forward)(aMenuItem, "setValue:forKey:", (aMenuItem == null ? aMenuItem : (aMenuItem.isa.method_msgSend["valueForKey:"] || _objj_forward)(aMenuItem, "valueForKey:", "changeCount")) + 1, "changeCount"));
((___r1 = (CPNotificationCenter.isa.method_msgSend["defaultCenter"] || _objj_forward)(CPNotificationCenter, "defaultCenter")), ___r1 == null ? ___r1 : (___r1.isa.method_msgSend["postNotificationName:object:userInfo:"] || _objj_forward)(___r1, "postNotificationName:object:userInfo:", CPMenuDidChangeItemNotification, self, (___r2 = (CPDictionary.isa.method_msgSend["alloc"] || _objj_forward)(CPDictionary, "alloc"), ___r2 == null ? ___r2 : (___r2.isa.method_msgSend["initWithObjects:forKeys:"] || _objj_forward)(___r2, "initWithObjects:forKeys:", [((___r3 = self._items), ___r3 == null ? ___r3 : (___r3.isa.method_msgSend["indexOfObjectIdenticalTo:"] || _objj_forward)(___r3, "indexOfObjectIdenticalTo:", aMenuItem))], ["CPMenuItemIndex"]))));
var ___r1, ___r2, ___r3;
@@ -3,6 +3,7 @@
* CPMenuTest
*
* Created by Daniel Boehringer 2025 for submenu constraints on the rightmost end of the screen.
* Updated for Issue #3149 (Immediate menu updates).
*/
@@ -12,6 +13,11 @@
{
CPWindow theWindow;
BOOL _isEnabled;
// Ivars for Live Update Test
CPMenuItem _changeTitleItem;
CPMenuItem _changeStateItem;
CPMenuItem _changeEnabledItem;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
@@ -57,6 +63,28 @@
var dummyMenuItem2 = [mainMenu addItemWithTitle:@"Dummy Menu 2" action:nil keyEquivalent:@""];
[mainMenu setSubmenu:dummyMenu2 forItem:dummyMenuItem2];
// -------------------------------------------------------------------------
// TEST ADDITION FOR ISSUE #3149: Immediate Updates
// -------------------------------------------------------------------------
var liveUpdateMenu = [[CPMenu alloc] initWithTitle:@"Live Update"],
liveUpdateMenuItem = [mainMenu addItemWithTitle:@"Live Update" action:nil keyEquivalent:@""];
// Disable auto-enable so we can manually test setEnabled: on items without actions
[liveUpdateMenu setAutoenablesItems:NO];
[mainMenu setSubmenu:liveUpdateMenu forItem:liveUpdateMenuItem];
[liveUpdateMenu addItemWithTitle:@"1. Click 'Start Timer' below" action:nil keyEquivalent:@""];
[liveUpdateMenu addItemWithTitle:@"2. Keep this menu OPEN" action:nil keyEquivalent:@""];
[liveUpdateMenu addItem:[CPMenuItem separatorItem]];
_changeTitleItem = [liveUpdateMenu addItemWithTitle:@"Title will change in 3s" action:nil keyEquivalent:@""];
_changeStateItem = [liveUpdateMenu addItemWithTitle:@"State will change in 3s" action:nil keyEquivalent:@""];
_changeEnabledItem = [liveUpdateMenu addItemWithTitle:@"Enabled will change in 3s" action:nil keyEquivalent:@""];
[liveUpdateMenu addItem:[CPMenuItem separatorItem]];
[liveUpdateMenu addItemWithTitle:@"Start 3s Timer" action:@selector(startUpdateTimer:) keyEquivalent:@""];
// -------------------------------------------------------------------------
// 2. Create the right-most menu with submenus for testing.
var rightTestMenu = [[CPMenu alloc] initWithTitle:@"Right-Side Test"],
@@ -106,4 +134,32 @@
return YES;
}
// -------------------------------------------------------------------------
// Live Update Test Actions
// -------------------------------------------------------------------------
- (void)startUpdateTimer:(id)sender
{
// Reset state
[_changeTitleItem setTitle:@"Title will change in 3s"];
[_changeStateItem setState:CPOffState];
[_changeStateItem setTitle:@"State will change in 3s"];
[_changeEnabledItem setEnabled:YES];
[_changeEnabledItem setTitle:@"Enabled will change in 3s"];
// Trigger update
[self performSelector:@selector(performLiveUpdate) withObject:nil afterDelay:3.0];
}
- (void)performLiveUpdate
{
[_changeTitleItem setTitle:@"Title Changed!"];
[_changeStateItem setState:CPOnState];
[_changeStateItem setTitle:@"State Changed! (Checked)"];
[_changeEnabledItem setEnabled:NO];
[_changeEnabledItem setTitle:@"Enabled Changed! (Disabled)"];
}
@end
+143 -143
View File
@@ -1,143 +1,143 @@
1766744525733|ArrayController1|
1766744525747|ArrayControllerInitialSelectionTest|
1766744525760|ArrayControllerRemovingFirstTest|
1766744525774|AttachedSheet|
1766744525787|AttachedSheet2|
1766744525801|Bindings|
1766744525814|CGCanvasContext|
1766744525827|CGPath|
1766744525841|CPAlertTest|
1766744525854|CPAnimatablePropertyContainerTest|
1766744525867|CPAnimationContextTest|
1766744525881|CPAnimationTest|
1766744525895|CPBinder-echo-bug|
1766744525908|CPBoxCibTest|
1766744525922|CPBoxTest|
1766744525936|CPBrowserTest|
1766744525949|CPButtonKeyEquivalentDefaultTest|
1766744525963|CPButtonTest|
1766744525976|CPByteCountFormatter|
1766744525990|CPCollectionViewNibTest|
1766744526003|CPColor-CPImage-description|
1766744526017|CPColorWellBindings|
1766744526030|CPComboBoxTest|
1766744526043|CPControlPerformClickExceptionTest|
1766744526057|CPControlSize|
1766744526071|CPCursor|
1766744526084|CPDateFormatterTest|
1766744526098|CPDatePickerTest|
1766744526111|CPDictionaryControllerTest|
1766744526124|CPDocumentControllerTest|
1766744526138|CPFormatterTest|
1766744526151|CPGraphicsTest|
1766744526164|CPImageAndTextViewImageScaling|
1766744526178|CPImageViewAlignmentScaling|
1766744526191|CPImageViewTest|
1766744526204|CPImageViewbindingsTest|
1766744526218|CPLevelIndicator|
1766744526231|CPLocalizationTest|
1766744526244|CPLogTest|
1766744526258|CPMenuCALayerTest|
1766744526271|CPMenuEnabledBindingsTest|
1766744526284|CPMenuKeyEquivalents|
1766744526297|CPMenuRemoveAllTest|
1766744526311|CPMenuSubmenuPlacementConstraints|
1766744526324|CPMenuTest|
1766744526337|CPOutlineViewCibTest|
1766744526351|CPOutlineViewTest|
1766744526364|CPOutlineViewViewBasedCibTest|
1766744526377|CPPanelTest|
1766744526391|CPPlatformWindow|
1766744526404|CPPlattformWindowMinSize|
1766744526417|CPPopUpButtonBindings|
1766744526431|CPPopUpButtonTest|
1766744526444|CPPopover|
1766744526457|CPPredicateEditorCibTest|
1766744526470|CPProgressIndicator|
1766744526484|CPPropertyListSerializationTest|
1766744526497|CPRadioBindings|
1766744526510|CPRuleEditorCibTest|
1766744526524|CPScrollView|
1766744526537|CPScrollView2|
1766744526551|CPSearchField|
1766744526564|CPSearchFieldPredicateBinding|
1766744526577|CPSegmentedControlBindings|
1766744526591|CPSegmentedControlTest|
1766744526604|CPSoundTest|
1766744526617|CPSplitViewDivider|
1766744526630|CPSplitViewTest|
1766744526644|CPStackViewTest|
1766744526657|CPStepperBindings|
1766744526670|CPStepperNibTest|
1766744526684|CPTabView2|
1766744526697|CPTabViewBindings|
1766744526710|CPTabViewNib|
1766744526723|CPTableViewGroupRows|
1766744526737|CPTextField|
1766744526750|CPTextFieldEditingStyleTest|
1766744526763|CPTextFieldHeightTest|
1766744526777|CPTextFieldMovementsTest|
1766744526790|CPTextFieldMultiline|
1766744526803|CPTextView|
1766744526817|CPTextViewCibTest|
1766744526830|CPTextViewDelegateAndNotifications|
1766744526843|CPTimeZone|
1766744526857|CPTokenFieldTest|
1766744526871|CPToolTip|
1766744526887|CPToolbarTest|
1766744526902|CPURLConnectionAsyncTest|
1766744526917|CPURLConnectionSynchronousTest|
1766744526931|CPUserDefaults|
1766744526945|CPUserDefaultsControllerTest|
1766744526958|CPUserNotificationTest|
1766744526971|CPViewController|
1766744526985|CPVisualEffectViewTest|
1766744526998|CPWebViewTest|
1766744527011|CPWebViewTest2|
1766744527025|CPWindowLiveResizeTest|
1766744527042|CPWindowMovableTest|
1766744527060|CPWindowResizeStyle|
1766744527077|ChildWindows|
1766744527091|CompilationTests|
1766744527105|ContinuouslyUpdatesValueBinding|
1766744527118|CopyAndPaste|
1766744527131|CrossOriginTest|
1766744527145|FF4096Test|
1766744527158|FontEnhancementTest|
1766744527171|FontMetricsExplorer|
1766744527185|KeyEquivalents|
1766744527198|KeyViewLoopTest|
1766744527211|KeyWindowInTheBackgroundActivation|
1766744527225|LayoutTest|
1766744527238|LoadTimeTest|
1766744527251|LongBindings|
1766744527265|MobileTest|
1766744527278|MultipleValueBindings|
1766744527291|NSBoxTest|
1766744527304|NSBrowserTest|
1766744527318|NewTextFieldBezel|
1766744527331|Nib2CibAlignment|
1766744527344|Nib2CibBaselineAlignementTest|
1766744527358|Nib2CibSubviewsOrderTest|
1766744527371|NibAppRemixed|
1766744527384|PatternFillTest|
1766744527398|PlatformWindows|
1766744527411|PopUpButtonEscTest|
1766744527424|ScalingTest|
1766744527438|ScalingTest2|
1766744527451|ScrollviewTheming|
1766744527464|SheetWindowOrderFrontIssue|
1766744527478|SimpleBindings2|
1766744527491|SmartFoldersDemo|
1766744527504|TableTest|
1766744527518|ThemeBrowser|
1766744527531|ThemeKitchenSink|
1766744527544|TrackingArea|
1766744527558|UndoRedoWithMenuUpdate|
1766744527571|UserlandNSTest|
1766744527584|layoutEphemeralSubviewTest|
1766744527598|loadDynamicFrameworks|
1766744527611|performKeyEquivalentTest|
1766744527624|predicateWithFormat|
1766744527638|resignFirstResponder-CPControlTextDidEndEditing|
1766744527651|sizeToFitFix|
1766745451249|ArrayController1|
1766745451263|ArrayControllerInitialSelectionTest|
1766745451276|ArrayControllerRemovingFirstTest|
1766745451290|AttachedSheet|
1766745451303|AttachedSheet2|
1766745451316|Bindings|
1766745451330|CGCanvasContext|
1766745451343|CGPath|
1766745451356|CPAlertTest|
1766745451370|CPAnimatablePropertyContainerTest|
1766745451383|CPAnimationContextTest|
1766745451396|CPAnimationTest|
1766745451410|CPBinder-echo-bug|
1766745451423|CPBoxCibTest|
1766745451436|CPBoxTest|
1766745451450|CPBrowserTest|
1766745451463|CPButtonKeyEquivalentDefaultTest|
1766745451476|CPButtonTest|
1766745451490|CPByteCountFormatter|
1766745451503|CPCollectionViewNibTest|
1766745451516|CPColor-CPImage-description|
1766745451530|CPColorWellBindings|
1766745451543|CPComboBoxTest|
1766745451556|CPControlPerformClickExceptionTest|
1766745451569|CPControlSize|
1766745451583|CPCursor|
1766745451596|CPDateFormatterTest|
1766745451609|CPDatePickerTest|
1766745451623|CPDictionaryControllerTest|
1766745451636|CPDocumentControllerTest|
1766745451649|CPFormatterTest|
1766745451662|CPGraphicsTest|
1766745451676|CPImageAndTextViewImageScaling|
1766745451689|CPImageViewAlignmentScaling|
1766745451702|CPImageViewTest|
1766745451715|CPImageViewbindingsTest|
1766745451729|CPLevelIndicator|
1766745451742|CPLocalizationTest|
1766745451755|CPLogTest|
1766745451768|CPMenuCALayerTest|
1766745451782|CPMenuEnabledBindingsTest|
1766745451795|CPMenuKeyEquivalents|
1766745451808|CPMenuRemoveAllTest|
1766745451822|CPMenuSubmenuPlacementConstraints|
1766745451835|CPMenuTest|
1766745451848|CPOutlineViewCibTest|
1766745451861|CPOutlineViewTest|
1766745451875|CPOutlineViewViewBasedCibTest|
1766745451888|CPPanelTest|
1766745451901|CPPlatformWindow|
1766745451915|CPPlattformWindowMinSize|
1766745451928|CPPopUpButtonBindings|
1766745451941|CPPopUpButtonTest|
1766745451954|CPPopover|
1766745451968|CPPredicateEditorCibTest|
1766745451981|CPProgressIndicator|
1766745451994|CPPropertyListSerializationTest|
1766745452008|CPRadioBindings|
1766745452021|CPRuleEditorCibTest|
1766745452034|CPScrollView|
1766745452047|CPScrollView2|
1766745452061|CPSearchField|
1766745452074|CPSearchFieldPredicateBinding|
1766745452087|CPSegmentedControlBindings|
1766745452100|CPSegmentedControlTest|
1766745452114|CPSoundTest|
1766745452127|CPSplitViewDivider|
1766745452140|CPSplitViewTest|
1766745452153|CPStackViewTest|
1766745452167|CPStepperBindings|
1766745452180|CPStepperNibTest|
1766745452193|CPTabView2|
1766745452207|CPTabViewBindings|
1766745452220|CPTabViewNib|
1766745452233|CPTableViewGroupRows|
1766745452246|CPTextField|
1766745452260|CPTextFieldEditingStyleTest|
1766745452273|CPTextFieldHeightTest|
1766745452286|CPTextFieldMovementsTest|
1766745452300|CPTextFieldMultiline|
1766745452313|CPTextView|
1766745452327|CPTextViewCibTest|
1766745452340|CPTextViewDelegateAndNotifications|
1766745452353|CPTimeZone|
1766745452367|CPTokenFieldTest|
1766745452380|CPToolTip|
1766745452393|CPToolbarTest|
1766745452406|CPURLConnectionAsyncTest|
1766745452420|CPURLConnectionSynchronousTest|
1766745452433|CPUserDefaults|
1766745452446|CPUserDefaultsControllerTest|
1766745452459|CPUserNotificationTest|
1766745452473|CPViewController|
1766745452486|CPVisualEffectViewTest|
1766745452499|CPWebViewTest|
1766745452513|CPWebViewTest2|
1766745452526|CPWindowLiveResizeTest|
1766745452539|CPWindowMovableTest|
1766745452552|CPWindowResizeStyle|
1766745452566|ChildWindows|
1766745452579|CompilationTests|
1766745452592|ContinuouslyUpdatesValueBinding|
1766745452606|CopyAndPaste|
1766745452619|CrossOriginTest|
1766745452632|FF4096Test|
1766745452645|FontEnhancementTest|
1766745452659|FontMetricsExplorer|
1766745452672|KeyEquivalents|
1766745452686|KeyViewLoopTest|
1766745452699|KeyWindowInTheBackgroundActivation|
1766745452712|LayoutTest|
1766745452726|LoadTimeTest|
1766745452739|LongBindings|
1766745452752|MobileTest|
1766745452765|MultipleValueBindings|
1766745452778|NSBoxTest|
1766745452792|NSBrowserTest|
1766745452805|NewTextFieldBezel|
1766745452818|Nib2CibAlignment|
1766745452832|Nib2CibBaselineAlignementTest|
1766745452845|Nib2CibSubviewsOrderTest|
1766745452858|NibAppRemixed|
1766745452871|PatternFillTest|
1766745452884|PlatformWindows|
1766745452898|PopUpButtonEscTest|
1766745452911|ScalingTest|
1766745452924|ScalingTest2|
1766745452938|ScrollviewTheming|
1766745452951|SheetWindowOrderFrontIssue|
1766745452964|SimpleBindings2|
1766745452977|SmartFoldersDemo|
1766745452991|TableTest|
1766745453004|ThemeBrowser|
1766745453017|ThemeKitchenSink|
1766745453030|TrackingArea|
1766745453044|UndoRedoWithMenuUpdate|
1766745453057|UserlandNSTest|
1766745453070|layoutEphemeralSubviewTest|
1766745453083|loadDynamicFrameworks|
1766745453096|performKeyEquivalentTest|
1766745453110|predicateWithFormat|
1766745453123|resignFirstResponder-CPControlTextDidEndEditing|
1766745453136|sizeToFitFix|