From 0a96cb8eb3cc4aa9804674332c51ecada3511674 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 6 May 2010 17:36:11 +0200 Subject: [PATCH 01/47] call willChange* and didChange* methods on the actual classes --- Foundation/CPKeyValueObserving.j | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Foundation/CPKeyValueObserving.j b/Foundation/CPKeyValueObserving.j index b88f766a0..39f29779d 100644 --- a/Foundation/CPKeyValueObserving.j +++ b/Foundation/CPKeyValueObserving.j @@ -480,6 +480,11 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, - (void)willChangeValueForKey:(CPString)aKey { + var superClass = [self class], + methodSelector = @selector(willChangeValueForKey:), + methodImp = class_getMethodImplementation(superClass, methodSelector); + methodImp(self, methodSelector, aKey); + if (!aKey) return; @@ -490,6 +495,11 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, - (void)didChangeValueForKey:(CPString)aKey { + var superClass = [self class], + methodSelector = @selector(didChangeValueForKey:), + methodImp = class_getMethodImplementation(superClass, methodSelector); + methodImp(self, methodSelector, aKey); + if (!aKey) return; @@ -498,6 +508,11 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, - (void)willChange:(CPKeyValueChange)change valuesAtIndexes:(CPIndexSet)indexes forKey:(CPString)aKey { + var superClass = [self class], + methodSelector = @selector(willChange:valuesAtIndexes:forKey:), + methodImp = class_getMethodImplementation(superClass, methodSelector); + methodImp(self, methodSelector, change, indexes, aKey); + if (!aKey) return; @@ -508,6 +523,11 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, - (void)didChange:(CPKeyValueChange)change valuesAtIndexes:(CPIndexSet)indexes forKey:(CPString)aKey { + var superClass = [self class], + methodSelector = @selector(didChange:valuesAtIndexes:forKey:), + methodImp = class_getMethodImplementation(superClass, methodSelector); + methodImp(self, methodSelector, change, indexes, aKey); + if (!aKey) return; From db568af302ac3a9085a439cf165c2ffd083283ef Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 17 May 2010 12:32:56 +0200 Subject: [PATCH 02/47] made sure CPViewController calls viewDidLoad if it's view property is set directly --- AppKit/CPViewController.j | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index 3fffe261d..ab8c3a22e 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -162,8 +162,6 @@ var CPViewControllerCachedCibs; if ([cibOwner respondsToSelector:@selector(viewControllerDidLoadCib:)]) [cibOwner viewControllerDidLoadCib:self]; - - [self viewDidLoad]; } return _view; @@ -189,7 +187,13 @@ var CPViewControllerCachedCibs; */ - (void)setView:(CPView)aView { + var viewWasLoaded = !_view; + _view = aView; + + // Make sure the viewDidLoad method is called if the view is set directly + if (viewWasLoaded) + [self viewDidLoad]; } @end From 322d8c67b3d675ff4526cd007516a9ad111d973e Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 19 May 2010 18:31:21 +0200 Subject: [PATCH 03/47] Fixed NSTableColumn user resizable nib2cib --- Tools/nib2cib/NSTableColumn.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/nib2cib/NSTableColumn.j b/Tools/nib2cib/NSTableColumn.j index 735ed5fc5..635889344 100644 --- a/Tools/nib2cib/NSTableColumn.j +++ b/Tools/nib2cib/NSTableColumn.j @@ -51,9 +51,9 @@ _minWidth = [aCoder decodeFloatForKey:@"NSMinWidth"]; _maxWidth = [aCoder decodeFloatForKey:@"NSMaxWidth"]; - _resizingMask = [aCoder decodeBoolForKey:@"NSIsResizable"]; + _resizingMask = [aCoder decodeBoolForKey:@"NSIsResizeable"] ? CPTableColumnUserResizingMask : CPTableColumnAutoresizingMask; } - + return self; } From 76df9be4fbbe2a88c374c6143a579a5258ec1aef Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 19 May 2010 18:51:18 +0200 Subject: [PATCH 04/47] implemented CPTableColumn isHidden nib2cib support --- AppKit/CPTableColumn.j | 5 ++++- Tools/nib2cib/NSTableColumn.j | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index 5c6b91cea..2d4e5af03 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -395,7 +395,8 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", CPTableColumnWidthKey = @"CPTableColumnWidthKey", CPTableColumnMinWidthKey = @"CPTableColumnMinWidthKey", CPTableColumnMaxWidthKey = @"CPTableColumnMaxWidthKey", - CPTableColumnResizingMaskKey = @"CPTableColumnResizingMaskKey"; + CPTableColumnResizingMaskKey = @"CPTableColumnResizingMaskKey", + CPTableColumnIsHiddenkey = @"CPTableColumnIsHiddenKey"; @implementation CPTableColumn (CPCoding) @@ -417,6 +418,7 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", [self setHeaderView:[aCoder decodeObjectForKey:CPTableColumnHeaderViewKey]]; _resizingMask = [aCoder decodeBoolForKey:CPTableColumnResizingMaskKey]; + _isHidden = [aCoder decodeBoolForKey:CPTableColumnIsHiddenkey]; } return self; @@ -434,6 +436,7 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", [aCoder encodeObject:_dataView forKey:CPTableColumnDataViewKey]; [aCoder encodeObject:_resizingMask forKey:CPTableColumnResizingMaskKey]; + [aCoder encodeBool:_isHidden forKey:CPTableColumnIsHiddenkey]; } @end diff --git a/Tools/nib2cib/NSTableColumn.j b/Tools/nib2cib/NSTableColumn.j index 635889344..bcbea7422 100644 --- a/Tools/nib2cib/NSTableColumn.j +++ b/Tools/nib2cib/NSTableColumn.j @@ -52,6 +52,7 @@ _maxWidth = [aCoder decodeFloatForKey:@"NSMaxWidth"]; _resizingMask = [aCoder decodeBoolForKey:@"NSIsResizeable"] ? CPTableColumnUserResizingMask : CPTableColumnAutoresizingMask; + _isHidden = [aCoder decodeBoolForKey:@"NSHidden"]; } return self; From 6a33acbb7c7bf92e566e5d42ff3cbf9dbbf4b8a9 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 20 May 2010 11:39:47 +0200 Subject: [PATCH 05/47] implemented CPCoding support for CPSortDescriptor and made CPTableColumn decode it's _sortDescriptorPrototype --- AppKit/CPTableColumn.j | 7 ++++++- Foundation/CPSortDescriptor.j | 28 +++++++++++++++++++++++++ Tools/nib2cib/NSAppKit.j | 1 + Tools/nib2cib/NSSortDescriptor.j | 35 ++++++++++++++++++++++++++++++++ Tools/nib2cib/NSTableColumn.j | 2 ++ 5 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 Tools/nib2cib/NSSortDescriptor.j diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index e8b6f1c5e..14f239484 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -396,7 +396,8 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", CPTableColumnMinWidthKey = @"CPTableColumnMinWidthKey", CPTableColumnMaxWidthKey = @"CPTableColumnMaxWidthKey", CPTableColumnResizingMaskKey = @"CPTableColumnResizingMaskKey", - CPTableColumnIsHiddenkey = @"CPTableColumnIsHiddenKey"; + CPTableColumnIsHiddenkey = @"CPTableColumnIsHiddenKey", + CPSortDescriptorPrototypeKey = @"CPSortDescriptorPrototypeKey"; @implementation CPTableColumn (CPCoding) @@ -419,6 +420,8 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", _resizingMask = [aCoder decodeBoolForKey:CPTableColumnResizingMaskKey]; _isHidden = [aCoder decodeBoolForKey:CPTableColumnIsHiddenkey]; + + _sortDescriptorPrototype = [aCoder decodeObjectForKey:CPSortDescriptorPrototypeKey]; } return self; @@ -437,6 +440,8 @@ var CPTableColumnIdentifierKey = @"CPTableColumnIdentifierKey", [aCoder encodeObject:_resizingMask forKey:CPTableColumnResizingMaskKey]; [aCoder encodeBool:_isHidden forKey:CPTableColumnIsHiddenkey]; + + [aCoder encodeObject:_sortDescriptorPrototype forKey:CPSortDescriptorPrototypeKey]; } @end diff --git a/Foundation/CPSortDescriptor.j b/Foundation/CPSortDescriptor.j index c7b78c840..c7d29f16a 100755 --- a/Foundation/CPSortDescriptor.j +++ b/Foundation/CPSortDescriptor.j @@ -149,3 +149,31 @@ CPOrderedDescending = 1; } @end + +var CPSortDescriptorKeyKey = @"CPSortDescriptorKeyKey", // Don't you just love naming schemes ;) + CPSortDescriptorAscendingKey = @"CPSortDescriptorAscendingKey", + CPSortDescriptorSelectorKey = @"CPSortDescriptorSelectorKey"; + +@implementation CPSortDescriptor (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super init]) + { + _key = [aCoder decodeObjectForKey:CPSortDescriptorKeyKey]; + _ascending = [aCoder decodeBoolForKey:CPSortDescriptorAscendingKey]; + _selector = CPSelectorFromString([aCoder decodeObjectForKey:CPSortDescriptorSelectorKey]); + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [aCoder encodeObject:_key forKey:CPSortDescriptorKeyKey]; + [aCoder encodeBool:_ascending forKey:CPSortDescriptorAscendingKey]; + [aCoder encodeObject:CPStringFromSelector(_selector) forKey:CPSortDescriptorSelectorKey]; +} + +@end + diff --git a/Tools/nib2cib/NSAppKit.j b/Tools/nib2cib/NSAppKit.j index 8a54fb2d1..96a3a52b8 100644 --- a/Tools/nib2cib/NSAppKit.j +++ b/Tools/nib2cib/NSAppKit.j @@ -67,6 +67,7 @@ @import "NSViewController.j" @import "NSWindowTemplate.j" @import "WebView.j" +@import "NSSortDescriptor.j" function CP_NSMapClassName(aClassName) diff --git a/Tools/nib2cib/NSSortDescriptor.j b/Tools/nib2cib/NSSortDescriptor.j new file mode 100644 index 000000000..c4f0beb87 --- /dev/null +++ b/Tools/nib2cib/NSSortDescriptor.j @@ -0,0 +1,35 @@ +@import + +@implementation CPSortDescriptor (NSCoding) +{ +} + +- (id)NS_initWithCoder:(CPCoder)aCoder +{ + if (self = [super init]) + { + _key = [aCoder decodeObjectForKey:@"NSKey"]; + _selector = CPSelectorFromString([aCoder decodeObjectForKey:@"NSSelector"]); + _ascending = [aCoder decodeBoolForKey:@"NSAscending"]; + } + + return self; +} + +@end + +@implementation NSSortDescriptor : CPSortDescriptor +{ +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [self NS_initWithCoder:aCoder]; +} + +- (Class)classForKeyedArchiver +{ + return [CPSortDescriptor class]; +} + +@end \ No newline at end of file diff --git a/Tools/nib2cib/NSTableColumn.j b/Tools/nib2cib/NSTableColumn.j index bcbea7422..bdafee212 100644 --- a/Tools/nib2cib/NSTableColumn.j +++ b/Tools/nib2cib/NSTableColumn.j @@ -53,6 +53,8 @@ _resizingMask = [aCoder decodeBoolForKey:@"NSIsResizeable"] ? CPTableColumnUserResizingMask : CPTableColumnAutoresizingMask; _isHidden = [aCoder decodeBoolForKey:@"NSHidden"]; + + _sortDescriptorPrototype = [aCoder decodeObjectForKey:@"NSSortDescriptorPrototype"]; } return self; From f7dd6e4387ca7bc770445a752c9822c9d0004f8b Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 20 May 2010 18:52:43 +0200 Subject: [PATCH 06/47] fixed a typo where CPThemeStateSelectedDataView was set on the header view of a table column --- AppKit/CPTableView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 2ef0dde9b..aad636598 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -1837,7 +1837,7 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; if (_headerView) { if (_currentHighlightedTableColumn != nil) - [[_currentHighlightedTableColumn headerView] unsetThemeState:CPThemeStateSelectedDataView]; + [[_currentHighlightedTableColumn headerView] unsetThemeState:CPThemeStateSelected]; if (aTableColumn != nil) [[aTableColumn headerView] setThemeState:CPThemeStateSelected]; From 528203d8e51dd029a84a9407dc827e49997ce522 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Tue, 25 May 2010 20:37:00 +0200 Subject: [PATCH 07/47] made CPDictionary call [super valueForKey:] on keys prefixed with @ --- Foundation/CPKeyValueCoding.j | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Foundation/CPKeyValueCoding.j b/Foundation/CPKeyValueCoding.j index 36ef5b48c..6543d04b6 100644 --- a/Foundation/CPKeyValueCoding.j +++ b/Foundation/CPKeyValueCoding.j @@ -267,7 +267,10 @@ CPUnknownUserInfoKey = @"CPUnknownUserInfoKey"; - (id)valueForKey:(CPString)aKey { - return [self objectForKey:aKey]; + if ([aKey hasPrefix:@"@"]) + return [super valueForKey:aKey.substr(1)]; + + return [self objectForKey:aKey]; } - (void)setValue:(id)aValue forKey:(CPString)aKey From 468d8e7c33ed453aa3379898a7081f5bdc4d550a Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 31 May 2010 13:45:51 +0200 Subject: [PATCH 08/47] call windowWillLoad and windowDidLoad if the window is set directly from the initializer --- AppKit/CPWindowController.j | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AppKit/CPWindowController.j b/AppKit/CPWindowController.j index aebbc5e89..a123238ab 100644 --- a/AppKit/CPWindowController.j +++ b/AppKit/CPWindowController.j @@ -72,11 +72,17 @@ if (self) { + if (aWindow) + [self windowWillLoad]; + [self setWindow:aWindow]; [self setShouldCloseDocument:NO]; [self setNextResponder:CPApp]; + if (aWindow) + [self windowDidLoad]; + _documents = []; } From 43f0e43de7e8fbec69fb59dac6c7d2496ed70ae1 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Mon, 31 May 2010 15:41:52 +0200 Subject: [PATCH 09/47] call tableview doubleclick action even if target is nil (action will travel down the responder chain) --- AppKit/CPTableView.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 8dd282e4e..1b866b17f 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -2709,7 +2709,9 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; } //end of editing conditional //double click actions - if([[CPApp currentEvent] clickCount] === 2 && _doubleAction && _target) + if([[CPApp currentEvent] clickCount] === 2 && _doubleAction) + { + _clickedRow = [self rowAtPoint:aPoint]; [self sendAction:_doubleAction to:_target]; } From 83ea50a8360c357893a8adb26efbc152172e60f3 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 30 Jun 2010 11:41:22 +0200 Subject: [PATCH 10/47] don't send windowWillLoad and windowDidLoad if the window is not loaded from cib --- AppKit/CPWindowController.j | 6 ------ 1 file changed, 6 deletions(-) diff --git a/AppKit/CPWindowController.j b/AppKit/CPWindowController.j index c5496a7e5..2d011af98 100644 --- a/AppKit/CPWindowController.j +++ b/AppKit/CPWindowController.j @@ -72,17 +72,11 @@ if (self) { - if (aWindow) - [self windowWillLoad]; - [self setWindow:aWindow]; [self setShouldCloseDocument:NO]; [self setNextResponder:CPApp]; - if (aWindow) - [self windowDidLoad]; - _documents = []; } From af0ca527399825a133895d7e46eb83fa53d65c5c Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 30 Jun 2010 11:50:53 +0200 Subject: [PATCH 11/47] made CPViewController equal cappuccino master --- AppKit/CPViewController.j | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/AppKit/CPViewController.j b/AppKit/CPViewController.j index ab8c3a22e..3fffe261d 100644 --- a/AppKit/CPViewController.j +++ b/AppKit/CPViewController.j @@ -162,6 +162,8 @@ var CPViewControllerCachedCibs; if ([cibOwner respondsToSelector:@selector(viewControllerDidLoadCib:)]) [cibOwner viewControllerDidLoadCib:self]; + + [self viewDidLoad]; } return _view; @@ -187,13 +189,7 @@ var CPViewControllerCachedCibs; */ - (void)setView:(CPView)aView { - var viewWasLoaded = !_view; - _view = aView; - - // Make sure the viewDidLoad method is called if the view is set directly - if (viewWasLoaded) - [self viewDidLoad]; } @end From a9e59e1e8755c64e573914143af774c7d5303dd4 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 22 Aug 2010 17:47:52 -0400 Subject: [PATCH 12/47] Fixed: in the new theme definition the table header sort images were no longer images. This would cause an exception whenever a table header was clicked such that the sort arrows needed to display. --- AppKit/Themes/Aristo/ThemeDescriptors.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 8feeda898..086f3e1b9 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -1264,8 +1264,8 @@ var themedButtonValues = nil, var tableview = [[CPTableView alloc] initWithFrame:CGRectMake(0.0, 0.0, 150.0, 150.0)], - sortImage = PatternColor("tableview-headerview-ascending.png", 9.0, 8.0), - sortImageReversed = PatternColor("tableview-headerview-descending.png", 9.0, 8.0), + sortImage = PatternImage("tableview-headerview-ascending.png", 9.0, 8.0), + sortImageReversed = PatternImage("tableview-headerview-descending.png", 9.0, 8.0), alternatingRowColors = [[CPColor whiteColor], [CPColor colorWithRed:245.0 / 255.0 green:249.0 / 255.0 blue:252.0 / 255.0 alpha:1.0]], gridColor = [CPColor colorWithHexString:@"dce0e2"], selectionColor = [CPColor colorWithHexString:@"5f83b9"], From 75cc0be52a351cf5cf7954895abee3026ed26b6f Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 21 Aug 2010 09:54:32 -0400 Subject: [PATCH 13/47] Test app for default button fixes --- .../AppController.j | 71 ++++ .../Info.plist | 12 + .../Resources/MainMenu.cib | 1 + .../Resources/MainMenu.xib | 334 ++++++++++++++++++ .../Resources/spinner.gif | Bin 0 -> 1849 bytes .../index-debug.html | 69 ++++ .../index.html | 68 ++++ .../CPButtonKeyEquivalentDefaultTest/main.j | 18 + 8 files changed, 573 insertions(+) create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/AppController.j create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/Info.plist create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.xib create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/spinner.gif create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/index-debug.html create mode 100644 Tests/Manual/CPButtonKeyEquivalentDefaultTest/index.html create mode 100755 Tests/Manual/CPButtonKeyEquivalentDefaultTest/main.j diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/AppController.j b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/AppController.j new file mode 100644 index 000000000..618505073 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/AppController.j @@ -0,0 +1,71 @@ +/* + * AppController.j + * CPButtonKeyEquivalentDefaultTest + * + * Created by Aparajita Fishman on August 20, 2010. + */ + +@import + +CPLogRegister(CPLogConsole); + + +@implementation AppController : CPObject +{ + CPWindow window1; //this "outlet" is connected automatically by the Cib + CPWindow window2; + + CPButton button1; + CPButton button2; +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + window2 = [[CPWindow alloc] initWithContentRect:CGRectMake(50.0, 70.0, 300.0, 300.0) styleMask:CPTitledWindowMask]; + [window2 setTitle:@"Code Window"]; + + var contentView = [window2 contentView], + button1 = [CPButton buttonWithTitle:@"Button 1"], + button2 = [CPButton buttonWithTitle:@"Button 2"], + changeButton = [CPButton buttonWithTitle:@"Change Default Button"]; + + [button1 setFrameOrigin:CGPointMake(20, 20)]; + [button1 setTarget:self]; + [button1 setAction:@selector(buttonWasPressed:)]; + [button1 setTag:1]; + [contentView addSubview:button1]; + + [button2 setFrameOrigin:CGPointMake(170, 20)]; + [button2 setTarget:self]; + [button2 setAction:@selector(buttonWasPressed:)]; + [button2 setTag:2]; + [contentView addSubview:button2]; + + [changeButton setFrameOrigin:CGPointMake(50, 70)]; + [changeButton setTarget:self]; + [changeButton setAction:@selector(changeDefault:)]; + [contentView addSubview:changeButton]; + + [window2 setDefaultButton:button1]; + [window2 orderFront:nil]; +} + +- (void)buttonWasPressed:(id)sender +{ + var alert = [[CPAlert alloc] init]; + + [alert setTitle:@"Test"]; + [alert setMessageText:[CPString stringWithFormat:@"%s - %s", [[sender window] title], [sender title]]]; + [alert addButtonWithTitle:@"OK"]; + [alert runModal]; +} + +- (void)changeDefault:(id)sender +{ + var buttonWindow = [sender window] + tag = [[buttonWindow defaultButton] tag] === 1 ? 2 : 1; + + [buttonWindow setDefaultButton:[[buttonWindow contentView] viewWithTag:tag]]; +} + +@end diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Info.plist b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Info.plist new file mode 100644 index 000000000..97500144d --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Info.plist @@ -0,0 +1,12 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + GridDrawingTest + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib new file mode 100644 index 000000000..44aeac128 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib @@ -0,0 +1 @@ +280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;54E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;55E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;56E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;57E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;58E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;25E;E;D;K;10;$classnameS;8;CPButtonK;8;$classesA;S;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;59E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;60E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;67E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonKeyEquivalentKeyD;K;6;CP$UIDd;2;68E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;69E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;69E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;70E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;71E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;72E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;73E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;74E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;75E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;76E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;77E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;78E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;79E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;72E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;82E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;83E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;84E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;S;19;Window (Cib Window)S;21;Button Cell (Button1)S;21;Push Button (Button1)S;11;ApplicationS;12;Content ViewS;12;File's OwnerS;35;Push Button (Change Default Button)S;35;Button Cell (Change Default Button)S;21;Button Cell (Button2)S;14;App ControllerS;11;Custom ViewS;21;Push Button (Button2)D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;22E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;87E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;20E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;22E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;E;E;S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;23;{{408, 63}, {372, 330}}d;2;15S;10;Cib Windowd;1;1S;20;{{14, 20}, {96, 24}}S;18;{{0, 0}, {96, 24}}d;2;36S;8;borderedd;1;0d;1;2d;1;4S;7;Button1S;4;CgA=S;20;{{0, 0}, {372, 330}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;E;E;d;2;18S;6;normalS;21;{{44, 90}, {183, 24}}S;19;{{0, 0}, {183, 24}}d;2;37S;21;Change Default ButtonS;13;AppControllerS;23;{{43, 100}, {286, 130}}S;20;{{0, 0}, {286, 130}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;30E;E;E;d;2;45S;6;CPViewS;21;{{176, 20}, {96, 24}}S;7;Button2S;8;delegateS;7;button1S;7;button2S;7;window1S;17;buttonWasPressed:S;14;changeDefault:E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.xib b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.xib new file mode 100644 index 000000000..4e9575ea7 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.xib @@ -0,0 +1,334 @@ + + + + 1060 + 10F569 + 762 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + 15 + 2 + {{408, 635}, {372, 330}} + 1946157056 + Cib Window + NSWindow + + {1.79769e+308, 1.79769e+308} + + + 274 + + + + 301 + + + + 269 + {{44, 12}, {183, 32}} + + YES + + 67239424 + 134217728 + Change Default Button + + LucidaGrande + 13 + 1044 + + + -2038284033 + 129 + + + 200 + 25 + + + + + 268 + {{14, 82}, {96, 32}} + + 1 + YES + + 67239424 + 134217728 + Button1 + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + + 268 + {{176, 82}, {96, 32}} + + 2 + YES + + 67239424 + 134217728 + Button2 + + + -2038284033 + 129 + + + 200 + 25 + + + + {{43, 100}, {286, 130}} + + NSView + + + {372, 330} + + + {{0, 0}, {1680, 1028}} + {1.79769e+308, 1.79769e+308} + + + AppController + + + + + + + delegate + + + + 451 + + + + changeDefault: + + + + 1039 + + + + button1 + + + + 1040 + + + + button2 + + + + 1041 + + + + buttonWasPressed: + + + + 1042 + + + + buttonWasPressed: + + + + 1043 + + + + window1 + + + + 1045 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + + + + + + 372 + + + + + + + + 450 + + + + + 1044 + + + + + + + + + + 1035 + + + + + + + + 1036 + + + + + 1033 + + + + + + + + 1034 + + + + + 1037 + + + + + + + + 1038 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{391, 564}, {372, 330}} + com.apple.InterfaceBuilder.CocoaPlugin + {{391, 564}, {372, 330}} + + {{33, 99}, {480, 360}} + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 1045 + + + + + AppController + NSObject + + id + id + + + id + id + NSWindow + + + IBUserSource + + + + + + 0 + IBCocoaFramework + YES + ../registration.xcodeproj + 3 + + diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/spinner.gif b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..06dbc2bc21dddcf0e09b566d5b211aee89570f52 GIT binary patch literal 1849 zcma*odr(tX9tZHtz31lM+(&Y`A`Ou`NeG&R#DrIfV%?hng21vs6v>ooRQQFbk7E_K!V( z{?5!fpZWgIZ%*d6t%i*j24bL}AZUJm9)h6R*;%L4IWse3G#VWaN1#$zSSXcBhlYlH zJ|D}n{r&w2f+Qp)SS*&n?*G4}{}!h?td_mjU6Kad-rW*QwWYCUk7d^e+sjpZAn6kT z5rM;`{~_}-wm+L@%+E;JphLm}C3WzQAQD0wBoY|rOTQX{(@pp-WAA8Iw0HKl|15j) zhGh(SFWu#5zUCw^T!}C~eC}~?{xG-r7ugQC>taC+|L^xr&a%{#cgUOZXIM&v?)k^2 z1i5%0!U00wq)r4vlAwXBA_m5J5WNeuBm-XJQ5pG4GD%vc|K){+TJ{AkHqN@SJKczX zU}QRd9n*_bf^h94)6Ctv{CUfz_;qs#RDuQ$DR%y1&5G-a6rhf*4Y zl+UOD1*GE{GQ7vv;c-tTIMkz0ovO>9j%b5hpa@a*CBJ#W!0@ndSwF|%hMkdFtXiU) z`BEp+yhkt8ZY>tg&uyH@%^%K4jDrbA;et&vnnzZ3z22@e6<27z2Vk13kb7OtISyxv z(XoO-LNQCZe3lfzc%*pNqU<9T+p~teThOEB+~e&U0mC|zS{Q)dJZ)!^1f7L(zg*L> z*vSW%?dR~@@0(}x6-V^A`~ImD;)NaBUnP8;RH=bS2@pk`wp>>8r&jGjmGPy%1BW}v zoPo}ca$~bze@efc3kapuEVW1!%teOZT3j2Tw5=hjiAf02d}7dL0oFC%@=RXp5Ow#% z@a>+AM|YWt$n&e`>sB-32gBcuTi>R>*|8@lp`y6thc7ydyqDsuUn~YzZf|{-R@-3y zL#wx{Ii}xxL_csiW*LBn0-A$>zp4WOmkf6=ilrjlW?-l9+bCd7|i?*b5NTmy<<6NZ0T8$SN@mwdC2f z6jqK=N@bS@!=YSj%>h0}*4p+%0HbTIrE$w7UMT6+AZZ&DAo*qZAAi(OtNbIfl#Dw^ zJWeiCp~zi#&t6x}m9)O^eR4HiLV3QA<<0>HZ8%$^lrSE94Wb}=+MM^!b>n#5&-JQR zkr-CEu9C;_F*7DqDisulV6Pmg$nFL0TPn%~*m^-`Z3^BgU(sNpnx%nW(!eV9A&FvI zHL3X3lw8Wji^6=8KbQDE-e%b?svdFxxdh$8r97@7$ojeI`6AL8Ob6QC$qh&>ZWVDX1F{0vJnT%%mE;GveKWR%C} zM&4d;Jf3s9|HAA)yVUPo`Aq;0do#)uHSXi5*QF*)x@MVVHr+cN)uMZ__F|&Ta#p8d z53TOKtce!PJUuie8UWol-S(`c2nH?UGqJP{!4RR4u$LCfn)q-hj0^f=h(VYy)T6eN zhRO!ja-aDBTcgeyP(8Ua4IdiOog^*CQa?R(cP#9AgL9`j>EX-6Yf1lzX(!~``M1XC zNmM<4<6d~wWZ$Xrk0K}UteTrq@LBBk#MsjkK;pbuVhe)NI7(7Pf(l?lxC7=1Z7Pzl zMbS;nV4NI5_N{1$P)&XC)huOGQ+h^zpYUZfb*1n6>!`#*b3y52LGmi+<4sY5jyD#- zw&$d}DTguLAfnRtjrM*JfqtHqUu6rQoU=g%1E9xk%;)TDm^2<8n-0IhTsQFaek)MY}>PK4;nBk=ow4pF>vzkO& gna%Org-kgQCf=+BeMi^RbuY;YE~rTjend;_cdi8t>i_@% literal 0 HcmV?d00001 diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index-debug.html b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index-debug.html new file mode 100644 index 000000000..dc88d66e3 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index-debug.html @@ -0,0 +1,69 @@ + + + + + + + + CPButtonKeyEquivalentDefaultTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index.html b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index.html new file mode 100644 index 000000000..23bd4feb5 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/index.html @@ -0,0 +1,68 @@ + + + + + + + + CPButtonKeyEquivalentDefaultTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/main.j b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/main.j new file mode 100755 index 000000000..af6279da3 --- /dev/null +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} From 05edec8a8b64fe48351c3b6be7577fcba9b1de46 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 09:14:02 -0400 Subject: [PATCH 14/47] Removed CPButton -setDefaultButton, new version of CPButton after merging with latest master. --- AppKit/CPButton.j | 42 ++++++++----------- AppKit/Themes/Aristo/ThemeDescriptors.j | 4 +- AppKit/Themes/BlendKit/BKShowcaseController.j | 10 ++--- .../Resources/MainMenu.cib | 2 +- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 01f173f8c..9cbc33b20 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -145,7 +145,7 @@ CPButtonStateMixed = CPThemeState("mixed"); _controlSize = CPRegularControlSize; - _keyEquivalent = ""; + _keyEquivalent = @""; _keyEquivalentModifierMask = 0; // [self setBezelStyle:CPRoundRectBezelStyle]; @@ -540,14 +540,6 @@ CPButtonStateMixed = CPThemeState("mixed"); } } -- (void)setDefaultButton:(BOOL)shouldBeDefaultButton -{ - if (shouldBeDefaultButton) - [self setThemeState:CPThemeStateDefault]; - else - [self unsetThemeState:CPThemeStateDefault]; -} - - (void)setBordered:(BOOL)shouldBeBordered { if (shouldBeBordered) @@ -570,24 +562,24 @@ CPButtonStateMixed = CPThemeState("mixed"); - (void)setKeyEquivalent:(CPString)aString { _keyEquivalent = aString || @""; + // Check if the key equivalent is the enter key // Treat \r and \n as the same key equivalent. See issue #710. if (aString === CPNewlineCharacter || aString === CPCarriageReturnCharacter) - { - [[self window] setDefaultButton:self]; - [self setDefaultButton:YES]; - } - else if ([[self window] defaultButton] === self) - { - [[self window] setDefaultButton:nil]; - [self setDefaultButton:NO]; - } + [self setThemeState:CPThemeStateDefault]; + else + [self unsetThemeState:CPThemeStateDefault]; } - (void)viewWillMoveToWindow:(CPWindow)aWindow { - if ([[self window] defaultButton] === self) - [[self window] setDefaultButton:nil]; + var selfWindow = [self window]; + + if (selfWindow === aWindow || aWindow === nil) + return; + + if ([selfWindow defaultButton] === self) + [selfWindow setDefaultButton:nil]; if ([self keyEquivalent] === CPNewlineCharacter || [self keyEquivalent] === CPCarriageReturnCharacter) [aWindow setDefaultButton:self]; @@ -672,18 +664,18 @@ var CPButtonImageKey = @"CPButtonImageKey", { _controlSize = CPRegularControlSize; - [self setImage:[aCoder decodeObjectForKey:CPButtonImageKey]]; - [self setAlternateImage:[aCoder decodeObjectForKey:CPButtonAlternateImageKey]]; + _image = [aCoder decodeObjectForKey:CPButtonImageKey]; + _alternateImage = [aCoder decodeObjectForKey:CPButtonAlternateImageKey]; - [self setTitle:[aCoder decodeObjectForKey:CPButtonTitleKey]]; - [self setAlternateTitle:[aCoder decodeObjectForKey:CPButtonAlternateTitleKey]]; + _title = [aCoder decodeObjectForKey:CPButtonTitleKey]; + _alternateTitle = [aCoder decodeObjectForKey:CPButtonAlternateTitleKey]; [self setImageDimsWhenDisabled:[aCoder decodeObjectForKey:CPButtonImageDimsWhenDisabledKey]]; if ([aCoder containsValueForKey:CPButtonKeyEquivalentKey]) [self setKeyEquivalent:CFData.decodeBase64ToUtf16String([aCoder decodeObjectForKey:CPButtonKeyEquivalentKey])]; - [self setKeyEquivalentModifierMask:[aCoder decodeObjectForKey:CPButtonKeyEquivalentMaskKey]]; + _keyEquivalentModifierMask = [aCoder decodeObjectForKey:CPButtonKeyEquivalentMaskKey]; [self setNeedsLayout]; [self setNeedsDisplay:YES]; diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 086f3e1b9..1ca28dd4d 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -404,7 +404,7 @@ var themedButtonValues = nil, var button = [self button]; [button setTitle:@"OK"]; - [button setDefaultButton:YES]; + [button setThemeState:CPThemeStateDefault]; return button; } @@ -1399,7 +1399,7 @@ var themedButtonValues = nil, var button = [self button]; [button setTitle:@"OK"]; - [button setDefaultButton:YES]; + [button setThemeState:CPThemeStateDefault]; return button; } diff --git a/AppKit/Themes/BlendKit/BKShowcaseController.j b/AppKit/Themes/BlendKit/BKShowcaseController.j index 36e663b4f..8a53eceab 100644 --- a/AppKit/Themes/BlendKit/BKShowcaseController.j +++ b/AppKit/Themes/BlendKit/BKShowcaseController.j @@ -180,7 +180,7 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId [toolbarItem setMinSize:CGSizeMake(width + 20.0, 24.0)]; [toolbarItem setMaxSize:CGSizeMake(width + 20.0, 24.0)]; } - + else if (anItemIdentifier === BKBackgroundColorToolbarItemIdentifier) { var popUpButton = [CPPopUpButton buttonWithTitle:@"Window Background"]; @@ -218,7 +218,7 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId var button = [CPButton buttonWithTitle:title]; - [button setDefaultButton:YES]; + [theWindow setDefaultButton:button]; [toolbarItem setView:button]; [toolbarItem setLabel:@"Learn More"]; @@ -320,7 +320,7 @@ var SelectionColor = nil; [self addSubview:_label]; } - + [_label setStringValue:[aThemeDescriptor themeName] + " (" + [[aThemeDescriptor themedObjectTemplates] count] + ")"]; } @@ -383,7 +383,7 @@ var BKShowcaseCellBackgroundColorDidChangeNotification = @"BKShowcaseCellBackgr - (id)initWithCoder:(CPCoder)aCoder { self = [super initWithCoder:aCoder]; - + if (self) [[CPNotificationCenter defaultCenter] addObserver:self @@ -419,7 +419,7 @@ var BKShowcaseCellBackgroundColorDidChangeNotification = @"BKShowcaseCellBackgr [_label setStringValue:[anObject valueForKey:@"label"]]; [_label sizeToFit]; - [_label setFrame:CGRectMake(0.0, CGRectGetHeight([self bounds]) - CGRectGetHeight([_label frame]), + [_label setFrame:CGRectMake(0.0, CGRectGetHeight([self bounds]) - CGRectGetHeight([_label frame]), CGRectGetWidth([self bounds]), CGRectGetHeight([_label frame]))]; if (!_backgroundView) diff --git a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib index 44aeac128..ce9aa3b9e 100644 --- a/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib +++ b/Tests/Manual/CPButtonKeyEquivalentDefaultTest/Resources/MainMenu.cib @@ -1 +1 @@ -280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;54E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;55E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;56E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;57E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;58E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;25E;E;D;K;10;$classnameS;8;CPButtonK;8;$classesA;S;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;59E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;60E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;67E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonKeyEquivalentKeyD;K;6;CP$UIDd;2;68E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;69E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;69E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;70E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;71E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;72E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;73E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;74E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;75E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;76E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;77E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;78E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;79E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;72E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;82E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;29E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;83E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;61E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;29E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;62E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;64E;K;11;$aalignmentD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;64E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;66E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;84E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;64E;E;S;19;Window (Cib Window)S;21;Button Cell (Button1)S;21;Push Button (Button1)S;11;ApplicationS;12;Content ViewS;12;File's OwnerS;35;Push Button (Change Default Button)S;35;Button Cell (Change Default Button)S;21;Button Cell (Button2)S;14;App ControllerS;11;Custom ViewS;21;Push Button (Button2)D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;22E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;87E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;20E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;22E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;E;E;S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;23;{{408, 63}, {372, 330}}d;2;15S;10;Cib Windowd;1;1S;20;{{14, 20}, {96, 24}}S;18;{{0, 0}, {96, 24}}d;2;36S;8;borderedd;1;0d;1;2d;1;4S;7;Button1S;4;CgA=S;20;{{0, 0}, {372, 330}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;E;E;d;2;18S;6;normalS;21;{{44, 90}, {183, 24}}S;19;{{0, 0}, {183, 24}}d;2;37S;21;Change Default ButtonS;13;AppControllerS;23;{{43, 100}, {286, 130}}S;20;{{0, 0}, {286, 130}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;30E;E;E;d;2;45S;6;CPViewS;21;{{176, 20}, {96, 24}}S;7;Button2S;8;delegateS;7;button1S;7;button2S;7;window1S;17;buttonWasPressed:S;14;changeDefault:E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file +280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;28E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;8;CPButtonK;8;$classesA;S;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;54E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;55E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;56E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;58E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;59E;K;11;$aalignmentD;K;6;CP$UIDd;2;54E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;59E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;60E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;61E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;62E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;63E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;64E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;65E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;66E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;25E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;67E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;68E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;71E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;72E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;73E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;74E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;58E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;59E;K;11;$aalignmentD;K;6;CP$UIDd;2;54E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;59E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;60E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;75E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;76E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;77E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;56E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;78E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;59E;K;11;$aalignmentD;K;6;CP$UIDd;2;54E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;59E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;60E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;79E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonKeyEquivalentKeyD;K;6;CP$UIDd;2;80E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;59E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;29E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;81E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;82E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;83E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;70E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;85E;E;S;21;Push Button (Button2)S;12;File's OwnerS;21;Button Cell (Button1)S;11;ApplicationS;19;Window (Cib Window)S;12;Content ViewS;14;App ControllerS;21;Button Cell (Button2)S;35;Push Button (Change Default Button)S;21;Push Button (Button1)S;35;Button Cell (Change Default Button)S;11;Custom ViewD;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;86E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;28E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;87E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;20E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;88E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;23E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;89E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;28E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;20E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;90E;E;D;K;6;$classD;K;6;CP$UIDd;2;48E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;91E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;23E;E;E;d;1;2S;21;{{176, 20}, {96, 24}}S;18;{{0, 0}, {96, 24}}d;2;36S;8;borderedd;1;0d;1;4S;7;Button2S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;23;{{408, 63}, {372, 330}}d;2;15S;10;Cib WindowS;20;{{0, 0}, {372, 330}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;30E;E;E;d;2;18S;6;normalS;13;AppControllerS;21;{{44, 90}, {183, 24}}S;19;{{0, 0}, {183, 24}}d;2;37S;21;Change Default Buttond;1;1S;20;{{14, 20}, {96, 24}}S;16;bordered+defaultS;7;Button1S;4;CgA=S;23;{{43, 100}, {286, 130}}S;20;{{0, 0}, {286, 130}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;20E;E;E;d;2;45S;6;CPViewS;8;delegateS;7;button1S;7;button2S;7;window1S;17;buttonWasPressed:S;14;changeDefault:E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file From 5e20a6d9efe74605adf5fc4d6a64813f4be992ee Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 11:40:26 -0400 Subject: [PATCH 15/47] Sending NS_initWithCoder at the right time --- Tools/nib2cib/NSButton.j | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Tools/nib2cib/NSButton.j b/Tools/nib2cib/NSButton.j index a9adfb9c1..ecd9dc5d6 100644 --- a/Tools/nib2cib/NSButton.j +++ b/Tools/nib2cib/NSButton.j @@ -165,7 +165,8 @@ _CPButtonBezelStyleHeights[CPHUDBezelStyle] = 20; - (id)initWithCoder:(CPCoder)aCoder { - // We need to do a bit of magic to determine if this is a checkbox or radio button. + // We need to do a bit of magic to determine if this is a checkbox or radio button + // BEFORE we can initialize the rest of the object. var cell = [aCoder decodeObjectForKey:@"NSCell"], alternateImage = [cell alternateImage]; @@ -181,10 +182,12 @@ _CPButtonBezelStyleHeights[CPHUDBezelStyle] = 20; } } - [self setKeyEquivalent:[cell keyEquivalent]]; - [self setKeyEquivalentModifierMask:[cell keyEquivalentModifierMask]]; + var self = [self NS_initWithCoder:aCoder]; - return [self NS_initWithCoder:aCoder]; + [self setKeyEquivalent:[cell keyEquivalent]]; + _keyEquivalentModifierMask = [cell keyEquivalentModifierMask]; + + return self; } - (Class)classForKeyedArchiver From 189d90da91a523068d725193b0d9a5354ad24ab7 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 11:03:44 -0400 Subject: [PATCH 16/47] Moved theWindow to an ivar so other methods can reference it. --- AppKit/Themes/BlendKit/BKShowcaseController.j | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AppKit/Themes/BlendKit/BKShowcaseController.j b/AppKit/Themes/BlendKit/BKShowcaseController.j index 8a53eceab..71975723d 100644 --- a/AppKit/Themes/BlendKit/BKShowcaseController.j +++ b/AppKit/Themes/BlendKit/BKShowcaseController.j @@ -36,14 +36,17 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId CPCollectionView _themesCollectionView; CPCollectionView _themedObjectsCollectionView; + + CPWindow theWindow; } - (void)applicationDidFinishLaunching:(CPNotification)aNotification { _themeDescriptorClasses = [BKThemeDescriptor allThemeDescriptorClasses]; - var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], - toolbar = [[CPToolbar alloc] initWithIdentifier:@"Toolbar"]; + theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask]; + + var toolbar = [[CPToolbar alloc] initWithIdentifier:@"Toolbar"]; [toolbar setDelegate:self]; [theWindow setToolbar:toolbar]; @@ -118,7 +121,7 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId [_themesCollectionView setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; - [theWindow setFullBridge:YES]; + [theWindow setFullPlatformWindow:YES]; [theWindow makeKeyAndOrderFront:self]; } From c91c513b60119102f097468538deb5310a05199d Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 19:19:37 -0400 Subject: [PATCH 17/47] Proposed method of excluding themed objects from the theme showcase. - Also added class_respondsToSelector, it was a no-brainer. - Cleaned up trailing whitespace in CPThemeBlend.j. Woo-hoo! --- AppKit/CPThemeBlend.j | 6 +- AppKit/Themes/Aristo/ThemeDescriptors.j | 9 +++ AppKit/Themes/BlendKit/BKShowcaseController.j | 10 ++-- AppKit/Themes/BlendKit/BKThemeDescriptor.j | 55 +++++++++++++++---- Objective-J/Runtime.js | 7 +++ 5 files changed, 67 insertions(+), 20 deletions(-) diff --git a/AppKit/CPThemeBlend.j b/AppKit/CPThemeBlend.j index cf523037a..d0f0baf23 100644 --- a/AppKit/CPThemeBlend.j +++ b/AppKit/CPThemeBlend.j @@ -40,19 +40,19 @@ - (id)initWithContentsOfURL:(CPURL)aURL { self = [super init]; - + if (self) { _bundle = [[CPBundle alloc] initWithPath:aURL]; } - + return self; } - (void)loadWithDelegate:(id)aDelegate { _loadDelegate = aDelegate; - + [_bundle loadWithDelegate:self]; } diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 1ca28dd4d..0b5647d2f 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -298,6 +298,10 @@ var themedButtonValues = nil, return @"Aristo"; } ++ (CPArray)themeShowcaseExcludes +{ + return ["alert", "cornerview", "tableView", "tableDataView"]; +} + (CPButton)makeButton { @@ -1346,6 +1350,11 @@ var themedButtonValues = nil, return @"Aristo-HUD"; } ++ (CPArray)themeShowcaseExcludes +{ + return ["alert"]; +} + + (CPColor)defaultShowcaseBackgroundColor { return [CPColor blackColor]; diff --git a/AppKit/Themes/BlendKit/BKShowcaseController.j b/AppKit/Themes/BlendKit/BKShowcaseController.j index 71975723d..78bf30c78 100644 --- a/AppKit/Themes/BlendKit/BKShowcaseController.j +++ b/AppKit/Themes/BlendKit/BKShowcaseController.j @@ -137,7 +137,7 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId [_themedObjectsCollectionView setMinItemSize:itemSize]; [_themedObjectsCollectionView setMaxItemSize:itemSize]; - [_themedObjectsCollectionView setContent:[themeDescriptorClass themedObjectTemplates]]; + [_themedObjectsCollectionView setContent:[themeDescriptorClass themedShowcaseObjectTemplates]]; [BKShowcaseCell setBackgroundColor:[themeDescriptorClass showcaseBackgroundColor]]; } @@ -249,12 +249,12 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId - (void)changeState:(id)aSender { - var themedObjectTemplates = [[self selectedThemeDescriptor] themedObjectTemplates], - count = [themedObjectTemplates count]; + var themedShowcaseObjectTemplates = [[self selectedThemeDescriptor] themedShowcaseObjectTemplates], + count = [themedShowcaseObjectTemplates count]; while (count--) { - var themedObject = [themedObjectTemplates[count] valueForKey:@"themedObject"]; + var themedObject = [themedShowcaseObjectTemplates[count] valueForKey:@"themedObject"]; if ([themedObject respondsToSelector:@selector(setEnabled:)]) [themedObject setEnabled:[aSender title] === @"Enabled" ? YES : NO]; @@ -324,7 +324,7 @@ var SelectionColor = nil; [self addSubview:_label]; } - [_label setStringValue:[aThemeDescriptor themeName] + " (" + [[aThemeDescriptor themedObjectTemplates] count] + ")"]; + [_label setStringValue:[aThemeDescriptor themeName] + " (" + [[aThemeDescriptor themedShowcaseObjectTemplates] count] + ")"]; } - (void)setSelected:(BOOL)isSelected diff --git a/AppKit/Themes/BlendKit/BKThemeDescriptor.j b/AppKit/Themes/BlendKit/BKThemeDescriptor.j index 4841fb21e..9ec637754 100644 --- a/AppKit/Themes/BlendKit/BKThemeDescriptor.j +++ b/AppKit/Themes/BlendKit/BKThemeDescriptor.j @@ -25,6 +25,7 @@ var ItemSizes = { }, ThemedObjects = { }, + ThemedShowcaseObjects = { }, BackgroundColors = { }, LightCheckersColor = nil, @@ -120,15 +121,38 @@ var ItemSizes = { }, return ThemedObjects[className]; } ++ (CPArray)themedShowcaseObjectTemplates +{ + var className = [self className]; + + if (!ThemedShowcaseObjects[className]) + [self calculateThemedObjectTemplates]; + + return ThemedShowcaseObjects[className]; +} + + (void)calculateThemedObjectTemplates { var templates = [], + showcaseTemplates = [], itemSize = CGSizeMake(0.0, 0.0), methods = class_copyMethodList([self class].isa), index = 0, - count = [methods count]; + count = [methods count], + excludes = []; - for (; index < count; ++index) + if (class_respondsToSelector(self, @selector(themeShowcaseExcludes))) + excludes = [self themeShowcaseExcludes]; + + for (; index < excludes.length; ++index) + { + var name = excludes[index]; + + if (name && name.indexOf("themed") !== 0) + excludes[index] = "themed" + name.charAt(0).toUpperCase() + name.substr(1); + } + + for (index = 0; index < count; ++index) { var method = methods[index], selector = method_getName(method); @@ -142,26 +166,32 @@ var ItemSizes = { }, if (!object) continue; - var template = [[BKThemedObjectTemplate alloc] init]; + var template = [[BKThemedObjectTemplate alloc] init], + excluded = [excludes containsObject:selector]; [template setValue:object forKey:@"themedObject"]; [template setValue:BKLabelFromIdentifier(selector) forKey:@"label"]; [templates addObject:template]; - if ([object isKindOfClass:[CPView class]]) + if (!excluded) { - var size = [object frame].size, - labelWidth = [[template valueForKey:@"label"] sizeWithFont:[CPFont boldSystemFontOfSize:12.0]].width + 20.0; + if ([object isKindOfClass:[CPView class]]) + { + var size = [object frame].size, + labelWidth = [[template valueForKey:@"label"] sizeWithFont:[CPFont boldSystemFontOfSize:12.0]].width + 20.0; - if (size.width > itemSize.width) - itemSize.width = size.width; + if (size.width > itemSize.width) + itemSize.width = size.width; - if (labelWidth > itemSize.width) - itemSize.width = labelWidth; + if (labelWidth > itemSize.width) + itemSize.width = labelWidth; - if (size.height > itemSize.height) - itemSize.height = size.height; + if (size.height > itemSize.height) + itemSize.height = size.height; + } + + [showcaseTemplates addObject:template]; } } @@ -169,6 +199,7 @@ var ItemSizes = { }, ItemSizes[className] = itemSize; ThemedObjects[className] = templates; + ThemedShowcaseObjects[className] = showcaseTemplates; } + (int)compare:(BKThemeDescriptor)aThemeDescriptor diff --git a/Objective-J/Runtime.js b/Objective-J/Runtime.js index 551113132..c003bd9ab 100644 --- a/Objective-J/Runtime.js +++ b/Objective-J/Runtime.js @@ -256,6 +256,13 @@ GLOBAL(class_getClassMethod) = function(/*Class*/ aClass, /*SEL*/ aSelector) DISPLAY_NAME(class_getClassMethod); +GLOBAL(class_respondsToSelector) = function(/*Class*/ aClass, /*SEL*/ aSelector) +{ + return class_getClassMethod(aClass, aSelector) != NULL; +} + +DISPLAY_NAME(class_respondsToSelector); + GLOBAL(class_copyMethodList) = function(/*Class*/ aClass) { return aClass.method_list.slice(0); From 2f51358ea09590ce827067f8f1e77d8a3cc20959 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 19:32:35 -0400 Subject: [PATCH 18/47] Added documentation for the excluded mechanism. --- AppKit/Themes/Aristo/ThemeDescriptors.j | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 0b5647d2f..2140c3ad7 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -148,6 +148,30 @@ var themedButtonValues = nil, PatternIsVertical); + EXCLUDING A THEMED OBJECT FROM THE SHOWCASE + + When a theme is compiled, a showcase application is created that displays all of the themed objects + by default. There are some cases in which it is either not feasible or not desirable to display + the themed object in the showcase. + + You can exclude themed objects from the showcases by defining the following method in your theme class: + + + (CPArray)themeShowcaseExcludes + + If such a method exists, it should return an array of themed object names to exclude from the showcase. + For example, let's say we want to exclude the themed objects that are defined by the methods + themedAlert, themedCornerview and themedTableDataView. Here is what the themeShowcaseExcludes method + could look like: + + + (CPArray)themeShowcaseExcludes + { + return ["themedAlert", "cornerView", "tableDataView"]; + } + + Note that to make it easier to do the right thing, the names in the array can begin with "themed" or not. + If the name does not begin with "themed", it is prepended and the first character uppercased if it is not there. + + SUBTHEMES If you want to create a theme that inherits from another theme, for example the way From ae47ba78cd39adbb2f1a59e734c6f512d110f552 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 20:31:31 -0400 Subject: [PATCH 19/47] Use [self respondsToSelector] instead of class_respondsToSelector --- AppKit/Themes/BlendKit/BKThemeDescriptor.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/Themes/BlendKit/BKThemeDescriptor.j b/AppKit/Themes/BlendKit/BKThemeDescriptor.j index 9ec637754..48b0d8dbd 100644 --- a/AppKit/Themes/BlendKit/BKThemeDescriptor.j +++ b/AppKit/Themes/BlendKit/BKThemeDescriptor.j @@ -141,7 +141,7 @@ var ItemSizes = { }, count = [methods count], excludes = []; - if (class_respondsToSelector(self, @selector(themeShowcaseExcludes))) + if ([self respondsToSelector:@selector(themeShowcaseExcludes)]) excludes = [self themeShowcaseExcludes]; for (; index < excludes.length; ++index) From 447c33b80622c853f2fd34f10d3da6163fa99e6d Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 22 Aug 2010 23:01:52 -0400 Subject: [PATCH 20/47] Don't layout CPAlert in layoutSubviews since it's not a real view. This avoids the theme showcase error where the CPAlert windowing code was activated by the theme descriptor setup. --- AppKit/CPAlert.j | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 4ce109051..22e166a53 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -165,9 +165,6 @@ CPCriticalAlertStyle = 2; [contentView addSubview:_messageLabel]; [contentView addSubview:_alertImageView]; [contentView addSubview:_informativeLabel]; - - // For reference: does not actually work since this 'view' is not in the hierarchy. - // [self setNeedsLayout]; } /*! @@ -219,9 +216,6 @@ CPCriticalAlertStyle = 2; - (void)setAlertStyle:(CPAlertStyle)style { _alertStyle = style; - - // For reference: does not actually work since this 'view' is not in the hierarchy. - // [self setNeedsLayout]; } /*! @@ -239,9 +233,6 @@ CPCriticalAlertStyle = 2; - (void)setMessageText:(CPString)messageText { [_messageLabel setStringValue:messageText]; - - // For reference: does not actually work since this 'view' is not in the hierarchy. - // [self setNeedsLayout]; } /*! @@ -302,12 +293,9 @@ CPCriticalAlertStyle = 2; [button setKeyEquivalent:nil]; [_buttons addObject:button]; - - // For reference: does not actually work since this 'view' is not in the hierarchy. - // [self setNeedsLayout]; } -- (void)layoutSubviews +- (void)layoutPanel { if (!_alertPanel) [self _createPanel]; @@ -396,7 +384,6 @@ CPCriticalAlertStyle = 2; [button setFrame:CGRectMake(offsetX, buttonY, width, height)]; offsetX -= 10; } - } /*! @@ -406,7 +393,7 @@ CPCriticalAlertStyle = 2; */ - (void)runModal { - [self layoutSubviews]; + [self layoutPanel]; [CPApp runModalForWindow:_alertPanel]; } From b9086f134a8caa308c0a9a9b66db2e2ecdeaca00 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 22 Aug 2010 23:03:51 -0400 Subject: [PATCH 21/47] Don't include table column header graphics in the showcase - they're not really widgets which make sense standing alone. --- AppKit/Themes/Aristo/ThemeDescriptors.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index 2140c3ad7..b0eb2b774 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -324,7 +324,7 @@ var themedButtonValues = nil, + (CPArray)themeShowcaseExcludes { - return ["alert", "cornerview", "tableView", "tableDataView"]; + return ["alert", "cornerview", "columnHeader", "tableView", "tableHeaderRow", "tableDataView"]; } + (CPButton)makeButton From c9b02603bcff83d45ed01aa41be81b25a11a2558 Mon Sep 17 00:00:00 2001 From: Nicholas Small Date: Mon, 23 Aug 2010 15:48:17 -0400 Subject: [PATCH 22/47] Don't use the deprecated .path() method in CFBundle OBJJ_PROGRESS_CALLBACK. --- Objective-J/CFBundle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objective-J/CFBundle.js b/Objective-J/CFBundle.js index 03639c8b0..a64ecf91d 100644 --- a/Objective-J/CFBundle.js +++ b/Objective-J/CFBundle.js @@ -344,7 +344,7 @@ function loadExecutableAndResources(/*Bundle*/ aBundle, /*BOOL*/ shouldExecute) if ((typeof CPApp === "undefined" || !CPApp || !CPApp._finishedLaunching) && typeof OBJJ_PROGRESS_CALLBACK === "function" && CPApplicationSizeInBytes) { - OBJJ_PROGRESS_CALLBACK(MAX(MIN(1.0, CFTotalBytesLoaded / CPApplicationSizeInBytes), 0.0), CPApplicationSizeInBytes, aBundle.path()) + OBJJ_PROGRESS_CALLBACK(MAX(MIN(1.0, CFTotalBytesLoaded / CPApplicationSizeInBytes), 0.0), CPApplicationSizeInBytes, aBundle.bundlePath()) } if (aBundle._loadStatus === CFBundleLoading) From a3d89c8d7854e6fa0d0afb7868c781fcec1bddc3 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Mon, 23 Aug 2010 18:51:00 -0400 Subject: [PATCH 23/47] Ignore table view row selection of already selected rows. This avoids potential infinite recursion caused by the explicit bindings propagation. --- AppKit/CPTableView.j | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 005920d36..a602c5bb4 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -880,7 +880,10 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; - (void)_setSelectedRowIndexes:(CPIndexSet)rows { - var previousSelectedIndexes = [_selectedRowIndexes copy]; + if ([_selectedRowIndexes isEqualToIndexSet:rows]) + return; + + var previousSelectedIndexes = _selectedRowIndexes; _lastSelectedRow = ([rows count] > 0) ? [rows lastIndex] : -1; _selectedRowIndexes = [rows copy]; @@ -3574,7 +3577,7 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", [aCoder encodeInt:_selectionHighlightStyle forKey:CPTableViewSelectionHighlightStyleKey]; [aCoder encodeInt:_columnAutoResizingStyle forKey:CPTableViewColumnAutoresizingStyleKey]; - + [aCoder encodeBool:_allowsMultipleSelection forKey:CPTableViewMultipleSelectionKey]; [aCoder encodeBool:_allowsEmptySelection forKey:CPTableViewEmptySelectionKey]; [aCoder encodeBool:_allowsColumnReordering forKey:CPTableViewColumnReorderingKey]; From febdf4092e9e18298330013386e3cc8d7e450a1b Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Mon, 23 Aug 2010 18:53:29 -0400 Subject: [PATCH 24/47] New implementation of change notifications from CPArrayController. It is crucial that we send notification only before and after complete changes. In the middle notifications might cause observers to see or react to inconsistent data (e.g. selection indexes pointing to rows no longer present). Added some unit tests - more might be needed in the future. Fixed: before and after values when observing array controller key paths during content changes or rearranges were wrong. Fixed: the array controller sent out multiple redundant change notifications. --- AppKit/CPArrayController.j | 235 +++++++++++++++++---------- Foundation/CPKeyValueObserving.j | 5 +- Tests/AppKit/CPArrayControllerTest.j | 128 ++++++++++++++- 3 files changed, 275 insertions(+), 93 deletions(-) diff --git a/AppKit/CPArrayController.j b/AppKit/CPArrayController.j index b04f4e0f9..724a2edee 100644 --- a/AppKit/CPArrayController.j +++ b/AppKit/CPArrayController.j @@ -58,22 +58,30 @@ + (CPSet)keyPathsForValuesAffectingArrangedObjects { - return [CPSet setWithObjects:"content", "contentArray", "contentSet", "filterPredicate", "sortDescriptors"]; + return [CPSet setWithObjects:"content", "filterPredicate", "sortDescriptors"]; } + (CPSet)keyPathsForValuesAffectingSelection { - return [CPSet setWithObjects:"content", "contentArray", "contentSet", "selectionIndexes"]; + return [CPSet setWithObjects:"selectionIndexes"]; } + (CPSet)keyPathsForValuesAffectingSelectionIndex { - return [CPSet setWithObjects:"content", "contentArray", "contentSet", "selectionIndexes", "selection"]; + return [CPSet setWithObjects:"selectionIndexes"]; +} + ++ (CPSet)keyPathsForValuesAffectingSelectionIndexes +{ + // When the arranged objects change, selection preservation may cause the indexes + // to change. + return [CPSet setWithObjects:"arrangedObjects"]; } + (CPSet)keyPathsForValuesAffectingSelectedObjects { - return [CPSet setWithObjects:"content", "contentArray", "contentSet", "selectionIndexes", "selection"]; + // Don't need to depend on arrangedObjects here because selectionIndexes already does. + return [CPSet setWithObjects:"selectionIndexes"]; } + (CPSet)keyPathsForValuesAffectingCanRemove @@ -91,16 +99,6 @@ return [CPSet setWithObjects:"selectionIndexes"]; } -+ (BOOL)automaticallyNotifiesObserversForKey:(CPString)aKey -{ - if (![super automaticallyNotifiesObserversForKey:aKey]) - return NO; - if (aKey === @"selectionIndexes") - return NO; - - return YES; -} - - (id)init { self = [super init]; @@ -153,31 +151,50 @@ if(![value isKindOfClass:[CPArray class]]) value = [value]; - var oldSelection = nil, - oldSelectionIndexes = [self selectionIndexes]; + var oldSelectedObjects = nil, + oldSelectionIndexes = nil; if ([self preservesSelection]) - oldSelection = [self selectedObjects]; + oldSelectedObjects = [self selectedObjects]; + else + oldSelectionIndexes = [self selectionIndexes]; - // Avoid out of bounds selections. - _selectionIndexes = [CPIndexSet indexSet]; - //FIXME: copy? - [super setContent:value]; + /* + When the contents are changed, the selected indexes may no longer refer to the + same items. This would cause problems when setSelectedObjects is called below. + Any KVO observation would try to retrieve the 'before' value which could be + wrong or even throw an exception for no longer existing indexes. + + To avoid that, use the internal __setSelectedObjects which fires no notifications. + The selectionIndexes notifications will fire later since they depend on the + content key. This pattern is also applied for many other methods throughout this + class. + */ + + if (_clearsFilterPredicateOnInsertion) + [self willChangeValueForKey:@"filterPredicate"]; + + // Don't use [super setContent:] as that would fire the contentObject change. + // We need to be in control of when notifications fire. + _contentObject = value; if(_clearsFilterPredicateOnInsertion) - [self setFilterPredicate:nil]; - - [self rearrangeObjects]; - - if (oldSelection) - [self setSelectedObjects:oldSelection]; + [self __setFilterPredicate:nil]; // Causes a _rearrangeObjects. else - [self setSelectionIndexes:oldSelectionIndexes]; + [self _rearrangeObjects]; + + if ([self preservesSelection]) + [self __setSelectedObjects:oldSelectedObjects]; + else + [self __setSelectionIndexes:oldSelectionIndexes]; + + if (_clearsFilterPredicateOnInsertion) + [self didChangeValueForKey:@"filterPredicate"]; } - (void)_setContentArray:(id)anArray { - [self setContent:anArray]; + [self setContent:anArray]; } - (void)_setContentSet:(id)aSet @@ -216,30 +233,38 @@ - (void)rearrangeObjects { - // Rearranging reapplies the selection criteria and may cause objects to disappear, - // so take care of the selection. - // - // Sometimes rearrangeObjects is called by setContent which may cause two rounds of - // selection preservation. This is okay because setContent temporarily clears the - // selection and so this code below ends up preserving nothing in that case. - var oldSelection = nil, - oldSelectionIndexes = [[self selectionIndexes] copy]; - - if ([self preservesSelection]) - oldSelection = [self selectedObjects]; - - // Avoid out of bounds selections. - _selectionIndexes = [CPIndexSet indexSet]; - - [self _setArrangedObjects:[self arrangeObjects:[self contentArray]]]; - - if (oldSelection) - [self setSelectedObjects:oldSelection]; - else - [self setSelectionIndexes:oldSelectionIndexes]; + [self willChangeValueForKey:@"arrangedObjects"]; + [self _rearrangeObjects]; + [self didChangeValueForKey:@"arrangedObjects"]; } -- (void)_setArrangedObjects:(id)value +/* + Like rearrangeObjects but don't fire any change notifications. + @ignore +*/ +- (void)_rearrangeObjects +{ + /* + Rearranging reapplies the selection criteria and may cause objects to disappear, + so take care of the selection. + */ + var oldSelectedObjects = nil, + oldSelectionIndexes = nil; + + if ([self preservesSelection]) + oldSelectedObjects = [self selectedObjects]; + else + oldSelectionIndexes = [self selectionIndexes]; + + [self __setArrangedObjects:[self arrangeObjects:[self contentArray]]]; + + if ([self preservesSelection]) + [self __setSelectedObjects:oldSelectedObjects]; + else + [self __setSelectionIndexes:oldSelectionIndexes]; +} + +- (void)__setArrangedObjects:(id)value { if (_arrangedObjects === value) return; @@ -252,7 +277,6 @@ return _arrangedObjects; } - - (CPArray)sortDescriptors { return _sortDescriptors; @@ -264,7 +288,9 @@ return; _sortDescriptors = [value copy]; - [self rearrangeObjects]; + // Use the non-notification version since arrangedObjects already depends + // on sortDescriptors. + [self _rearrangeObjects]; } - (CPPredicate)filterPredicate @@ -273,12 +299,23 @@ } - (void)setFilterPredicate:(CPPredicate)value +{ + [self __setFilterPredicate:value]; +} + +/* + Like setFilterPredicate but don't fire any change notifications. + @ignore +*/ +- (void)__setFilterPredicate:(CPPredicate)value { if (_filterPredicate === value) return; _filterPredicate = value; - [self rearrangeObjects]; + // Use the non-notification version since arrangedObjects already depends + // on filterPredicate. + [self _rearrangeObjects]; } - (BOOL)alwaysUsesMultipleValuesMarker @@ -305,6 +342,18 @@ - (BOOL)setSelectionIndexes:(CPIndexSet)indexes { + [self __setSelectionIndexes:indexes]; +} + +/* + Like setSelectionIndexes but don't fire any change notifications. + @ignore +*/ +- (BOOL)__setSelectionIndexes:(CPIndexSet)indexes +{ + if (!indexes) + indexes = [CPIndexSet indexSet]; + if ([_selectionIndexes isEqualToIndexSet:indexes]) return NO; @@ -323,14 +372,8 @@ indexes = [CPIndexSet indexSetWithIndex:objectsCount-1]; } - [self willChangeValueForKey:@"selectionIndexes"]; - [self _selectionWillChange]; - _selectionIndexes = [indexes copy]; - [self _selectionDidChange]; - [self didChangeValueForKey:@"selectionIndexes"]; - // Push back the new selection to the model for selectionIndexes if we have one. // There won't be an infinite loop because of the equality check above. [[CPKeyValueBinding getBinding:@"selectionIndexes" forObject:self] reverseSetValueFor:@"selectionIndexes"]; @@ -346,6 +389,21 @@ } - (BOOL)setSelectedObjects:(CPArray)objects +{ + [self willChangeValueForKey:@"selectionIndexes"]; + [self _selectionWillChange]; + + [self __setSelectedObjects:objects]; + + [self didChangeValueForKey:@"selectionIndexes"]; + [self _selectionDidChange]; +} + +/* + Like setSelectedObjects but don't fire any change notifications. + @ignore +*/ +- (BOOL)__setSelectedObjects:(CPArray)objects { var set = [CPIndexSet indexSet], count = [objects count], @@ -359,7 +417,7 @@ [set addIndex:index]; } - [self setSelectionIndexes:set]; + [self __setSelectionIndexes:set]; return YES; } @@ -398,30 +456,32 @@ if (![self canAdd]) return; + if (_clearsFilterPredicateOnInsertion) + [self willChangeValueForKey:@"filterPredicate"]; + [self willChangeValueForKey:@"content"]; [_contentObject addObject:object]; - [self didChangeValueForKey:@"content"]; if (_clearsFilterPredicateOnInsertion) - [self setFilterPredicate:nil]; + [self __setFilterPredicate:nil]; if (_filterPredicate === nil || [_filterPredicate evaluateWithObject:object]) { var pos = [_arrangedObjects insertObject:object inArraySortedByDescriptors:_sortDescriptors]; + // selectionIndexes change notification will be fired as a result of the + // content change. Don't fire manually. if (_selectsInsertedObjects) - { - [self setSelectionIndex:pos]; - } + [self __setSelectionIndex:pos]; else - { - [self willChangeValueForKey:@"selectionIndexes"]; [_selectionIndexes shiftIndexesStartingAtIndex:pos by:1]; - [self didChangeValueForKey:@"selectionIndexes"]; - } } else - [self rearrangeObjects]; + [self _rearrangeObjects]; + + [self didChangeValueForKey:@"content"]; + if (_clearsFilterPredicateOnInsertion) + [self didChangeValueForKey:@"filterPredicate"]; } - (void)insertObject:(id)anObject atArrangedObjectIndex:(int)anIndex @@ -429,26 +489,30 @@ if (![self canAdd]) return; + if (_clearsFilterPredicateOnInsertion) + [self willChangeValueForKey:@"filterPredicate"]; + [self willChangeValueForKey:@"content"]; [_contentObject insertObject:anObject atIndex:anIndex]; - [self didChangeValueForKey:@"content"]; if (_clearsFilterPredicateOnInsertion) - [self setFilterPredicate:nil]; + [self __setFilterPredicate:nil]; [[self arrangedObjects] insertObject:anObject atIndex:anIndex]; + // selectionIndexes change notification will be fired as a result of the + // content change. Don't fire manually. if ([self selectsInsertedObjects]) - [self setSelectionIndex:anIndex]; + [self __setSelectionIndex:anIndex]; else - { - [self willChangeValueForKey:@"selectionIndexes"] [[self selectionIndexes] shiftIndexesStartingAtIndex:anIndex by:1]; - [self didChangeValueForKey:@"selectionIndexes"]; - } if ([self avoidsEmptySelection] && [[self selectionIndexes] count] <= 0 && [_contentObject count] > 0) - [self setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + [self __setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]]; + + [self didChangeValueForKey:@"content"]; + if (_clearsFilterPredicateOnInsertion) + [self didChangeValueForKey:@"filterPredicate"]; } - (void)removeObject:(id)object @@ -458,18 +522,18 @@ [self willChangeValueForKey:@"content"]; [_contentObject removeObject:object]; - [self didChangeValueForKey:@"content"]; if (_filterPredicate === nil || [_filterPredicate evaluateWithObject:object]) { - [self willChangeValueForKey:@"selectionIndexes"]; + // selectionIndexes change notification will be fired as a result of the + // content change. Don't fire manually. var pos = [_arrangedObjects indexOfObject:object]; [_arrangedObjects removeObjectAtIndex:pos]; [_selectionIndexes shiftIndexesStartingAtIndex:pos by:-1]; - - [self didChangeValueForKey:@"selectionIndexes"]; } + + [self didChangeValueForKey:@"content"]; } -(void)add:(id)sender @@ -527,7 +591,6 @@ { [self willChangeValueForKey:@"content"]; [_contentObject removeObjectsInArray:objects]; - [self didChangeValueForKey:@"content"]; var arrangedObjects = [self arrangedObjects], position = [arrangedObjects indexOfObject:[objects objectAtIndex:0]]; @@ -550,9 +613,9 @@ selectionIndexes = [CPIndexSet indexSetWithIndex:objectsCount - 1]; } - [self willChangeValueForKey:@"selectionIndexes"]; _selectionIndexes = selectionIndexes; - [self didChangeValueForKey:@"selectionIndexes"]; + + [self didChangeValueForKey:@"content"]; } - (BOOL)canInsert diff --git a/Foundation/CPKeyValueObserving.j b/Foundation/CPKeyValueObserving.j index 6ea9c9a42..a08100481 100644 --- a/Foundation/CPKeyValueObserving.j +++ b/Foundation/CPKeyValueObserving.j @@ -27,7 +27,6 @@ @import "CPObject.j" @import "CPSet.j" - @implementation CPObject (KeyValueObserving) - (void)willChangeValueForKey:(CPString)aKey @@ -394,6 +393,7 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, - (void)_sendNotificationsForKey:(CPString)aKey changeOptions:(CPDictionary)changeOptions isBefore:(BOOL)isBefore { + // CPLog.warn("_sendNotificationsForKey: " + aKey + " ...isBefore: " + isBefore); var changes = _changesForKey[aKey]; if (isBefore) @@ -492,6 +492,9 @@ var kvoNewAndOld = CPKeyValueObservingOptionNew|CPKeyValueObservingOptionOld, { var keyPath = dependentKeyPaths[index]; + // CPLog.warn("firing dependepent key " + index + " for " + aKey + ": "+keyPath); + // objj_backtrace_print(CPLog.error); + [self _sendNotificationsForKey:keyPath changeOptions:isBefore ? [changeOptions copy] : _changesForKey[keyPath] isBefore:isBefore]; diff --git a/Tests/AppKit/CPArrayControllerTest.j b/Tests/AppKit/CPArrayControllerTest.j index d311ccd56..aa1b2676e 100644 --- a/Tests/AppKit/CPArrayControllerTest.j +++ b/Tests/AppKit/CPArrayControllerTest.j @@ -1,7 +1,9 @@ @implementation CPArrayControllerTest : OJTestCase { - CPArrayController _arrayController @accessors(property=arrayController); - CPArray _contentArray @accessors(property=contentArray); + CPArrayController _arrayController @accessors(property=arrayController); + CPArray _contentArray @accessors(property=contentArray); + + CPArray observations; } - (void)setUp @@ -19,7 +21,7 @@ - (void)testInitWithContent { [self assert:[self contentArray] equals:[[self arrayController] contentArray]]; - [self assert:[_CPObservableArray class] equals:[[[self arrayController] arrangedObjects] class]]; + [self assert:[_CPObservableArray class] equals:[[[self arrayController] arrangedObjects] class] message:"arranged objects should be observable"]; } - (void)testSetContent @@ -125,12 +127,126 @@ [self assert:[[self arrayController] contentArray] equals:[self contentArray]]; } +- (CPArray)setupObservationFixture +{ + // objj_msgSend_decorate(objj_backtrace_decorator); + + var ac = [self arrayController]; + [ac setSelectionIndex:0]; + [ac setPreservesSelection:YES]; + var newContent = [_contentArray copy]; + [newContent removeObjectAtIndex:0]; + + [ac addObserver:self forKeyPath:"content" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:nil]; + [ac addObserver:self forKeyPath:"selectionIndexes" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:nil]; + [ac addObserver:self forKeyPath:"selectedObjects" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:nil]; + [ac addObserver:self forKeyPath:"arrangedObjects" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:nil]; + + observations = []; + + return newContent; +} + +- (void)testObservationDuringSetContent +{ + /* + There are two areas where CPArrayController can get into trouble with observation. + + The more serious one is that the before values when observing selectedObjects + need to be correct and not affected by the new setContent: values. + + Second, the array controller should not send out more than one of each notification + since repeated notifications for the same change can be a huge performance drain + from such a central piece of code. + */ + + var ac = [self arrayController], + newContent = [self setupObservationFixture]; + + [ac setContent:newContent]; + + [observations sortUsingFunction:function(a, b) { return [a.keyPath compare:b.keyPath] } context:nil]; + [self assert:4 equals:[observations count] message:"exactly 4 change notifications should be sent for new content"]; + + // for (var i=0; i", [self name], [self age]]; } @end \ No newline at end of file From 71408e7c3a48657c14b243a3903fd1905a59201d Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 15 Apr 2010 11:15:21 +0200 Subject: [PATCH 25/47] made CPObjectController call it's designated initializer (init) --- AppKit/CPObjectController.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index f070d33bf..5bc7a6988 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -53,7 +53,7 @@ - (id)initWithContent:(id)aContent { - self = [super init]; + self = [self init]; if (self) { From 60dd1863b37f30df0861ffa50ef736bb373c0c98 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Fri, 16 Apr 2010 13:56:16 +0200 Subject: [PATCH 26/47] Implement objectsAtIndexes on _CPObservableArray to return another _CPObservableArray instance --- AppKit/CPObjectController.j | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index 5bc7a6988..838f15c84 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -455,6 +455,11 @@ var CPObjectControllerObjectClassNameKey = @"CPObjectControllerOb [super removeObjectAtIndex:anIndex]; } +- (_CPObservableArray)objectsAtIndexes:(CPIndexSet)theIndexes +{ + return [_CPObservableArray arrayWithArray:[super objectsAtIndexes:theIndexes]]; +} + - (void)addObject:(id)anObject { [self insertObject:anObject atIndex:[self count]]; From ee4802e5130ee3abd41c7f8df730a3c5b38e0d83 Mon Sep 17 00:00:00 2001 From: cacaodev Date: Tue, 24 Aug 2010 00:32:26 +0200 Subject: [PATCH 27/47] CPAlert: Attached alerts. Added a new method -beginSheetModalForWindow: that calls -alertDidEnd:returnCode: on ending. CPAlertTest update testing it. Fixed a bug in CPWindow where the didEndSelector was reset too early. This bug was visible only when trying to chain sheet alerts. Fixed a local/instance variable conflict in AttachedSheet/AppController.j --- AppKit/CPAlert.j | 68 ++++++++++++++++++---- AppKit/CPWindow/CPWindow.j | 23 +++++--- Tests/Manual/AttachedSheet/AppController.j | 27 ++++----- Tests/Manual/CPAlertTest/AppController.j | 26 +++++++-- 4 files changed, 105 insertions(+), 39 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 22e166a53..d82dcb2a4 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -51,7 +51,6 @@ CPInformationalAlertStyle = 1; */ CPCriticalAlertStyle = 2; - /*! @ingroup appkit @@ -88,6 +87,8 @@ CPCriticalAlertStyle = 2; CPArray _buttons; id _delegate; + SEL _didEndSelector; + id _modalDelegate; } + (CPString)themeClass @@ -126,6 +127,7 @@ CPCriticalAlertStyle = 2; _alertStyle = CPWarningAlertStyle; _alertPanel = nil; _windowStyle = nil; + _alertDidEndSelector = nil; _messageLabel = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; _alertImageView = [[CPImageView alloc] initWithFrame:CGRectMakeZero()]; @@ -145,7 +147,7 @@ CPCriticalAlertStyle = 2; { _windowStyle = styleMask; - [self setTheme:(_windowStyle === CPHUDBackgroundWindowMask) ? [CPTheme defaultHudTheme] : [CPTheme defaultTheme]]; + [self setTheme:(_windowStyle & CPHUDBackgroundWindowMask) ? [CPTheme defaultHudTheme] : [CPTheme defaultTheme]]; // We'll need to recreate the panel to get the new window style. _alertPanel = nil; @@ -281,7 +283,7 @@ CPCriticalAlertStyle = 2; [button setTitle:title]; [button setTarget:self]; [button setTag:_buttonCount]; - [button setAction:@selector(_notifyDelegate:)]; + [button setAction:@selector(_dismissAlert:)]; [[_alertPanel contentView] addSubview:button]; @@ -397,14 +399,60 @@ CPCriticalAlertStyle = 2; [CPApp runModalForWindow:_alertPanel]; } -/* @ignore */ -- (void)_notifyDelegate:(id)button -{ - [CPApp abortModal]; - [_alertPanel close]; +/* + Runs the receiver modally as an alert sheet attached to a specified window. - if (_delegate && [_delegate respondsToSelector:@selector(alertDidEnd:returnCode:)]) - [_delegate alertDidEnd:self returnCode:[button tag]]; + @param window The parent window for the sheet. + @param modalDelegate The delegate for the modal-dialog session. + @param alertDidEndSelector Message the alert sends to modalDelegate after the sheet is dismissed. + @param contextInfo Contextual data passed to modalDelegate in didEndSelector message. +*/ +- (void)beginSheetModalForWindow:(CPWindow)window modalDelegate:(id)modalDelegate didEndSelector:(SEL)alertDidEndSelector contextInfo:(void)contextInfo +{ + [self layoutPanel]; + + _didEndSelector = alertDidEndSelector; + _modalDelegate = modalDelegate; + + [CPApp beginSheet:_alertPanel modalForWindow:window modalDelegate:self didEndSelector:@selector(_alertDidEnd:returnCode:contextInfo:) contextInfo:contextInfo]; +} + +/* + Runs the receiver modally as an alert sheet attached to a specified window. + + @param window The parent window for the sheet. +*/ +- (void)beginSheetModalForWindow:(CPWindow)window +{ + [self layoutPanel]; + + [CPApp beginSheet:_alertPanel modalForWindow:window modalDelegate:self didEndSelector:@selector(_alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; +} + +- (void)_alertDidEnd:(CPWindow)aSheet returnCode:(CPInteger)returnCode contextInfo:(id)contextInfo +{ + if ([_delegate respondsToSelector:@selector(alertDidEnd:returnCode:)]) + [_delegate alertDidEnd:self returnCode:returnCode]; + + if (_didEndSelector) + objj_msgSend(_modalDelegate, _didEndSelector, self, returnCode, contextInfo); + + _didEndSelector = nil; + _modalDelegate = nil; +} + +/* @ignore */ +- (void)_dismissAlert:(CPButton)button +{ + if ([_alertPanel isSheet]) + [CPApp endSheet:_alertPanel returnCode:[button tag]]; + else + { + [CPApp abortModal]; + [_alertPanel close]; + + [self _alertDidEnd:nil returnCode:[button tag] contextInfo:nil]; + } } @end diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 71210c9a3..aa4e5e817 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -199,6 +199,8 @@ var SHADOW_MARGIN_LEFT = 20.0, var CPWindowSaveImage = nil, CPWindowSavingImage = nil; + +var CPWindowResizeTime = 0.2; /*! @ingroup appkit @@ -2098,6 +2100,11 @@ CPTexturedBackgroundWindowMask [_frameAnimation startAnimation]; } +- (CPTimeInterval)animationResizeTime:(CGRect)newWindowFrame +{ + return CPWindowResizeTime; +} + /* @ignore */ - (void)_setAttachedSheetFrameOrigin { @@ -2146,7 +2153,7 @@ CPTexturedBackgroundWindowMask [aSheet setFrame:startFrame display:YES animate:NO]; _sheetContext["opened"] = YES; - [aSheet _setFrame:endFrame delegate:self duration:0.2 curve:CPAnimationEaseOut]; + [aSheet _setFrame:endFrame delegate:self duration:[self animationResizeTime:endFrame] curve:CPAnimationEaseOut]; // Should run the main loop here until _isAnimating = FALSE [aSheet becomeKeyWindow]; @@ -2167,7 +2174,7 @@ CPTexturedBackgroundWindowMask [self _setUpMasksForView:sheetContent]; _sheetContext["opened"] = NO; - [sheet _setFrame:endFrame delegate:self duration:0.2 curve:CPAnimationEaseIn]; + [sheet _setFrame:endFrame delegate:self duration:[self animationResizeTime:endFrame] curve:CPAnimationEaseIn]; } /* @ignore */ @@ -2196,13 +2203,15 @@ CPTexturedBackgroundWindowMask [self _restoreMasksForView:sheetContent]; var delegate = _sheetContext["modalDelegate"], - endSelector = _sheetContext["endSelector"]; - - if (delegate != nil && endSelector != nil) - objj_msgSend(delegate, endSelector, sheet, _sheetContext["returnCode"], _sheetContext["contextInfo"]); + endSelector = _sheetContext["endSelector"], + returnCode = _sheetContext["returnCode"], + contextInfo = _sheetContext["contextInfo"]; _sheetContext = nil; sheet._parentView = nil; + + if (delegate != nil && endSelector != nil) + objj_msgSend(delegate, endSelector, sheet, returnCode, contextInfo); } - (void)_setUpMasksForView:(CPView)aView @@ -2673,7 +2682,7 @@ var interpolate = function(fromValue, toValue, progress) - (id)initWithWindow:(CPWindow)aWindow targetFrame:(CGRect)aTargetFrame { - self = [super initWithDuration:0.2 animationCurve:CPAnimationLinear]; + self = [super initWithDuration:[aWindow animationResizeTime:aTargetFrame] animationCurve:CPAnimationLinear]; if (self) { diff --git a/Tests/Manual/AttachedSheet/AppController.j b/Tests/Manual/AttachedSheet/AppController.j index 1c50847ea..152197203 100644 --- a/Tests/Manual/AttachedSheet/AppController.j +++ b/Tests/Manual/AttachedSheet/AppController.j @@ -22,28 +22,28 @@ [window setMinSize:CGSizeMake(300, 200)]; sheet = [[CPWindow alloc] initWithContentRect:CGRectMake(0,0,300,100) styleMask:CPDocModalWindowMask|CPResizableWindowMask]; [sheet setMinSize:CGSizeMake(300,100)]; - + var sheetContent = [sheet contentView]; - + textField = [[CPTextField alloc] initWithFrame:CGRectMake(10,30,280,30)]; [textField setEditable:YES]; [textField setBezeled:YES]; [textField setAutoresizingMask:CPViewWidthSizable]; - + var okButton = [[CPButton alloc] initWithFrame:CGRectMake(230,70,50,24)]; [okButton setTitle:"OK"]; [okButton setTarget:self]; [okButton setTag:1]; [okButton setAction:@selector(closeSheet:)]; - [okButton setAutoresizingMask:CPViewMinXMargin|CPViewMinYMargin]; + [okButton setAutoresizingMask:CPViewMinXMargin|CPViewMinYMargin]; var cancelButton = [[CPButton alloc] initWithFrame:CGRectMake(120,70,100,24)]; [cancelButton setTitle:"Cancel"]; [cancelButton setTarget:self]; [cancelButton setTag:0]; - [cancelButton setAction:@selector(closeSheet:)]; - [cancelButton setAutoresizingMask:CPViewMinXMargin|CPViewMinYMargin]; - + [cancelButton setAction:@selector(closeSheet:)]; + [cancelButton setAutoresizingMask:CPViewMinXMargin|CPViewMinYMargin]; + [sheetContent addSubview:textField]; [sheetContent addSubview:okButton]; [sheetContent addSubview:cancelButton]; @@ -51,9 +51,9 @@ var displayButton = [[CPButton alloc] initWithFrame:CGRectMake(200,150,100,24)]; [displayButton setTitle:"Display Sheet"]; [displayButton setTarget:self]; - [displayButton setAction:@selector(displaySheet:)]; + [displayButton setAction:@selector(displaySheet:)]; [contentView addSubview:displayButton]; - + [window orderFront:self] } @@ -65,20 +65,15 @@ [CPApp beginSheet:sheet modalForWindow:window modalDelegate:self didEndSelector:@selector(didEndSheet:returnCode:contextInfo:) contextInfo:nil]; } -- (void)alertDidEnd:(CPWindow)sheet returnCode:(int)returnCode contextInfo:(id)contextInfo -{ - CPLogConsole(_cmd+" returnCode " + returnCode); -} - - (void)closeSheet:(id)sender { [CPApp endSheet:sheet returnCode:[sender tag]]; } -- (void)didEndSheet:(CPWindow)sheet returnCode:(int)returnCode contextInfo:(id)contextInfo +- (void)didEndSheet:(CPWindow)aSheet returnCode:(int)returnCode contextInfo:(id)contextInfo { var str = [textField stringValue]; - + [sheet orderOut:self]; if (returnCode == CPOKButton && [str length] > 0) { diff --git a/Tests/Manual/CPAlertTest/AppController.j b/Tests/Manual/CPAlertTest/AppController.j index 1b7ffe44c..d8d557b5c 100644 --- a/Tests/Manual/CPAlertTest/AppController.j +++ b/Tests/Manual/CPAlertTest/AppController.j @@ -11,6 +11,7 @@ @implementation AppController : CPObject { + CPWindow theWindow; CPTextField label; CPArray variations; CPArray messages; @@ -21,7 +22,7 @@ { messages = [ [@"Are you sure you want to theorise before you have data?", - @"Invariably, you end up twisting facts to suit theories, instead of theories to suit facts.", + @"Invariably, you end up twisting facts to suit theories, instead of theories to suit facts. lkjhdlkfjhlekjhglkjrshlkjfhsglksrjhfsmlgkjfskljhgkljflkjmlgkhjùlrkjhlmkjmrlekjghmlkjermlgkhjmlfekjghmlkjremlkjghmlkerjmlghkjmlerkjgmlhkjmerlkjgmhlkjmelrkjhmlkjrgmlkjhmlkrjgmlhkjrmelkgjhmlkrejhmlkjrgmlhkjmrlkgjhlmkrzj", "Theorise", "Cancel"], [@"Snakes. Why did it have to be snakes?", nil, @@ -39,10 +40,13 @@ [CPHUDBackgroundWindowMask, CPWarningAlertStyle], [CPHUDBackgroundWindowMask, CPInformationalAlertStyle], [CPHUDBackgroundWindowMask, CPCriticalAlertStyle], + [CPDocModalWindowMask, CPWarningAlertStyle], + [CPDocModalWindowMask, CPInformationalAlertStyle], + [CPDocModalWindowMask, CPCriticalAlertStyle] ]; - var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], - contentView = [theWindow contentView]; + theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(100,100,500,500) styleMask:CPTitledWindowMask]; + var contentView = [theWindow contentView]; label = [[CPTextField alloc] initWithFrame:CGRectMake(15, 15, 400, 24)]; @@ -57,8 +61,9 @@ //[CPMenu setMenuBarVisible:YES]; } -- (void)alertDidEnd:(CPAlert)anAlert returnCode:(id)returnCode +- (void)alertDidEnd:(CPAlert)anAlert returnCode:(CPInteger)returnCode { +CPLogConsole(_cmd); if (returnCode === 0) [label setStringValue:"You chose the default action."]; else @@ -67,6 +72,11 @@ [self showNextAlertVariation]; } +- (void)customDidEnd:(CPAlert)anAlert code:(id)code context:(id)context +{ + CPLogConsole(_cmd + anAlert + code + context); +} + - (void)showNextAlertVariation { if (![variations count]) @@ -79,15 +89,19 @@ messageIndex = (messageIndex + 1) % messages.length; [variations removeObjectAtIndex:0]; + var windowStyle = variation[0]; [alert setDelegate:self]; [alert setMessageText:message[0]]; [alert setInformativeText:message[1]]; [alert addButtonWithTitle:message[2]]; [alert addButtonWithTitle:message[3]]; - [alert setWindowStyle:variation[0]]; + [alert setWindowStyle:windowStyle]; [alert setAlertStyle:variation[1]]; - [alert runModal]; + if (windowStyle & CPDocModalWindowMask) + [alert beginSheetModalForWindow:theWindow modalDelegate:self didEndSelector:@selector(customDidEnd:code:context:) contextInfo:@"here is some context"]; + else + [alert runModal]; } @end From 1a27ae39a38be2af77e6540e038bf690e1b8b183 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 24 Aug 2010 11:52:59 -0400 Subject: [PATCH 28/47] Removed CPAlert long message test from last commit since this branch already has its own long message test. Also slight clean up. --- AppKit/CPAlert.j | 4 ++-- AppKit/CPWindow/CPWindow.j | 4 ++-- Tests/Manual/CPAlertTest/AppController.j | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index d82dcb2a4..17570c698 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -399,7 +399,7 @@ CPCriticalAlertStyle = 2; [CPApp runModalForWindow:_alertPanel]; } -/* +/*! Runs the receiver modally as an alert sheet attached to a specified window. @param window The parent window for the sheet. @@ -417,7 +417,7 @@ CPCriticalAlertStyle = 2; [CPApp beginSheet:_alertPanel modalForWindow:window modalDelegate:self didEndSelector:@selector(_alertDidEnd:returnCode:contextInfo:) contextInfo:contextInfo]; } -/* +/*! Runs the receiver modally as an alert sheet attached to a specified window. @param window The parent window for the sheet. diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index aa4e5e817..a3816c870 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -199,7 +199,7 @@ var SHADOW_MARGIN_LEFT = 20.0, var CPWindowSaveImage = nil, CPWindowSavingImage = nil; - + var CPWindowResizeTime = 0.2; /*! @@ -2211,7 +2211,7 @@ CPTexturedBackgroundWindowMask sheet._parentView = nil; if (delegate != nil && endSelector != nil) - objj_msgSend(delegate, endSelector, sheet, returnCode, contextInfo); + objj_msgSend(delegate, endSelector, sheet, returnCode, contextInfo); } - (void)_setUpMasksForView:(CPView)aView diff --git a/Tests/Manual/CPAlertTest/AppController.j b/Tests/Manual/CPAlertTest/AppController.j index d8d557b5c..36ec908d4 100644 --- a/Tests/Manual/CPAlertTest/AppController.j +++ b/Tests/Manual/CPAlertTest/AppController.j @@ -22,7 +22,7 @@ { messages = [ [@"Are you sure you want to theorise before you have data?", - @"Invariably, you end up twisting facts to suit theories, instead of theories to suit facts. lkjhdlkfjhlekjhglkjrshlkjfhsglksrjhfsmlgkjfskljhgkljflkjmlgkhjùlrkjhlmkjmrlekjghmlkjermlgkhjmlfekjghmlkjremlkjghmlkerjmlghkjmlerkjgmlhkjmerlkjgmhlkjmelrkjhmlkjrgmlkjhmlkrjgmlhkjrmelkgjhmlkrejhmlkjrgmlhkjmrlkgjhlmkrzj", + @"Invariably, you end up twisting facts to suit theories, instead of theories to suit facts.", "Theorise", "Cancel"], [@"Snakes. Why did it have to be snakes?", nil, @@ -63,7 +63,7 @@ - (void)alertDidEnd:(CPAlert)anAlert returnCode:(CPInteger)returnCode { -CPLogConsole(_cmd); + CPLogConsole(_cmd); if (returnCode === 0) [label setStringValue:"You chose the default action."]; else From 9968896bbd9358a952610442db6e0f7e7738c11d Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 24 Aug 2010 12:14:24 -0400 Subject: [PATCH 29/47] When running CPAlert as a sheet, automatically activate the CPDocModalWindowMask window style if needed. --- AppKit/CPAlert.j | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 17570c698..bcaa92058 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -409,6 +409,8 @@ CPCriticalAlertStyle = 2; */ - (void)beginSheetModalForWindow:(CPWindow)window modalDelegate:(id)modalDelegate didEndSelector:(SEL)alertDidEndSelector contextInfo:(void)contextInfo { + if (!(_windowStyle & CPDocModalWindowMask)) + [self setWindowStyle:CPDocModalWindowMask]; [self layoutPanel]; _didEndSelector = alertDidEndSelector; @@ -424,6 +426,8 @@ CPCriticalAlertStyle = 2; */ - (void)beginSheetModalForWindow:(CPWindow)window { + if (!(_windowStyle & CPDocModalWindowMask)) + [self setWindowStyle:CPDocModalWindowMask]; [self layoutPanel]; [CPApp beginSheet:_alertPanel modalForWindow:window modalDelegate:self didEndSelector:@selector(_alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; From 65d957f9f5d7d5c62f9930550132873eae744d7a Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Tue, 24 Aug 2010 13:58:31 -0400 Subject: [PATCH 30/47] Fixed: an ivar was not being properly initialized in CPAlert. --- AppKit/CPAlert.j | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index bcaa92058..897145104 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -127,7 +127,7 @@ CPCriticalAlertStyle = 2; _alertStyle = CPWarningAlertStyle; _alertPanel = nil; _windowStyle = nil; - _alertDidEndSelector = nil; + _didEndSelector = nil; _messageLabel = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; _alertImageView = [[CPImageView alloc] initWithFrame:CGRectMakeZero()]; @@ -252,8 +252,6 @@ CPCriticalAlertStyle = 2; - (void)setInformativeText:(CPString)informativeText { [_informativeLabel setStringValue:informativeText]; - // No need to call _layoutMessage - only the length of the messageText - // can affect anything there. } /*! From 64000215a45e7ea08712c19f9e54df6bc1ce8eed Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 25 Aug 2010 13:15:19 +0200 Subject: [PATCH 31/47] Call CPObjectController designated initializer from init and initialize _observedKeys instance variable --- AppKit/CPObjectController.j | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AppKit/CPObjectController.j b/AppKit/CPObjectController.j index 838f15c84..fe12d1224 100644 --- a/AppKit/CPObjectController.j +++ b/AppKit/CPObjectController.j @@ -51,15 +51,20 @@ return [CPSet setWithObjects:"editable", "selection"]; } +- (id)init +{ + return [self initWithContent:nil]; +} + - (id)initWithContent:(id)aContent { - self = [self init]; - - if (self) + if (self = [super init]) { [self setContent:aContent]; [self setEditable:YES]; [self setObjectClass:[CPMutableDictionary class]]; + + _observedKeys = [[CPCountedSet alloc] init]; } return self; From c9752195ace26b9804f4f5083b314be30d177e3e Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Tue, 24 Aug 2010 14:33:01 +0200 Subject: [PATCH 32/47] several CPButton theming additions - made image and alternate image a theme property - made image margins theme-able --- AppKit/CPButton.j | 48 ++++++++++++------------- AppKit/Themes/Aristo/ThemeDescriptors.j | 4 ++- AppKit/_CPImageAndTextView.j | 35 ++++++++++++------ 3 files changed, 49 insertions(+), 38 deletions(-) diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 9cbc33b20..34b6b0a3e 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -89,9 +89,6 @@ CPButtonStateMixed = CPThemeState("mixed"); CPString _title; CPString _alternateTitle; - CPImage _image; - CPImage _alternateImage; - CPInteger _showsStateBy; CPInteger _highlightsBy; BOOL _imageDimsWhenDisabled; @@ -127,8 +124,8 @@ CPButtonStateMixed = CPThemeState("mixed"); + (id)themeAttributes { - return [CPDictionary dictionaryWithObjects:[_CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null]] - forKeys:[@"bezel-inset", @"content-inset", @"bezel-color"]]; + return [CPDictionary dictionaryWithObjects:[[CPNull null], 0.0, _CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null]] + forKeys:[@"image", @"imageOffset", @"bezel-inset", @"content-inset", @"bezel-color"]]; } - (id)initWithFrame:(CGRect)aFrame @@ -284,18 +281,12 @@ CPButtonStateMixed = CPThemeState("mixed"); - (void)setImage:(CPImage)anImage { - if (_image === anImage) - return; - - _image = anImage; - - [self setNeedsLayout]; - [self setNeedsDisplay:YES]; + [self setValue:anImage forThemeAttribute:@"image"]; } - (CPImage)image { - return _image; + return [self valueForThemeAttribute:@"image" inState:CPThemeStateNormal]; } /*! @@ -304,13 +295,7 @@ CPButtonStateMixed = CPThemeState("mixed"); */ - (void)setAlternateImage:(CPImage)anImage { - if (_alternateImage === anImage) - return; - - _alternateImage = anImage; - - [self setNeedsLayout]; - [self setNeedsDisplay:YES]; + [self setValue:anImage forThemeAttribute:@"image" inState:CPThemeStateHighlighted]; } /*! @@ -318,7 +303,17 @@ CPButtonStateMixed = CPThemeState("mixed"); */ - (CPImage)alternateImage { - return _alternateImage; + return [self valueForThemeAttribute:@"image" inState:CPThemeStateHighlighted]; +} + +- (void)setImageOffset:(float)theImageOffset +{ + [self setValue:theImageOffset forThemeAttribute:@"imageOffset"]; +} + +- (float)imageOffset +{ + return [self valueForThemeAttribute:@"imageOffset"]; } - (void)setShowsStateBy:(CPInteger)aMask @@ -525,7 +520,8 @@ CPButtonStateMixed = CPThemeState("mixed"); if (contentView) { [contentView setText:([self hasThemeState:CPThemeStateHighlighted] && _alternateTitle) ? _alternateTitle : _title]; - [contentView setImage:([self hasThemeState:CPThemeStateHighlighted] && _alternateImage) ? _alternateImage : _image]; + [contentView setImage:[self currentValueForThemeAttribute:@"image"]]; + [contentView setImageOffset:[self currentValueForThemeAttribute:@"imageOffset"]]; [contentView setFont:[self currentValueForThemeAttribute:@"font"]]; [contentView setTextColor:[self currentValueForThemeAttribute:@"text-color"]]; @@ -664,8 +660,8 @@ var CPButtonImageKey = @"CPButtonImageKey", { _controlSize = CPRegularControlSize; - _image = [aCoder decodeObjectForKey:CPButtonImageKey]; - _alternateImage = [aCoder decodeObjectForKey:CPButtonAlternateImageKey]; + [self setImage:[aCoder decodeObjectForKey:CPButtonImageKey]]; + [self setAlternateImage:[aCoder decodeObjectForKey:CPButtonAlternateImageKey]]; _title = [aCoder decodeObjectForKey:CPButtonTitleKey]; _alternateTitle = [aCoder decodeObjectForKey:CPButtonAlternateTitleKey]; @@ -692,8 +688,8 @@ var CPButtonImageKey = @"CPButtonImageKey", { [super encodeWithCoder:aCoder]; - [aCoder encodeObject:_image forKey:CPButtonImageKey]; - [aCoder encodeObject:_alternateImage forKey:CPButtonAlternateImageKey]; + [aCoder encodeObject:[self image] forKey:CPButtonImageKey]; + [aCoder encodeObject:[self alternateImage] forKey:CPButtonAlternateImageKey]; [aCoder encodeObject:_title forKey:CPButtonTitleKey]; [aCoder encodeObject:_alternateTitle forKey:CPButtonAlternateTitleKey]; diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index b0eb2b774..b62c04ef1 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -410,7 +410,9 @@ var themedButtonValues = nil, [@"bezel-color", defaultHighlightedBezelColor, CPThemeStateBordered | CPThemeStateHighlighted | CPThemeStateDefault], [@"min-size", CGSizeMake(0.0, 24.0)], - [@"max-size", CGSizeMake(-1.0, 24.0)] + [@"max-size", CGSizeMake(-1.0, 24.0)], + + [@"imageOffset", 3.0] ]; [self registerThemeValues:themedButtonValues forView:button]; diff --git a/AppKit/_CPImageAndTextView.j b/AppKit/_CPImageAndTextView.j index 79a65f2ac..dde3311f5 100644 --- a/AppKit/_CPImageAndTextView.j +++ b/AppKit/_CPImageAndTextView.j @@ -45,9 +45,6 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, _CPImageAndTextViewImagePositionChangedFlag = 1 << 9, _CPImageAndTextViewImageScalingChangedFlag = 1 << 10; -var HORIZONTAL_MARGIN = 3.0, - VERTICAL_MARGIN = 5.0; - /* @ignore */ @implementation _CPImageAndTextView : CPView { @@ -63,6 +60,7 @@ var HORIZONTAL_MARGIN = 3.0, CPCellImagePosition _imagePosition; CPImageScaling _imageScaling; + float _imageOffset; BOOL _shouldDimImage; CPImage _image; @@ -97,6 +95,7 @@ var HORIZONTAL_MARGIN = 3.0, [self setFont:[aControl font]]; [self setImagePosition:[aControl imagePosition]]; [self setImageScaling:[aControl imageScaling]]; + [self setImageOffset:[aControl imageOffset]]; } else { @@ -305,6 +304,20 @@ var HORIZONTAL_MARGIN = 3.0, [self setNeedsLayout]; } +- (void)setImageOffset:(float)theImageOffset +{ + if (_imageOffset === theImageOffset) + return; + + _imageOffset = theImageOffset; + [self setNeedsLayout]; +} + +- (float)imageOffset +{ + return _imageOffset; +} + - (void)imageDidLoad:(id)anImage { if (anImage === _image) @@ -599,29 +612,29 @@ var HORIZONTAL_MARGIN = 3.0, imageStyle.left = FLOOR(centerX - imageWidth / 2.0) + "px"; imageStyle.top = FLOOR(size.height - imageHeight) + "px"; - textRect.size.height = size.height - imageHeight - VERTICAL_MARGIN; + textRect.size.height = size.height - imageHeight - _imageOffset; } else if (_imagePosition === CPImageAbove) { CPDOMDisplayServerSetStyleLeftTop(_DOMImageElement, NULL, FLOOR(centerX - imageWidth / 2.0), 0); - textRect.origin.y += imageHeight + VERTICAL_MARGIN; - textRect.size.height = size.height - imageHeight - VERTICAL_MARGIN; + textRect.origin.y += imageHeight + _imageOffset; + textRect.size.height = size.height - imageHeight - _imageOffset; } else if (_imagePosition === CPImageLeft) { imageStyle.top = FLOOR(centerY - imageHeight / 2.0) + "px"; imageStyle.left = "0px"; - textRect.origin.x = imageWidth + HORIZONTAL_MARGIN; - textRect.size.width -= imageWidth + HORIZONTAL_MARGIN; + textRect.origin.x = imageWidth + _imageOffset; + textRect.size.width -= imageWidth + _imageOffset; } else if (_imagePosition === CPImageRight) { imageStyle.top = FLOOR(centerY - imageHeight / 2.0) + "px"; imageStyle.left = FLOOR(size.width - imageWidth) + "px"; - textRect.size.width -= imageWidth + HORIZONTAL_MARGIN; + textRect.size.width -= imageWidth + _imageOffset; } else if (_imagePosition === CPImageOnly) { @@ -701,13 +714,13 @@ var HORIZONTAL_MARGIN = 3.0, if (_imagePosition === CPImageLeft || _imagePosition === CPImageRight) { - size.width += _textSize.width + HORIZONTAL_MARGIN; + size.width += _textSize.width + _imageOffset; size.height = MAX(size.height, _textSize.height); } else if (_imagePosition === CPImageAbove || _imagePosition === CPImageBelow) { size.width = MAX(size.width, _textSize.width); - size.height += _textSize.height + VERTICAL_MARGIN; + size.height += _textSize.height + _imageOffset; } else // if (_imagePosition == CPImageOverlaps) { From b21eab1bf15a7e5bc3149358967ff21a61bdaf92 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 25 Aug 2010 15:50:24 +0200 Subject: [PATCH 33/47] Improved KVC mutable indexed accessors Refactored everything away into insertObjects:atIndexes: so all the logic is in the same place and made it so that the _insertManySEL is the preferred selector to use. If it doesn't exist it will fall back to the _insertSEL. --- Foundation/CPArray+KVO.j | 42 ++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/Foundation/CPArray+KVO.j b/Foundation/CPArray+KVO.j index 49ff5d621..efdb784c8 100644 --- a/Foundation/CPArray+KVO.j +++ b/Foundation/CPArray+KVO.j @@ -120,7 +120,7 @@ _insertManySEL = sel_getName(@"insertObjects:in"+capitalizedKey+"AtIndexes:"); if ([_proxyObject respondsToSelector:_insertManySEL]) - _insert = [_proxyObject methodForSelector:_insertManySEL]; + _insertMany = [_proxyObject methodForSelector:_insertManySEL]; _removeManySEL = sel_getName(@"removeObjectsFrom"+capitalizedKey+"AtIndexes:"); if ([_proxyObject respondsToSelector:_removeManySEL]) @@ -234,13 +234,7 @@ - (void)addObject:(id)anObject { - if (_insert) - return _insert(_proxyObject, _insertSEL, anObject, [self count]); - - var target = [[self _representedObject] copy]; - - [target addObject:anObject]; - [self _setRepresentedObject:target]; + [self insertObject:anObject atIndex:[self count]]; } - (void)addObjectsFromArray:(CPArray)anArray @@ -249,18 +243,38 @@ count = [anArray count]; for (; index < count; ++index) - [self addObject:[anArray objectAtIndex:index]]; + [self insertObject:[anArray objectAtIndex:index] atIndex:index]; } - (void)insertObject:(id)anObject atIndex:(unsigned)anIndex { - if (_insert) - return _insert(_proxyObject, _insertSEL, anObject, anIndex); + [self insertObjects:[anObject] atIndexes:[CPIndexSet indexSetWithIndex:anIndex]]; +} - var target = [[self _representedObject] copy]; +- (void)insertObjects:(CPArray)theObjects atIndexes:(CPIndexSet)theIndexes +{ + if (_insertMany) + _insertMany(_proxyObject, _insertManySEL, theObjects, theIndexes); + else if (_insert) + { + var indexesArray = []; + [theIndexes getIndexes:indexesArray maxCount:-1 inIndexRange:nil]; - [target insertObject:anObject atIndex:anIndex]; - [self _setRepresentedObject:target]; + for (var index = 0; index < [indexesArray count]; index++) + { + var objectIndex = [indexesArray objectAtIndex:index], + object = [theObjects objectAtIndex:index]; + + _insert(_proxyObject, _insertSEL, object, objectIndex); + } + } + else + { + var target = [[self _representedObject] copy]; + + [target insertObjects:theObjects atIndexes:theIndexes]; + [self _setRepresentedObject:target]; + } } - (void)removeObject:(id)anObject From 86ee790ea13384b5dcbb393ba856a000f9685035 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Wed, 25 Aug 2010 15:57:35 +0200 Subject: [PATCH 34/47] implement missing __setSelectionIndex: --- AppKit/CPArrayController.j | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AppKit/CPArrayController.j b/AppKit/CPArrayController.j index 724a2edee..68949bcd6 100644 --- a/AppKit/CPArrayController.j +++ b/AppKit/CPArrayController.j @@ -345,6 +345,15 @@ [self __setSelectionIndexes:indexes]; } +/* + Like setSelectionIndex but don't fire any change notifications. + @ignore +*/ +- (BOOL)__setSelectionIndex:(int)theIndex +{ + [self __setSelectionIndexes:[CPIndexSet indexSetWithIndex:theIndex]]; +} + /* Like setSelectionIndexes but don't fire any change notifications. @ignore From 9a42e1298572f7b29cc566b457fd88a6d45ea48a Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Wed, 25 Aug 2010 16:15:27 -0400 Subject: [PATCH 35/47] Moved TableCibTest into the table tests folder. --- .../{ => TableTest}/TableCibTest/AppController.j | 0 .../Manual/{ => TableTest}/TableCibTest/Info.plist | 0 .../TableCibTest/Resources/MainMenu.cib | 0 .../TableCibTest/Resources/MainMenu.xib | 0 .../TableCibTest/Resources/spinner.gif | Bin .../{ => TableTest}/TableCibTest/index-debug.html | 0 .../Manual/{ => TableTest}/TableCibTest/index.html | 0 Tests/Manual/{ => TableTest}/TableCibTest/main.j | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename Tests/Manual/{ => TableTest}/TableCibTest/AppController.j (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/Info.plist (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/Resources/MainMenu.cib (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/Resources/MainMenu.xib (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/Resources/spinner.gif (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/index-debug.html (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/index.html (100%) rename Tests/Manual/{ => TableTest}/TableCibTest/main.j (100%) diff --git a/Tests/Manual/TableCibTest/AppController.j b/Tests/Manual/TableTest/TableCibTest/AppController.j similarity index 100% rename from Tests/Manual/TableCibTest/AppController.j rename to Tests/Manual/TableTest/TableCibTest/AppController.j diff --git a/Tests/Manual/TableCibTest/Info.plist b/Tests/Manual/TableTest/TableCibTest/Info.plist similarity index 100% rename from Tests/Manual/TableCibTest/Info.plist rename to Tests/Manual/TableTest/TableCibTest/Info.plist diff --git a/Tests/Manual/TableCibTest/Resources/MainMenu.cib b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib similarity index 100% rename from Tests/Manual/TableCibTest/Resources/MainMenu.cib rename to Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib diff --git a/Tests/Manual/TableCibTest/Resources/MainMenu.xib b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib similarity index 100% rename from Tests/Manual/TableCibTest/Resources/MainMenu.xib rename to Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib diff --git a/Tests/Manual/TableCibTest/Resources/spinner.gif b/Tests/Manual/TableTest/TableCibTest/Resources/spinner.gif similarity index 100% rename from Tests/Manual/TableCibTest/Resources/spinner.gif rename to Tests/Manual/TableTest/TableCibTest/Resources/spinner.gif diff --git a/Tests/Manual/TableCibTest/index-debug.html b/Tests/Manual/TableTest/TableCibTest/index-debug.html similarity index 100% rename from Tests/Manual/TableCibTest/index-debug.html rename to Tests/Manual/TableTest/TableCibTest/index-debug.html diff --git a/Tests/Manual/TableCibTest/index.html b/Tests/Manual/TableTest/TableCibTest/index.html similarity index 100% rename from Tests/Manual/TableCibTest/index.html rename to Tests/Manual/TableTest/TableCibTest/index.html diff --git a/Tests/Manual/TableCibTest/main.j b/Tests/Manual/TableTest/TableCibTest/main.j similarity index 100% rename from Tests/Manual/TableCibTest/main.j rename to Tests/Manual/TableTest/TableCibTest/main.j From f4e7386a0a08b5f3381352854636119da33211a8 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 26 Aug 2010 12:11:48 +0200 Subject: [PATCH 36/47] fix gridColor when decoding a CPTableView Don't default to a gray color when there is no grid color in the cib. The tableview theme will automatically set the correct grid color. --- AppKit/CPTableView.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index a602c5bb4..42e063256 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -3545,7 +3545,7 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", _intercellSpacing = [aCoder decodeSizeForKey:CPTableViewIntercellSpacingKey] || _CGSizeMake(3.0, 2.0); - [self setGridColor:[aCoder decodeObjectForKey:CPTableViewGridColorKey] || [CPColor grayColor]]; + [self setGridColor:[aCoder decodeObjectForKey:CPTableViewGridColorKey]]; _gridStyleMask = [aCoder decodeIntForKey:CPTableViewGridStyleMaskKey] || CPTableViewGridNone; _usesAlternatingRowBackgroundColors = [aCoder decodeObjectForKey:CPTableViewUsesAlternatingBackgroundKey]; From ddad10b615c3ab4ce3dceb8dc956fc4ba9d4bb16 Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Thu, 26 Aug 2010 16:55:05 +0200 Subject: [PATCH 37/47] fix CPPredicate predicateWithFormat: throwing exception (in WebKit) I believe the exception was caused because WebKit thought arguments was the function.Arguments. Issue was resolved by renaming the local arguments variable to args --- Foundation/CPPredicate/CPPredicate.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Foundation/CPPredicate/CPPredicate.j b/Foundation/CPPredicate/CPPredicate.j index 18a0c5b51..ff5f5f092 100644 --- a/Foundation/CPPredicate/CPPredicate.j +++ b/Foundation/CPPredicate/CPPredicate.j @@ -52,12 +52,12 @@ @param arguments The arguments to substitute into predicateFormat. Values are substituted into predicateFormat in the order they appear in the array. @return A new predicate by substituting the values in arguments into predicateFormat, and parsing the result. */ -+ (CPPredicate)predicateWithFormat:(CPString)format argumentArray:(CPArray)arguments ++ (CPPredicate)predicateWithFormat:(CPString)format argumentArray:(CPArray)args { if (!format) [CPException raise:CPInvalidArgumentException reason:_cmd + " the format can't be 'nil'"]; - var s = [[CPPredicateScanner alloc] initWithString:format args:arguments], + var s = [[CPPredicateScanner alloc] initWithString:format args:args], p = [s parse]; return p; From 213fde04fe264fe978bbc7477c024a29f496f8da Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Fri, 27 Aug 2010 12:06:40 +0200 Subject: [PATCH 38/47] fix CPArray+KVO addObjects inserting objects at beginning of array one by one --- Foundation/CPArray+KVO.j | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Foundation/CPArray+KVO.j b/Foundation/CPArray+KVO.j index efdb784c8..2d51447a6 100644 --- a/Foundation/CPArray+KVO.j +++ b/Foundation/CPArray+KVO.j @@ -242,8 +242,7 @@ var index = 0, count = [anArray count]; - for (; index < count; ++index) - [self insertObject:[anArray objectAtIndex:index] atIndex:index]; + [self insertObjects:anArray atIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange([self count], count)]]; } - (void)insertObject:(id)anObject atIndex:(unsigned)anIndex From f8ceaf62b7b7e11b3dcc1454b8eaddf208294f1c Mon Sep 17 00:00:00 2001 From: Klaas Pieter Annema Date: Fri, 27 Aug 2010 15:50:59 +0200 Subject: [PATCH 39/47] set font for tableCell during nib2cib --- .../TableCibTest/Resources/MainMenu.cib | 2 +- .../TableCibTest/Resources/MainMenu.xib | 23 ++++++++++++++----- Tools/nib2cib/NSTableColumn.j | 20 ++++++++++------ 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib index b13ff6731..e7da617ff 100644 --- a/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib +++ b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.cib @@ -1 +1 @@ -280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;37E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;23E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;58E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;59E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;60E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;2;61E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;2;62E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;2;63E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;2;64E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;2;66E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;2;68E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;69E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;12;CPScrollViewK;8;$classesA;S;12;CPScrollViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;70E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;71E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;72E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;73E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;2;76E;K;29;CPScrollViewHeaderClipViewKeyD;K;6;CP$UIDd;2;77E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;2;34E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;31E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;2;63E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;2;63E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;2;63E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;2;63E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;2;78E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;2;78E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;2;78E;K;25;CPScrollViewCornerViewKeyD;K;6;CP$UIDd;2;80E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;81E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;82E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;83E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;84E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;85E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;27E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;86E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;86E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;87E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;E;D;K;10;$classnameS;11;CPTableViewK;8;$classesA;S;11;CPTableViewS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;76E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;88E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;76E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;89E;K;24;CPTableViewDataSourceKeyD;K;6;CP$UIDd;1;0E;K;22;CPTableViewDelegateKeyD;K;6;CP$UIDd;1;0E;K;23;CPTableViewRowHeightKeyD;K;6;CP$UIDd;2;90E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;2;91E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;2;92E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;2;78E;K;30;CPTableViewColumnReorderingKeyD;K;6;CP$UIDd;2;78E;K;28;CPTableViewColumnResizingKeyD;K;6;CP$UIDd;2;78E;K;29;CPTableViewColumnSelectionKeyD;K;6;CP$UIDd;2;78E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;2;93E;K;23;CPTableViewGridColorKeyD;K;6;CP$UIDd;2;95E;K;27;CPTableViewGridStyleMaskKeyD;K;6;CP$UIDd;2;96E;K;39;CPTableViewUsesAlternatingBackgroundKeyD;K;6;CP$UIDd;2;78E;K;34;CPTableViewAlternatingRowColorsKeyD;K;6;CP$UIDd;2;97E;K;24;CPTableViewCornerViewKeyD;K;6;CP$UIDd;2;80E;K;24;CPTableViewHeaderViewKeyD;K;6;CP$UIDd;2;37E;E;D;K;10;$classnameS;10;CPScrollerK;8;$classesA;S;10;CPScrollerS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;30E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;98E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;99E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;100E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;101E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;102E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;23E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;103E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;89E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;3;104E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;105E;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;3;106E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;107E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;108E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;109E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;110E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;111E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;69E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;30E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;112E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;113E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;100E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;114E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;104E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;23E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;115E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;89E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;3;104E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;116E;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;3;117E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;118E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;108E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;109E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;119E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;120E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;69E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;17;CPTableHeaderViewK;8;$classesA;S;17;CPTableHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;36E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;77E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;121E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;121E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;77E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;29;CPTableHeaderViewTableViewKeyD;K;6;CP$UIDd;2;29E;E;S;14;App ControllerS;12;File's OwnerS;16;Table Column (3)S;33;Bordered Scroll View (Table View)S;15;Window (Window)S;12;Content ViewS;29;Table View (Column 1, Two, 3)S;19;Horizontal ScrollerS;29;Text Field Cell (Text Cell)-2S;29;Text Field Cell (Text Cell)-1S;16;Table Column (1)S;27;Text Field Cell (Text Cell)S;11;ApplicationS;17;Vertical ScrollerS;16;Table Column (2)S;17;Table Header ViewD;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;19E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;122E;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;19E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;25E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;123E;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;19E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;124E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;25E;E;E;S;13;AppControllerS;1;3d;3;188d;2;10d;22;3.4028234663852886e+38D;K;10;$classnameS;24;_CPTableColumnHeaderViewK;8;$classesA;S;24;_CPTableColumnHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;126E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;2;61E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;128E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;67E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;129E;K;6;$afontD;K;6;CP$UIDd;3;131E;K;12;$atext-colorD;K;6;CP$UIDd;3;132E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;89E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;3;104E;K;15;$acontent-insetD;K;6;CP$UIDd;3;134E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;136E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;135E;E;d;1;2S;22;{{20, 20}, {518, 308}}S;20;{{0, 0}, {518, 308}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;80E;E;E;d;2;36S;6;normalD;K;10;$classnameS;10;CPClipViewK;8;$classesA;S;10;CPClipViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;75E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;137E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;88E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;138E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;100E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;29E;E;D;K;6;$classD;K;6;CP$UIDd;2;75E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;140E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;141E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;142E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;100E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;37E;E;T;D;K;10;$classnameS;13;_CPCornerViewK;8;$classesA;S;13;_CPCornerViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;79E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;143E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;144E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;23E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;100E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;E;S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;24;{{335, 128}, {558, 348}}d;1;7S;6;WindowS;20;{{0, 0}, {558, 348}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;23E;E;E;S;20;{{0, 0}, {516, 290}}d;1;4d;2;23S;6;{0, 0}F;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;21E;E;E;D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;145E;E;d;1;3D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;139E;D;K;6;CP$UIDd;3;146E;E;E;S;19;{{1, 1}, {516, 15}}S;19;{{0, 0}, {516, 15}}d;1;8S;8;disabledd;1;1S;29;_horizontalScrollerDidScroll:d;1;0f;18;0.9866156787762906S;1;1d;3;101d;2;40d;4;1000D;K;6;$classD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;147E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;148E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;128E;E;D;K;6;$classD;K;6;CP$UIDd;2;67E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;129E;K;6;$afontD;K;6;CP$UIDd;3;149E;K;12;$atext-colorD;K;6;CP$UIDd;3;150E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;89E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;3;104E;K;15;$acontent-insetD;K;6;CP$UIDd;3;151E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;136E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;135E;E;S;22;{{502, 16}, {15, 275}}S;19;{{0, 0}, {15, 275}}S;17;disabled+verticalS;27;_verticalScrollerDidScroll:f;18;0.9482758620689655S;1;2d;3;154D;K;6;$classD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;152E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;153E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;128E;E;D;K;6;$classD;K;6;CP$UIDd;2;67E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;125E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;125E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;129E;K;6;$afontD;K;6;CP$UIDd;3;154E;K;12;$atext-colorD;K;6;CP$UIDd;3;155E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;89E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;3;104E;K;15;$acontent-insetD;K;6;CP$UIDd;3;156E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;136E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;135E;E;S;19;{{0, 0}, {516, 23}}S;8;delegateS;9;theWindowS;10;dataSourceS;16;{{0, 0}, {0, 0}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;158E;E;E;D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;127E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;159E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;160E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;78E;E;S;11;placeholderD;K;10;$classnameS;17;_CPThemeAttributeK;8;$classesA;S;17;_CPThemeAttributeS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;161E;K;5;stateD;K;6;CP$UIDd;3;162E;K;5;valueD;K;6;CP$UIDd;3;128E;E;D;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;165E;E;D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;133E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;166E;E;S;0;d;4;3072S;20;{{1, 1}, {516, 290}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;E;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;167E;E;S;21;{{1, 291}, {516, 17}}S;19;{{0, 0}, {516, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;E;E;S;22;{{502, 285}, {16, 23}}S;18;{{0, 0}, {16, 23}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;168E;D;K;6;CP$UIDd;3;102E;E;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;169E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;170E;E;E;S;8;Column 1D;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;161E;K;5;stateD;K;6;CP$UIDd;3;162E;K;5;valueD;K;6;CP$UIDd;3;128E;E;D;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;171E;E;D;K;6;$classD;K;6;CP$UIDd;3;133E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;166E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;172E;E;E;S;3;TwoD;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;161E;K;5;stateD;K;6;CP$UIDd;3;162E;K;5;valueD;K;6;CP$UIDd;3;128E;E;D;K;6;$classD;K;6;CP$UIDd;3;130E;K;4;nameD;K;6;CP$UIDd;3;163E;K;6;valuesD;K;6;CP$UIDd;3;173E;E;D;K;6;$classD;K;6;CP$UIDd;3;133E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;166E;E;D;K;10;$classnameS;19;_CPImageAndTextViewK;8;$classesA;S;19;_CPImageAndTextViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;157E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;66E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;174E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;66E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;176E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;E;S;17;Arial, sans-serifd;2;12S;4;fontS;16;selectedDataViewS;10;text-colorD;K;10;$classnameS;19;CPMutableDictionaryK;8;$classesA;S;19;CPMutableDictionaryS;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;164E;K;10;CP.objectsD;K;16;selectedDataViewD;K;6;CP$UIDd;3;139E;K;6;normalD;K;6;CP$UIDd;3;177E;E;E;S;39;{"top":0,"right":0,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;102E;D;K;6;CP$UIDd;3;102E;E;E;f;18;0.8980392156862745D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;178E;D;K;6;CP$UIDd;3;179E;D;K;6;CP$UIDd;3;180E;D;K;6;CP$UIDd;3;102E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;157E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;110E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;174E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;110E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;176E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;3;164E;K;10;CP.objectsD;K;16;selectedDataViewD;K;6;CP$UIDd;3;139E;K;6;normalD;K;6;CP$UIDd;3;181E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;157E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;119E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;174E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;175E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;119E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;176E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;3;164E;K;10;CP.objectsD;K;16;selectedDataViewD;K;6;CP$UIDd;3;139E;K;6;normalD;K;6;CP$UIDd;3;182E;E;E;S;18;{{5, 0}, {-10, 0}}S;18;{{0, 0}, {-10, 0}}d;2;18D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;183E;E;f;18;0.9607843137254902f;18;0.9764705882352941f;18;0.9882352941176471D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;184E;E;D;K;6;$classD;K;6;CP$UIDd;2;94E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;185E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;102E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;102E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;186E;D;K;6;CP$UIDd;3;102E;E;E;f;3;0.2E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file +280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;36E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;16E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;58E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;59E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;2;60E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;2;61E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;2;62E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;2;63E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;2;65E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;2;67E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;68E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;2;69E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;10;CPScrollerK;8;$classesA;S;10;CPScrollerS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;70E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;71E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;72E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;2;73E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;74E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;75E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;28E;K;18;CPControlActionKeyD;K;6;CP$UIDd;2;76E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;77E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;75E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;2;78E;E;D;K;10;$classnameS;17;CPTableHeaderViewK;8;$classesA;S;17;CPTableHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;79E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;80E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;79E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;29;CPTableHeaderViewTableViewKeyD;K;6;CP$UIDd;2;35E;K;33;CPTableHeaderViewDrawsColumnLinesD;K;6;CP$UIDd;2;69E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;2;82E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;2;83E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;2;84E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;2;85E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;2;86E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;2;87E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;68E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;2;69E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;89E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;72E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;2;73E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;90E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;91E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;28E;K;18;CPControlActionKeyD;K;6;CP$UIDd;2;92E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;77E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;75E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;2;93E;E;D;K;10;$classnameS;12;CPScrollViewK;8;$classesA;S;12;CPScrollViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;94E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;95E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;96E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;97E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;2;99E;K;29;CPScrollViewHeaderClipViewKeyD;K;6;CP$UIDd;2;79E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;2;22E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;26E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;2;84E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;2;84E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;2;84E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;2;84E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;2;69E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;2;69E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;2;69E;K;25;CPScrollViewCornerViewKeyD;K;6;CP$UIDd;3;101E;K;25;CPScrollViewBorderTypeKeyD;K;6;CP$UIDd;2;68E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;29E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;102E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;102E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;103E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;3;104E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;3;105E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;3;106E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;3;107E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;3;108E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;30E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;3;109E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;110E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;2;62E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;2;63E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;111E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;112E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;2;68E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;2;69E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;11;CPTableViewK;8;$classesA;S;11;CPTableViewS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;34E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;99E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;113E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;113E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;99E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;77E;K;24;CPTableViewDataSourceKeyD;K;6;CP$UIDd;1;0E;K;22;CPTableViewDelegateKeyD;K;6;CP$UIDd;1;0E;K;23;CPTableViewRowHeightKeyD;K;6;CP$UIDd;3;114E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;3;115E;K;37;CPTableViewSelectionHighlightStyleKeyD;K;6;CP$UIDd;2;75E;K;37;CPTableViewColumnAutoresizingStyleKeyD;K;6;CP$UIDd;2;77E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;3;116E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;2;69E;K;30;CPTableViewColumnReorderingKeyD;K;6;CP$UIDd;2;69E;K;28;CPTableViewColumnResizingKeyD;K;6;CP$UIDd;2;69E;K;29;CPTableViewColumnSelectionKeyD;K;6;CP$UIDd;2;69E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;3;117E;K;23;CPTableViewGridColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTableViewGridStyleMaskKeyD;K;6;CP$UIDd;3;118E;K;39;CPTableViewUsesAlternatingBackgroundKeyD;K;6;CP$UIDd;2;69E;K;34;CPTableViewAlternatingRowColorsKeyD;K;6;CP$UIDd;1;0E;K;24;CPTableViewCornerViewKeyD;K;6;CP$UIDd;3;101E;K;24;CPTableViewHeaderViewKeyD;K;6;CP$UIDd;2;24E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;119E;E;S;16;Table Column (1)S;17;Vertical ScrollerS;17;Table Header ViewS;16;Table Column (3)S;12;File's OwnerS;19;Horizontal ScrollerS;33;Bordered Scroll View (Table View)S;27;Text Field Cell (Text Cell)S;12;Content ViewS;15;Window (Window)S;29;Text Field Cell (Text Cell)-1S;16;Table Column (2)S;29;Table View (Column 1, Two, 3)S;29;Text Field Cell (Text Cell)-2S;11;ApplicationS;14;App ControllerD;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;37E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;120E;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;37E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;121E;E;D;K;6;$classD;K;6;CP$UIDd;2;54E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;35E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;37E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;122E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;E;E;S;1;1d;3;101d;2;40d;4;1000D;K;10;$classnameS;24;_CPTableColumnHeaderViewK;8;$classesA;S;24;_CPTableColumnHeaderViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;64E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;124E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;125E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;127E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;66E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;128E;K;6;$afontD;K;6;CP$UIDd;3;130E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;77E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;68E;K;11;$aalignmentD;K;6;CP$UIDd;2;75E;K;15;$acontent-insetD;K;6;CP$UIDd;3;132E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;133E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;134E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;77E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;75E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;133E;E;d;1;2T;S;22;{{502, 16}, {15, 275}}S;19;{{0, 0}, {15, 275}}d;1;8d;11;-2147483648S;17;disabled+verticald;1;0S;27;_verticalScrollerDidScroll:d;1;4f;18;0.9482758620689655D;K;6;$classD;K;6;CP$UIDd;2;98E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;142E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;143E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;144E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;72E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;141E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;24E;E;S;19;{{0, 0}, {516, 23}}S;6;normalS;1;3d;3;188d;2;10d;22;3.4028234663852886e+38D;K;6;$classD;K;6;CP$UIDd;2;64E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;135E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;2;82E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;127E;E;D;K;6;$classD;K;6;CP$UIDd;2;66E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;128E;K;6;$afontD;K;6;CP$UIDd;3;136E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;77E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;68E;K;11;$aalignmentD;K;6;CP$UIDd;2;75E;K;15;$acontent-insetD;K;6;CP$UIDd;3;137E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;133E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;134E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;77E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;75E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;133E;E;S;19;{{1, 1}, {516, 15}}S;19;{{0, 0}, {516, 15}}S;8;disabledd;1;1S;29;_horizontalScrollerDidScroll:f;18;0.9866156787762906S;22;{{20, 20}, {518, 308}}S;20;{{0, 0}, {518, 308}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;3;101E;E;E;d;2;36D;K;10;$classnameS;10;CPClipViewK;8;$classesA;S;10;CPClipViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;138E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;113E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;139E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;72E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;141E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;35E;E;D;K;10;$classnameS;13;_CPCornerViewK;8;$classesA;S;13;_CPCornerViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;100E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;145E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;146E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;72E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;2;73E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;E;S;20;{{0, 0}, {558, 348}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;28E;E;E;S;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;24;{{335, 128}, {558, 348}}d;1;7S;6;WindowS;1;2d;3;154D;K;6;$classD;K;6;CP$UIDd;2;64E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;147E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;148E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;127E;E;D;K;6;$classD;K;6;CP$UIDd;2;66E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;128E;K;6;$afontD;K;6;CP$UIDd;3;149E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;77E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;68E;K;11;$aalignmentD;K;6;CP$UIDd;2;75E;K;15;$acontent-insetD;K;6;CP$UIDd;3;150E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;133E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;134E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;1;0E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;77E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;75E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;133E;E;S;20;{{0, 0}, {516, 290}}d;2;23S;6;{3, 2}F;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;25E;E;E;d;1;3S;13;AppControllerS;8;delegateS;9;theWindowS;10;dataSourceS;16;{{0, 0}, {0, 0}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;152E;E;E;S;8;Column 1D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;153E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;154E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;116E;E;S;11;placeholderD;K;10;$classnameS;17;_CPThemeAttributeK;8;$classesA;S;17;_CPThemeAttributeS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;129E;K;4;nameD;K;6;CP$UIDd;3;155E;K;6;valuesD;K;6;CP$UIDd;3;157E;E;D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;131E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;158E;E;S;0;d;4;3072D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;159E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;129E;K;4;nameD;K;6;CP$UIDd;3;155E;K;6;valuesD;K;6;CP$UIDd;3;160E;E;D;K;6;$classD;K;6;CP$UIDd;3;131E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;158E;E;S;20;{{1, 1}, {516, 290}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;35E;E;E;D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;140E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;161E;E;S;21;{{1, 291}, {516, 17}}S;19;{{0, 0}, {516, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;24E;E;E;S;22;{{502, 285}, {16, 23}}S;18;{{0, 0}, {16, 23}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;162E;E;E;S;3;TwoD;K;6;$classD;K;6;CP$UIDd;3;129E;K;4;nameD;K;6;CP$UIDd;3;155E;K;6;valuesD;K;6;CP$UIDd;3;163E;E;D;K;6;$classD;K;6;CP$UIDd;3;131E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;158E;E;D;K;10;$classnameS;19;_CPImageAndTextViewK;8;$classesA;S;19;_CPImageAndTextViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;151E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;65E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;65E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;164E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;E;S;17;Arial, sans-serifd;2;12S;4;fontD;K;10;$classnameS;19;CPMutableDictionaryK;8;$classesA;S;19;CPMutableDictionaryS;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;156E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;165E;K;6;normalD;K;6;CP$UIDd;3;127E;E;E;S;39;{"top":0,"right":0,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;3;151E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;86E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;86E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;164E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;E;D;K;6;$classD;K;6;CP$UIDd;3;156E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;165E;K;6;normalD;K;6;CP$UIDd;3;127E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;91E;E;E;D;K;6;$classD;K;6;CP$UIDd;3;151E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;111E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;111E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;164E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;81E;E;D;K;6;$classD;K;6;CP$UIDd;3;156E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;166E;K;6;normalD;K;6;CP$UIDd;3;167E;E;E;d;2;18D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;153E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;154E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;69E;E;D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;168E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;169E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;69E;E;D;K;6;$classD;K;6;CP$UIDd;3;126E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;168E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;169E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;116E;E;S;5;Ariald;2;20E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib index 42934a3ea..d75d7ff7d 100644 --- a/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib +++ b/Tests/Manual/TableTest/TableCibTest/Resources/MainMenu.xib @@ -2,17 +2,17 @@ 1050 - 10D573 - 759 + 10F569 + 788 1038.29 - 460.00 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 759 + 788 YES - + YES @@ -159,7 +159,11 @@ 337772096 2048 Text Cell - + + LucidaGrande + 20 + 16 + @@ -524,6 +528,13 @@ theWindow NSWindow + + theWindow + + theWindow + NSWindow + + IBUserSource diff --git a/Tools/nib2cib/NSTableColumn.j b/Tools/nib2cib/NSTableColumn.j index d85cb70c5..af2980f50 100644 --- a/Tools/nib2cib/NSTableColumn.j +++ b/Tools/nib2cib/NSTableColumn.j @@ -34,23 +34,29 @@ { _identifier = [aCoder decodeObjectForKey:@"NSIdentifier"]; - //var dataViewCell = [aCoder decodeObjectForKey:@"NSDataCell"]; + var dataViewCell = [aCoder decodeObjectForKey:@"NSDataCell"]; _dataView = [[CPTextField alloc] initWithFrame:CPRectMakeZero()]; - [_dataView setValue:[CPColor colorWithRed:51.0 / 255.0 green:51.0 / 255.0 blue:51.0 / 255.0 alpha:1.0] - forThemeAttribute:"text-color"]; + var font = [dataViewCell font], + selectedFont = nil; + + if (!font) + font = [CPFont systemFontOfSize:12.0]; + + var selectedFont = [CPFont boldFontWithName:[font familyName] size:[font size]]; + + [_dataView setFont:font]; + [_dataView setValue:selectedFont forThemeAttribute:@"font" inState:CPThemeStateSelectedDataView]; - [_dataView setValue:[CPColor whiteColor] forThemeAttribute:@"text-color" inState:CPThemeStateSelectedDataView]; [_dataView setLineBreakMode:CPLineBreakByTruncatingTail]; - [_dataView setValue:[CPFont boldSystemFontOfSize:12.0] forThemeAttribute:@"font" inState:CPThemeStateSelectedDataView]; [_dataView setValue:CPCenterVerticalTextAlignment forThemeAttribute:@"vertical-alignment"]; [_dataView setValue:CGInsetMake(0.0, 0.0, 0.0, 5.0) forThemeAttribute:@"content-inset"]; var headerCell = [aCoder decodeObjectForKey:@"NSHeaderCell"], headerView = [[_CPTableColumnHeaderView alloc] initWithFrame:CPRectMakeZero()]; - - [headerView setStringValue:[headerCell objectValue]]; + + [headerView setStringValue:[headerCell objectValue]]; [self setHeaderView:headerView]; _width = [aCoder decodeFloatForKey:@"NSWidth"]; From b823eb7fe00b230f7d459f40823e9228893745c9 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 22 Aug 2010 19:09:41 -0400 Subject: [PATCH 40/47] Fixes for Cocoa compliance --- AppKit/CPAlert.j | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 897145104..24180055d 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -129,7 +129,7 @@ CPCriticalAlertStyle = 2; _windowStyle = nil; _didEndSelector = nil; - _messageLabel = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; + _messageLabel = [CPTextField labelWithTitle:@"Alert"]; _alertImageView = [[CPImageView alloc] initWithFrame:CGRectMakeZero()]; _informativeLabel = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; } @@ -161,8 +161,14 @@ CPCriticalAlertStyle = 2; var contentView = [_alertPanel contentView], count = [_buttons count]; - while (count--) - [contentView addSubview:_buttons[count]]; + + if (count) + { + while (count--) + [contentView addSubview:_buttons[count]]; + } + else + [self addButtonWithTitle:@"OK"]; [contentView addSubview:_messageLabel]; [contentView addSubview:_alertImageView]; @@ -292,7 +298,7 @@ CPCriticalAlertStyle = 2; else [button setKeyEquivalent:nil]; - [_buttons addObject:button]; + [_buttons insertObject:button atIndex:0]; } - (void)layoutPanel @@ -319,6 +325,7 @@ CPCriticalAlertStyle = 2; } [_alertImageView setImage:theImage]; + var imageSize = theImage ? [theImage size] : CGSizeMakeZero(); [_alertImageView setFrame:CGRectMake(iconOffset.x, iconOffset.y, imageSize.width, imageSize.height)]; @@ -358,6 +365,7 @@ CPCriticalAlertStyle = 2; var aRepresentativeButton = _buttons[0], buttonY = MAX(CGRectGetMaxY([_alertImageView frame]), CGRectGetMaxY(informationString ? [_informativeLabel frame] : [_messageLabel frame])) + buttonOffset; // the lower of the bottom of the text and the bottom of the icon. + [aRepresentativeButton setTheme:[self theme]]; [aRepresentativeButton sizeToFit]; @@ -366,20 +374,22 @@ CPCriticalAlertStyle = 2; desiredHeight = MAX(minimumSize.height, buttonY + CGRectGetHeight([aRepresentativeButton bounds]) + inset.bottom), deltaY = desiredHeight - CGRectGetHeight(bounds), frameSize = CGSizeMakeCopy([_alertPanel frame].size); + frameSize.height += deltaY; [_alertPanel setFrameSize:frameSize]; var count = [_buttons count]; + while (count--) { var button = _buttons[count]; - [button setTheme:[self theme]]; [button sizeToFit]; var buttonBounds = [button bounds], width = MAX(80.0, CGRectGetWidth(buttonBounds)), height = CGRectGetHeight(buttonBounds); + offsetX -= width; [button setFrame:CGRectMake(offsetX, buttonY, width, height)]; offsetX -= 10; From 431c6522a6345eea1c47ba6ccb6bb12631605438 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Fri, 27 Aug 2010 14:06:16 -0400 Subject: [PATCH 41/47] Test alerts with 1 or 0 buttons defined. --- Tests/Manual/CPAlertTest/AppController.j | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Tests/Manual/CPAlertTest/AppController.j b/Tests/Manual/CPAlertTest/AppController.j index 36ec908d4..a8fbce585 100644 --- a/Tests/Manual/CPAlertTest/AppController.j +++ b/Tests/Manual/CPAlertTest/AppController.j @@ -26,10 +26,9 @@ "Theorise", "Cancel"], [@"Snakes. Why did it have to be snakes?", nil, - "Torch", "Cancel"], - [@"Sometimes a message can be really long and just appear to go on and on. It could be a speech. It could be the television.", - nil, - "Off", "Cancel"] + "Torch"], + [@"Sometimes a message can be really long and just appear to go on and on. It could be a speech. It could be the television.", + nil] ]; messageIndex = 0; @@ -84,7 +83,7 @@ var variation = variations[0], message = messages[messageIndex], - alert = [[CPAlert alloc] init]; + alert = [CPAlert new]; messageIndex = (messageIndex + 1) % messages.length; [variations removeObjectAtIndex:0]; @@ -93,8 +92,10 @@ [alert setDelegate:self]; [alert setMessageText:message[0]]; [alert setInformativeText:message[1]]; - [alert addButtonWithTitle:message[2]]; - [alert addButtonWithTitle:message[3]]; + if (message.length > 2) + [alert addButtonWithTitle:message[2]]; + if (message.length > 3) + [alert addButtonWithTitle:message[3]]; [alert setWindowStyle:windowStyle]; [alert setAlertStyle:variation[1]]; From 4f2914a123dff0afdf252ad564ef6b0088ec8637 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 23 Aug 2010 16:07:29 -0400 Subject: [PATCH 42/47] Implementation of CPFont -ascender, -descender and -defaultLineHeightForFont, supporting method +metricsOfFont in CPStringDrawing and CPPlatformString, and Font Metrics Explorer test app. --- AppKit/CPFont.j | 75 +- AppKit/CPStringDrawing.j | 8 + AppKit/Platform/DOM/CPPlatformString.j | 70 +- .../FontMetricsExplorer/AppController.j | 221 +++++ Tests/Manual/FontMetricsExplorer/Info.plist | 12 + .../Resources/MainMenu.cib | 1 + .../Resources/MainMenu.xib | 902 ++++++++++++++++++ .../FontMetricsExplorer/Resources/spinner.gif | Bin 0 -> 1849 bytes .../FontMetricsExplorer/index-debug.html | 69 ++ Tests/Manual/FontMetricsExplorer/index.html | 68 ++ Tests/Manual/FontMetricsExplorer/main.j | 18 + 11 files changed, 1435 insertions(+), 9 deletions(-) create mode 100644 Tests/Manual/FontMetricsExplorer/AppController.j create mode 100644 Tests/Manual/FontMetricsExplorer/Info.plist create mode 100644 Tests/Manual/FontMetricsExplorer/Resources/MainMenu.cib create mode 100644 Tests/Manual/FontMetricsExplorer/Resources/MainMenu.xib create mode 100644 Tests/Manual/FontMetricsExplorer/Resources/spinner.gif create mode 100644 Tests/Manual/FontMetricsExplorer/index-debug.html create mode 100644 Tests/Manual/FontMetricsExplorer/index.html create mode 100755 Tests/Manual/FontMetricsExplorer/main.j diff --git a/AppKit/CPFont.j b/AppKit/CPFont.j index 4f5e5f3a4..74da13339 100644 --- a/AppKit/CPFont.j +++ b/AppKit/CPFont.j @@ -28,7 +28,7 @@ var _CPFonts = {}, #define _CPCreateCSSString(aName, aSize, isBold) (isBold ? @"bold " : @"") + ROUND(aSize) + @"px " + ((aName === _CPFontSystemFontFace) ? aName : (@"\"" + aName.replace(_CPWrapRegExp, '", "') + @"\", " + _CPFontSystemFontFace)) #define _CPCachedFont(aName, aSize, isBold) _CPFonts[_CPCreateCSSString(aName, aSize, isBold)] -/*! +/*! @ingroup appkit @class CPFont @@ -38,11 +38,22 @@ var _CPFonts = {}, { CPString _name; float _size; + float _ascender; + float _descender; + float _lineHeight; BOOL _isBold; - + CPString _cssString; } ++ (void)initialize +{ + var systemFont = [[CPBundle bundleForClass:[CPView class]] objectForInfoDictionaryKey:"CPSystemFontFace"]; + + if (systemFont) + _CPFontSystemFontFace = systemFont; +} + /*! Returns a font with the specified name and size. @param aName the name of the font @@ -89,25 +100,64 @@ var _CPFonts = {}, @ignore */ - (id)_initWithName:(CPString)aName size:(float)aSize bold:(BOOL)isBold -{ +{ self = [super init]; - + if (self) { _name = aName; _size = aSize; + _ascender = 0; + _descender = 0; + _lineHeight = 0; _isBold = isBold; - + _cssString = _CPCreateCSSString(_name, _size, _isBold); - + _CPFonts[_cssString] = self; } - + return self; } /*! - Returns the font size (in points) + Returns the distance of the longest ascender's top y-coordinate from the baseline (in CSS px) +*/ +- (float)ascender +{ + if (!_ascender) + [self _getMetrics]; + + return _ascender; +} + +/*! + Returns the bottom y coordinate (in CSS px), offset from the baseline, of the receiver's longest descender. + Thus, if the longest descender extends 2 points below the baseline, descender will return –2. +*/ +- (float)descender +{ + if (!_descender) + [self _getMetrics]; + + return _descender; +} + +/*! + Returns the default line height. + + NOTE: This was moved from NSFont to NSLayoutManager in Cocoa, but since there is no CPLayoutManager, it has been kept here. +*/ +- (float)defaultLineHeightForFont +{ + if (!_lineHeight) + [self _getMetrics]; + + return _lineHeight; +} + +/*! + Returns the font size (in CSS px) */ - (float)size { @@ -140,6 +190,15 @@ var _CPFonts = {}, return [CPString stringWithFormat:@"%@ %@ %f pt.", [super description], [self familyName], [self size]]; } +- (void)_getMetrics +{ + var metrics = [CPString metricsOfFont:self]; + + _ascender = [metrics objectForKey:@"ascender"]; + _descender = [metrics objectForKey:@"descender"]; + _lineHeight = [metrics objectForKey:@"lineHeight"]; +} + @end var CPFontNameKey = @"CPFontNameKey", diff --git a/AppKit/CPStringDrawing.j b/AppKit/CPStringDrawing.j index dec7bde1c..859c23926 100644 --- a/AppKit/CPStringDrawing.j +++ b/AppKit/CPStringDrawing.j @@ -27,6 +27,14 @@ @implementation CPString (CPStringDrawing) +/*! + Returns a dictionary with the items "ascender", "descender", "lineHeight" +*/ ++ (CPDictionary)metricsOfFont:(CPFont)aFont +{ + return [CPPlatformString metricsOfFont:aFont]; +} + /*! Returns the string */ diff --git a/AppKit/Platform/DOM/CPPlatformString.j b/AppKit/Platform/DOM/CPPlatformString.j index 592a3b332..ab908ce65 100644 --- a/AppKit/Platform/DOM/CPPlatformString.j +++ b/AppKit/Platform/DOM/CPPlatformString.j @@ -24,7 +24,11 @@ var DOMFixedWidthSpanElement = nil, DOMFlexibleWidthSpanElement = nil, + DOMMetricsDivElement = nil, + DOMMetricsTextSpanElement = nil, + DOMMetricsImgElement = nil, DOMIFrameElement = nil, + DOMIFrameDocument = nil, DefaultFont = nil; @implementation CPPlatformString : CPBasePlatformString @@ -59,7 +63,7 @@ var DOMFixedWidthSpanElement = nil, bodyElement.appendChild(DOMIFrameElement); - var DOMIFrameDocument = (DOMIFrameElement.contentDocument || DOMIFrameElement.contentWindow.document); + DOMIFrameDocument = (DOMIFrameElement.contentDocument || DOMIFrameElement.contentWindow.document); DOMIFrameDocument.write(''+ ''); DOMIFrameDocument.close(); @@ -88,6 +92,7 @@ var DOMFixedWidthSpanElement = nil, style.margin = "0px"; style.width = "1px"; style.wordWrap = "break-word"; + try { style.whiteSpace = "pre"; @@ -106,6 +111,46 @@ var DOMFixedWidthSpanElement = nil, DOMDivElement.appendChild(DOMFixedWidthSpanElement); } ++ (void)createDOMMetricsElements +{ + if (!DOMIFrameElement) + [self createDOMElements]; + + var style; + + DOMMetricsDivElement = DOMIFrameDocument.createElement("div"); + DOMMetricsDivElement.style.position = "absolute"; + DOMMetricsDivElement.style.width = "100000px"; + + DOMIFrameDocument.body.appendChild(DOMMetricsDivElement); + + DOMMetricsTextSpanElement = DOMIFrameDocument.createElement("span"); + DOMMetricsTextSpanElement.innerHTML = "x"; + style = DOMMetricsTextSpanElement.style; + style.position = "absolute"; + style.visibility = "visible"; + style.padding = "0px"; + style.margin = "0px"; + style.whiteSpace = "pre"; + + var imgPath = [[CPBundle bundleForClass:[CPView class]] pathForResource:@"empty.png"]; + + DOMMetricsImgElement = DOMIFrameDocument.createElement("img"); + DOMMetricsImgElement.setAttribute("src", imgPath); + DOMMetricsImgElement.setAttribute("width", "1"); + DOMMetricsImgElement.setAttribute("height", "1"); + DOMMetricsImgElement.setAttribute("alt", ""); + style = DOMMetricsImgElement.style; + style.visibility = "visible"; + style.padding = "0px"; + style.margin = "0px"; + style.border = "none"; + style.verticalAlign = "baseline"; + + DOMMetricsDivElement.appendChild(DOMMetricsTextSpanElement); + DOMMetricsDivElement.appendChild(DOMMetricsImgElement); +} + + (CGSize)sizeOfString:(CPString)aString withFont:(CPFont)aFont forWidth:(float)aWidth { if (!aFont) @@ -120,6 +165,7 @@ var DOMFixedWidthSpanElement = nil, [self createDOMElements]; var span; + if (!aWidth) span = DOMFlexibleWidthSpanElement; else @@ -138,4 +184,26 @@ var DOMFixedWidthSpanElement = nil, return _CGSizeMake(span.clientWidth, span.clientHeight); } ++ (CPDictionary)metricsOfFont:(CPFont)aFont +{ + if (!aFont) + { + if (!DefaultFont) + DefaultFont = [CPFont systemFontOfSize:12.0]; + + aFont = DefaultFont; + } + + if (!DOMMetricsDivElement) + [self createDOMMetricsElements]; + + DOMMetricsDivElement.style.font = [aFont cssString]; + + var baseline = DOMMetricsImgElement.offsetTop - DOMMetricsTextSpanElement.offsetTop + DOMMetricsImgElement.offsetHeight, + descender = baseline - DOMMetricsTextSpanElement.offsetHeight, + lineHeight = DOMMetricsTextSpanElement.offsetHeight; + + return [CPDictionary dictionaryWithObjectsAndKeys:baseline, @"ascender", descender, @"descender", lineHeight, @"lineHeight"]; +} + @end diff --git a/Tests/Manual/FontMetricsExplorer/AppController.j b/Tests/Manual/FontMetricsExplorer/AppController.j new file mode 100644 index 000000000..3b21a750b --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/AppController.j @@ -0,0 +1,221 @@ +/* + * AppController.j + * CPFontMetricsExplorer + * + * Created by Aparajita Fishman on August 23, 2010. + */ + +@import + +CPLogRegister(CPLogConsole); + + +var Ascender = 0, + Descender = 0, + LineHeight = 0; + +var GridSize = 9.0; + +var SharedAppController = nil; + + +@implementation AppController : CPObject +{ + CPWindow theWindow; + + @outlet CPPopUpButton fontMenu; + @outlet CPSlider sizeSlider; + @outlet CPTextField sizeText; + @outlet CPTextField ascenderText; + @outlet CPTextField descenderText; + @outlet CPTextField lineHeightText; + @outlet MetricsView metricsView; + @outlet BaselineView baselineView @accessors(readonly); +} + +- (void)awakeFromCib +{ + SharedAppController = self; + + var fonts = [[CPFontManager sharedFontManager] availableFonts], + systemFont = [CPFont systemFontOfSize:12], + family = [systemFont familyName], + names = family.split(/,\s*/), + index = CPNotFound; + + for (var i = 0; i < names.length; ++i) + { + index = [fonts indexOfObjectPassingTest:function(elem, index, context) { return elem === context; } context:names[i]]; + + if (index !== CPNotFound) + break; + } + + [fontMenu removeAllItems]; + [fontMenu addItemsWithTitles:fonts]; + [fontMenu selectItemAtIndex:index !== CPNotFound ? index : 0]; + + [sizeText takeIntegerValueFrom:sizeSlider]; + + [self update]; +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ +} + +- (void)setFontFamily:(id)sender +{ + [self update]; +} + +- (void)setFontSize:(id)sender +{ + [self update]; +} + +- (void)update +{ + var font = [CPFont fontWithName:[fontMenu titleOfSelectedItem] size:[sizeSlider integerValue]]; + + Ascender = [font ascender], + Descender = [font descender], + LineHeight = [font defaultLineHeightForFont]; + + [sizeText takeIntegerValueFrom:sizeSlider]; + [ascenderText setIntegerValue:Ascender]; + [descenderText setIntegerValue:Descender]; + [lineHeightText setIntegerValue:LineHeight]; + + [metricsView updateWithFont:font]; +} + +@end + + +@implementation MetricsView : CPView +{ + @outlet CPTextField sampleText; + + CPColor gridColor; +} + +- (id)initWithFrame:(CGRect)aRect +{ + var self = [super initWithFrame:aRect]; + + if (self) + gridColor = [CPColor colorWithHexString:@"e4f4ff"]; + + return self; +} + +- (void)awakeFromCib +{ + [self setBackgroundColor:[CPColor whiteColor]]; +} + +- (void)drawRect:(CGRect)dirtyRect +{ + var context = [[CPGraphicsContext currentContext] graphicsPort], + bounds = [self bounds], + maxX = CGRectGetMaxX(bounds), + maxY = CGRectGetMaxY(bounds); + + CGContextSetLineWidth(context, 1.0); + CGContextSetStrokeColor(context, gridColor); + CGContextBeginPath(context); + + for (var y = 0.5; y <= maxY; y += GridSize) + { + CGContextMoveToPoint(context, 0.0, y); + CGContextAddLineToPoint(context, maxX, y); + } + + for (var x = 0.5; x <= maxX; x += GridSize) + { + CGContextMoveToPoint(context, x, 0.0); + CGContextAddLineToPoint(context, x, maxY); + } + + CGContextStrokePath(context); +} + +- (void)updateWithFont:(CPFont)aFont +{ + var frame = [sampleText frame], + ascender = [aFont ascender], + descender = [aFont descender], + lineHeight = [aFont defaultLineHeightForFont], + insets = [sampleText currentValueForThemeAttribute:@"content-inset"], + frameSize = CGSizeMake(CGRectGetWidth(frame), insets.top + lineHeight + insets.bottom), + + // Place the label so that the baseline is at the 7th line (y == 63) + textTop = 63.0 - ascender - insets.top; + + [sampleText setFont:aFont]; + [sampleText setFrame:CGRectMake(CGRectGetMinX(frame), textTop, frameSize.width, frameSize.height)]; + + [[SharedAppController baselineView] updateWithText:sampleText ascender:ascender descender:descender]; +} + +@end + + +@implementation BaselineView : CPView +{ + float textTop; + float ascender; + float descender; +} + +- (id)initWithFrame:(CGRect)frame +{ + var self = [super initWithFrame:frame]; + + if (self) + { + textTop = 0; + ascender = 0; + lineHeight = 0; + } + + return self; +} + +- (void)updateWithText:(CPTextField)aTextField ascender:(float)ascenderHeight descender:(float)descenderHeight +{ + textTop = CGRectGetMinY([aTextField frame]) + [aTextField currentValueForThemeAttribute:@"content-inset"].top; + ascender = ascenderHeight; + descender = descenderHeight; + + [self setNeedsDisplay:YES]; +} + +- (void)drawRect:(CGRect)dirtyRect +{ + if (ascender === 0) + return; + + var context = [[CPGraphicsContext currentContext] graphicsPort]; + bounds = [self bounds], + minX = CGRectGetMinX(bounds), + maxX = CGRectGetMaxX(bounds); + + CGContextSetLineWidth(context, 1.0); + CGContextSetStrokeColor(context, [CPColor redColor]); + CGContextBeginPath(context); + + var y = [textTop, textTop + ascender, textTop + ascender - descender], + count = y.length; + + while (count--) + { + CGContextMoveToPoint(context, minX, y[count] + 0.5); + CGContextAddLineToPoint(context, maxX, y[count] + 0.5); + } + + CGContextStrokePath(context); +} + +@end diff --git a/Tests/Manual/FontMetricsExplorer/Info.plist b/Tests/Manual/FontMetricsExplorer/Info.plist new file mode 100644 index 000000000..f3ccea993 --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/Info.plist @@ -0,0 +1,12 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + FontMetricsExplorer + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.cib b/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.cib new file mode 100644 index 000000000..d6393bbb3 --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.cib @@ -0,0 +1 @@ +280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;4E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;7E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;9E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;2;10E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;2;11E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;2;12E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;2;13E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;2;14E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;16E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;18E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;61E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;68E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;71E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;73E;D;K;6;CP$UIDd;2;74E;D;K;6;CP$UIDd;2;75E;D;K;6;CP$UIDd;2;76E;D;K;6;CP$UIDd;2;77E;D;K;6;CP$UIDd;2;78E;D;K;6;CP$UIDd;2;79E;D;K;6;CP$UIDd;2;80E;D;K;6;CP$UIDd;2;81E;D;K;6;CP$UIDd;2;82E;D;K;6;CP$UIDd;2;83E;D;K;6;CP$UIDd;2;84E;D;K;6;CP$UIDd;2;85E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;87E;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;90E;D;K;6;CP$UIDd;2;91E;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;96E;D;K;6;CP$UIDd;2;97E;D;K;6;CP$UIDd;2;99E;D;K;6;CP$UIDd;3;100E;E;E;S;16;IBCocoaFrameworkD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;42E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;101E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;3;102E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;103E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;104E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;109E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;112E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;112E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;113E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;114E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;115E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;116E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;117E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;118E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;119E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;120E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;121E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;120E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;35E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;122E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;123E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;35E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;124E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;6;$afontD;K;6;CP$UIDd;3;126E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;107E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;127E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;107E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;8;CPSliderK;8;$classesA;S;8;CPSliderS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;128E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;129E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;120E;K;11;$aalignmentD;K;6;CP$UIDd;3;120E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;130E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;108E;K;19;CPSliderMinValueKeyD;K;6;CP$UIDd;3;131E;K;19;CPSliderMaxValueKeyD;K;6;CP$UIDd;3;132E;K;23;CPSliderAltIncrValueKeyD;K;6;CP$UIDd;3;120E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;133E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;104E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;134E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;10;CPMenuItemK;8;$classesA;S;10;CPMenuItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;29E;K;18;CPMenuItemTitleKeyD;K;6;CP$UIDd;3;135E;K;19;CPMenuItemTargetKeyD;K;6;CP$UIDd;2;42E;K;19;CPMenuItemActionKeyD;K;6;CP$UIDd;3;136E;K;21;CPMenuItemIsHiddenKeyD;K;6;CP$UIDd;1;0E;K;16;CPMenuItemTagKeyD;K;6;CP$UIDd;1;0E;K;18;CPMenuItemStateKeyD;K;6;CP$UIDd;3;137E;K;17;CPMenuItemMenuKeyD;K;6;CP$UIDd;2;44E;K;38;CPMenuItemKeyEquivalentModifierMaskKeyD;K;6;CP$UIDd;3;138E;E;D;K;10;$classnameS;16;_CPCibCustomViewK;8;$classesA;S;16;_CPCibCustomViewS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;139E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;140E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;141E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;101E;E;D;K;6;$classD;K;6;CP$UIDd;2;15E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;142E;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;139E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;140E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;143E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;3;144E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;145E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;146E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;147E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;148E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;149E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;150E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;151E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;152E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;153E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;154E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;155E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;6;$afontD;K;6;CP$UIDd;3;156E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;157E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;158E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;119E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;120E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;121E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;120E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPPopUpButtonK;8;$classesA;S;13;CPPopUpButtonS;8;CPButtonS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;159E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;160E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;161E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;108E;K;11;$aalignmentD;K;6;CP$UIDd;3;120E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;108E;K;16;CPButtonImageKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateImageKeyD;K;6;CP$UIDd;1;0E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;1;0E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;1;0E;K;20;CPPopUpButtonMenuKeyD;K;6;CP$UIDd;2;44E;K;29;CPPopUpButtonSelectedIndexKeyD;K;6;CP$UIDd;3;120E;E;D;K;10;$classnameS;6;CPMenuK;8;$classesA;S;6;CPMenuS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;14;CPMenuTitleKeyD;K;6;CP$UIDd;3;162E;K;14;CPMenuItemsKeyD;K;6;CP$UIDd;3;163E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;155E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;6;$afontD;K;6;CP$UIDd;3;156E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;108E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;165E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;108E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;46E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;3;166E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;3;167E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;3;168E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;3;169E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;3;170E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;22E;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;171E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;119E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;105E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;107E;K;11;$aalignmentD;K;6;CP$UIDd;3;120E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;121E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;110E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;111E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;111E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;1;0E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;3;107E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;120E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;S;19;Static Text (Size:)S;12;Content ViewS;16;Static Text (12)S;15;Static Text (0)S;17;Static Text (log)S;28;Text Field Cell (Descender:)S;30;Text Field Cell (Line Height:)S;27;Pop Up Button Cell (Item 1)S;17;Horizontal SliderS;19;Static Text (Font:)S;21;Text Field Cell (log)S;18;Menu Item (Item 1)S;13;Baseline ViewS;21;Text Field Cell (0)-2S;20;Text Field Cell (12)S;11;ApplicationS;11;Slider CellS;23;Text Field Cell (Font:)S;14;App ControllerS;22;Text Field Cell (Font)S;12;Metrics ViewS;12;File's OwnerS;26;Static Text (Line Height:)S;23;Static Text (Ascender:)S;19;Text Field Cell (0)S;25;Text Field Cell (Metrics)S;24;Static Text (Descender:)S;27;Text Field Cell (Ascender:)S;18;Static Text (Font)S;17;Static Text (0)-1S;13;Pop Up ButtonS;17;Menu (OtherViews)S;21;Static Text (Metrics)S;30;Window (Font Metrics Explorer)S;21;Text Field Cell (0)-1S;17;Static Text (0)-2S;23;Text Field Cell (Size:)D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;16E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;172E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;24E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;173E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;174E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;175E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;176E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;48E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;177E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;178E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;27E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;179E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;23E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;180E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;47E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;181E;E;D;K;6;$classD;K;6;CP$UIDd;2;86E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;35E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;25E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;182E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;183E;E;D;K;6;$classD;K;6;CP$UIDd;2;98E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;27E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;3;184E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;47E;E;E;S;20;{{15, 96}, {46, 25}}S;18;{{0, 0}, {46, 25}}d;2;36S;6;normald;1;2d;1;4S;5;Size:d;4;3072F;S;20;{{0, 0}, {332, 290}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;32E;E;E;d;2;18S;21;{{278, 96}, {39, 25}}S;18;{{0, 0}, {39, 25}}S;2;12S;21;{{95, 189}, {43, 25}}S;18;{{0, 0}, {43, 25}}d;1;0S;1;0S;21;{{-7, 38}, {177, 26}}S;19;{{0, 0}, {177, 26}}d;2;42D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;125E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;185E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;186E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;111E;E;S;3;logS;21;{{57, 95}, {214, 21}}S;19;{{0, 0}, {214, 21}}d;2;12d;1;8d;2;48S;20;{{15, 59}, {46, 25}}S;5;Font:S;6;Item 1S;17;_popUpItemAction:d;1;1d;7;1048576S;24;{{149, 170}, {163, 100}}S;20;{{0, 0}, {163, 100}}S;12;BaselineViewS;13;AppControllerD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;25E;E;E;S;11;MetricsViewS;21;{{15, 239}, {88, 25}}S;18;{{0, 0}, {88, 25}}S;12;Line Height:S;21;{{15, 189}, {75, 25}}S;18;{{0, 0}, {75, 25}}S;9;Ascender:S;21;{{15, 214}, {83, 25}}S;18;{{0, 0}, {83, 25}}S;10;Descender:S;20;{{13, 14}, {80, 30}}S;18;{{0, 0}, {80, 30}}D;K;6;$classD;K;6;CP$UIDd;3;125E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;185E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;114E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;187E;E;S;4;FontS;21;{{95, 214}, {43, 25}}S;21;{{54, 56}, {243, 24}}S;19;{{0, 0}, {243, 24}}S;8;borderedS;10;OtherViewsD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;30E;E;E;S;21;{{13, 149}, {80, 30}}S;7;MetricsS;28;{1.79769e+308, 1.79769e+308}S;8;CPWindowS;23;{{408, 63}, {332, 290}}d;1;7S;21;Font Metrics ExplorerS;21;{{95, 239}, {43, 25}}S;8;delegateS;12;ascenderTextS;12;baselineViewS;13;descenderTextS;8;fontMenuS;14;lineHeightTextS;11;metricsViewS;10;sizeSliderS;8;sizeTextS;9;theWindowS;10;sampleTextS;14;setFontFamily:S;12;setFontSize:S;32;Lucida Grande, Arial, sans-serifd;2;14T;E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.xib b/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.xib new file mode 100644 index 000000000..54deb22aa --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/Resources/MainMenu.xib @@ -0,0 +1,902 @@ + + + + 1060 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 788 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{408, 675}, {332, 290}} + 1946157056 + Font Metrics Explorer + NSWindow + + {1.79769e+308, 1.79769e+308} + + + 274 + + + + 268 + {{54, 206}, {243, 26}} + + YES + + -2076049856 + 2048 + + LucidaGrande + 13 + 1044 + + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + + + + + 1 + YES + YES + 2 + + + + + 268 + {{19, 210}, {38, 17}} + + YES + + 68288064 + 272630784 + Font: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{19, 80}, {67, 17}} + + YES + + 68288064 + 272630784 + Ascender: + + + + + + + + + 268 + {{99, 80}, {35, 17}} + + YES + + 68288064 + 4195328 + 0 + + + + + + + + + 268 + {{99, 55}, {35, 17}} + + YES + + 68288064 + 4195328 + 0 + + + + + + + + + 268 + {{99, 30}, {35, 17}} + + YES + + 68288064 + 4195328 + 0 + + + + + + + + + 268 + {{19, 55}, {75, 17}} + + YES + + 68288064 + 272630784 + Descender: + + + + + + + + + 268 + {{19, 30}, {80, 17}} + + YES + + 68288064 + 272630784 + Line Height: + + + + + + + + + 268 + {{17, 250}, {72, 22}} + + YES + + 68288064 + 272630784 + Font + + LucidaGrande-Bold + 18 + 16 + + + + + + + + + 268 + {{17, 115}, {72, 22}} + + YES + + 68288064 + 272630784 + Metrics + + + + + + + + + 268 + {{19, 173}, {38, 17}} + + YES + + 68288064 + 272630784 + Size: + + + + + + + + + 268 + {{282, 173}, {31, 17}} + + YES + + 68288064 + 272630784 + 12 + + + + + + + + + 268 + {{57, 174}, {214, 21}} + + YES + + -2080244224 + 0 + + + 48 + 8 + 12 + 0.0 + 0 + 1 + NO + NO + + + + + 268 + + + + 298 + {{-3, 40}, {169, 18}} + + YES + + 68288064 + 138413056 + log + + LucidaGrande + 14 + 16 + + + + + + + + {{149, 20}, {163, 100}} + + MetricsView + + + + 268 + {{149, 20}, {163, 100}} + + BaselineView + + + {332, 290} + + + {{0, 0}, {1680, 1028}} + {1.79769e+308, 1.79769e+308} + + + AppController + + + + + + + delegate + + + + 451 + + + + fontMenu + + + + 1056 + + + + sizeSlider + + + + 1063 + + + + lineHeightText + + + + 1085 + + + + descenderText + + + + 1086 + + + + ascenderText + + + + 1087 + + + + sizeText + + + + 1089 + + + + theWindow + + + + 1090 + + + + setFontFamily: + + + + 1092 + + + + setFontSize: + + + + 1095 + + + + sampleText + + + + 1103 + + + + metricsView + + + + 1104 + + + + baselineView + + + + 1109 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + + + + + + 372 + + + + + + + + + + + + + + + + + + + + + + 450 + + + + + 1046 + + + + + + + + 1047 + + + + + + + + 1048 + + + + + + + + 1049 + + + + + 1052 + + + + + + + + 1053 + + + + + 1057 + + + + + + + + 1058 + + + + + 1059 + + + + + + + + 1060 + + + + + 1061 + + + + + + + + 1062 + + + + + 1069 + + + + + + + + 1070 + + + + + 1071 + + + + + + + + 1072 + + + + + 1073 + + + + + + + + 1074 + + + + + 1075 + + + + + + + + 1076 + + + + + 1077 + + + + + + + + 1078 + + + + + 1079 + + + + + + + + 1080 + + + + + 1081 + + + + + + + + 1082 + + + + + 1083 + + + + + + + + 1084 + + + + + 1088 + + + + + + + + 1098 + + + + + + + + 1099 + + + + + 1106 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{451, 847}, {110, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{329, 888}, {163, 96}} + com.apple.InterfaceBuilder.CocoaPlugin + {{884, 511}, {332, 290}} + com.apple.InterfaceBuilder.CocoaPlugin + {{884, 511}, {332, 290}} + + {{33, 99}, {480, 360}} + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 1109 + + + + + AppController + NSObject + + id + id + + + + setFontFamily: + id + + + setFontSize: + id + + + + NSTextField + BaselineView + NSTextField + NSPopUpButton + NSTextField + MetricsView + NSSlider + NSTextField + NSWindow + + + + ascenderText + NSTextField + + + baselineView + BaselineView + + + descenderText + NSTextField + + + fontMenu + NSPopUpButton + + + lineHeightText + NSTextField + + + metricsView + MetricsView + + + sizeSlider + NSSlider + + + sizeText + NSTextField + + + theWindow + NSWindow + + + + IBUserSource + + + + + BaselineView + NSView + + IBUserSource + + + + + MetricsView + NSView + + sampleText + NSTextField + + + sampleText + + sampleText + NSTextField + + + + IBUserSource + + + + + + 0 + IBCocoaFramework + YES + ../registration.xcodeproj + 3 + + {9, 8} + {7, 2} + + + diff --git a/Tests/Manual/FontMetricsExplorer/Resources/spinner.gif b/Tests/Manual/FontMetricsExplorer/Resources/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..06dbc2bc21dddcf0e09b566d5b211aee89570f52 GIT binary patch literal 1849 zcma*odr(tX9tZHtz31lM+(&Y`A`Ou`NeG&R#DrIfV%?hng21vs6v>ooRQQFbk7E_K!V( z{?5!fpZWgIZ%*d6t%i*j24bL}AZUJm9)h6R*;%L4IWse3G#VWaN1#$zSSXcBhlYlH zJ|D}n{r&w2f+Qp)SS*&n?*G4}{}!h?td_mjU6Kad-rW*QwWYCUk7d^e+sjpZAn6kT z5rM;`{~_}-wm+L@%+E;JphLm}C3WzQAQD0wBoY|rOTQX{(@pp-WAA8Iw0HKl|15j) zhGh(SFWu#5zUCw^T!}C~eC}~?{xG-r7ugQC>taC+|L^xr&a%{#cgUOZXIM&v?)k^2 z1i5%0!U00wq)r4vlAwXBA_m5J5WNeuBm-XJQ5pG4GD%vc|K){+TJ{AkHqN@SJKczX zU}QRd9n*_bf^h94)6Ctv{CUfz_;qs#RDuQ$DR%y1&5G-a6rhf*4Y zl+UOD1*GE{GQ7vv;c-tTIMkz0ovO>9j%b5hpa@a*CBJ#W!0@ndSwF|%hMkdFtXiU) z`BEp+yhkt8ZY>tg&uyH@%^%K4jDrbA;et&vnnzZ3z22@e6<27z2Vk13kb7OtISyxv z(XoO-LNQCZe3lfzc%*pNqU<9T+p~teThOEB+~e&U0mC|zS{Q)dJZ)!^1f7L(zg*L> z*vSW%?dR~@@0(}x6-V^A`~ImD;)NaBUnP8;RH=bS2@pk`wp>>8r&jGjmGPy%1BW}v zoPo}ca$~bze@efc3kapuEVW1!%teOZT3j2Tw5=hjiAf02d}7dL0oFC%@=RXp5Ow#% z@a>+AM|YWt$n&e`>sB-32gBcuTi>R>*|8@lp`y6thc7ydyqDsuUn~YzZf|{-R@-3y zL#wx{Ii}xxL_csiW*LBn0-A$>zp4WOmkf6=ilrjlW?-l9+bCd7|i?*b5NTmy<<6NZ0T8$SN@mwdC2f z6jqK=N@bS@!=YSj%>h0}*4p+%0HbTIrE$w7UMT6+AZZ&DAo*qZAAi(OtNbIfl#Dw^ zJWeiCp~zi#&t6x}m9)O^eR4HiLV3QA<<0>HZ8%$^lrSE94Wb}=+MM^!b>n#5&-JQR zkr-CEu9C;_F*7DqDisulV6Pmg$nFL0TPn%~*m^-`Z3^BgU(sNpnx%nW(!eV9A&FvI zHL3X3lw8Wji^6=8KbQDE-e%b?svdFxxdh$8r97@7$ojeI`6AL8Ob6QC$qh&>ZWVDX1F{0vJnT%%mE;GveKWR%C} zM&4d;Jf3s9|HAA)yVUPo`Aq;0do#)uHSXi5*QF*)x@MVVHr+cN)uMZ__F|&Ta#p8d z53TOKtce!PJUuie8UWol-S(`c2nH?UGqJP{!4RR4u$LCfn)q-hj0^f=h(VYy)T6eN zhRO!ja-aDBTcgeyP(8Ua4IdiOog^*CQa?R(cP#9AgL9`j>EX-6Yf1lzX(!~``M1XC zNmM<4<6d~wWZ$Xrk0K}UteTrq@LBBk#MsjkK;pbuVhe)NI7(7Pf(l?lxC7=1Z7Pzl zMbS;nV4NI5_N{1$P)&XC)huOGQ+h^zpYUZfb*1n6>!`#*b3y52LGmi+<4sY5jyD#- zw&$d}DTguLAfnRtjrM*JfqtHqUu6rQoU=g%1E9xk%;)TDm^2<8n-0IhTsQFaek)MY}>PK4;nBk=ow4pF>vzkO& gna%Org-kgQCf=+BeMi^RbuY;YE~rTjend;_cdi8t>i_@% literal 0 HcmV?d00001 diff --git a/Tests/Manual/FontMetricsExplorer/index-debug.html b/Tests/Manual/FontMetricsExplorer/index-debug.html new file mode 100644 index 000000000..c202f4733 --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/index-debug.html @@ -0,0 +1,69 @@ + + + + + + + + Font Metrics Explorer + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/FontMetricsExplorer/index.html b/Tests/Manual/FontMetricsExplorer/index.html new file mode 100644 index 000000000..e9a81c538 --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/index.html @@ -0,0 +1,68 @@ + + + + + + + + Font Metrics Explorer + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/FontMetricsExplorer/main.j b/Tests/Manual/FontMetricsExplorer/main.j new file mode 100755 index 000000000..af6279da3 --- /dev/null +++ b/Tests/Manual/FontMetricsExplorer/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} From 18696e6bc226038a816691dc6cd07586e3d55450 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 21 Aug 2010 11:31:31 -0400 Subject: [PATCH 43/47] Ensure CPControl -performClick unhighlights the button if the action throws. --- AppKit/CPControl.j | 14 ++- .../AppController.j | 110 ++++++++++++++++++ .../Info.plist | 12 ++ .../Resources/spinner.gif | Bin 0 -> 1849 bytes .../index-debug.html | 69 +++++++++++ .../index.html | 68 +++++++++++ .../CPControlPerformClickExceptionTest/main.j | 18 +++ 7 files changed, 289 insertions(+), 2 deletions(-) create mode 100644 Tests/Manual/CPControlPerformClickExceptionTest/AppController.j create mode 100644 Tests/Manual/CPControlPerformClickExceptionTest/Info.plist create mode 100644 Tests/Manual/CPControlPerformClickExceptionTest/Resources/spinner.gif create mode 100644 Tests/Manual/CPControlPerformClickExceptionTest/index-debug.html create mode 100644 Tests/Manual/CPControlPerformClickExceptionTest/index.html create mode 100755 Tests/Manual/CPControlPerformClickExceptionTest/main.j diff --git a/AppKit/CPControl.j b/AppKit/CPControl.j index db8a22cd9..6310a9b11 100644 --- a/AppKit/CPControl.j +++ b/AppKit/CPControl.j @@ -337,9 +337,19 @@ var CPControlBlackColor = [CPColor blackColor]; [self highlight:YES]; [self setState:[self nextState]]; - [self sendAction:[self action] to:[self target]]; - [CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unhighlightButtonTimerDidFinish:) userInfo:nil repeats:NO]; + try + { + [self sendAction:[self action] to:[self target]]; + } + catch (e) + { + throw e; + } + finally + { + [CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unhighlightButtonTimerDidFinish:) userInfo:nil repeats:NO]; + } } - (void)unhighlightButtonTimerDidFinish:(id)sender diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/AppController.j b/Tests/Manual/CPControlPerformClickExceptionTest/AppController.j new file mode 100644 index 000000000..fc07ffc5b --- /dev/null +++ b/Tests/Manual/CPControlPerformClickExceptionTest/AppController.j @@ -0,0 +1,110 @@ +/* + * AppController.j + * CPControlPerformClickExceptionTest + * + * Created by Aparajita Fishman on August 21, 2010. + */ + +@import + +CPLogRegister(CPLogConsole); + +var UseFix = NO; + + +@implementation AppController : CPObject +{ + CPWindow theWindow; + + CPButton button; +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(70.0, 70.0, 400.0, 300.0) styleMask:CPTitledWindowMask]; + [theWindow setTitle:@"CPControlPerformClickExceptionTest"]; + + var contentView = [theWindow contentView], + label = [CPTextField labelWithTitle:@"Press the Return key to see the problem and fix"], + button = [MyButton buttonWithTitle:@"Button"], + checkbox = [CPCheckBox checkBoxWithTitle:@"Use Fix"]; + + [label setFrameOrigin:CGPointMake(50, 50)]; + [contentView addSubview:label]; + + [button setFrameOrigin:CGPointMake(50, 90)]; + [button setTarget:self]; + [button setAction:@selector(buttonWasPressed:)]; + [contentView addSubview:button]; + + [checkbox setFrameOrigin:CGPointMake(50, 130)]; + [checkbox setTarget:self]; + [checkbox setAction:@selector(useFix:)]; + [contentView addSubview:checkbox]; + + [theWindow setDefaultButton:button]; + [theWindow orderFront:nil]; +} + +- (void)buttonWasPressed:(id)sender +{ + try + { + [CPException raise:[[sender window] title] reason:[sender title]]; + } + finally + { + var alert = [[CPAlert alloc] init]; + + [alert setTitle:@"Test"]; + [alert setMessageText:UseFix ? @"Note the button has already been unhighlighted." : @"Note the button has not been unhighlighted. It will be when this alert is closed."]; + [alert addButtonWithTitle:@"OK"]; + [alert setDelegate:self]; + [alert runModal]; + } +} + +-(void)alertDidEnd:(CPAlert)theAlert returnCode:(int)returnCode +{ + [button highlight:NO]; +} + +- (void)useFix:(id)sender +{ + UseFix = [sender state] == CPOnState; +} + +@end + +@implementation MyButton : CPButton + ++ (id)buttonWithTitle:(CPString)aTitle +{ + var button = [[[self class] alloc] init]; + + [button setTheme:[CPTheme defaultTheme]]; + [button setTitle:aTitle]; + [button sizeToFit]; + + return button; +} + +- (void)performClick:(id)sender +{ + if (UseFix) + { + [super performClick:sender]; + return; + } + + if (![self isEnabled]) + return; + + [self highlight:YES]; + [self setState:[self nextState]]; + [self sendAction:[self action] to:[self target]]; + + [CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(unhighlightButtonTimerDidFinish:) userInfo:nil repeats:NO]; +} + +@end diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/Info.plist b/Tests/Manual/CPControlPerformClickExceptionTest/Info.plist new file mode 100644 index 000000000..d698a875a --- /dev/null +++ b/Tests/Manual/CPControlPerformClickExceptionTest/Info.plist @@ -0,0 +1,12 @@ + + + + + CPApplicationDelegateClass + AppController + CPBundleName + CPControlPerformClickExceptionTest + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/Resources/spinner.gif b/Tests/Manual/CPControlPerformClickExceptionTest/Resources/spinner.gif new file mode 100644 index 0000000000000000000000000000000000000000..06dbc2bc21dddcf0e09b566d5b211aee89570f52 GIT binary patch literal 1849 zcma*odr(tX9tZHtz31lM+(&Y`A`Ou`NeG&R#DrIfV%?hng21vs6v>ooRQQFbk7E_K!V( z{?5!fpZWgIZ%*d6t%i*j24bL}AZUJm9)h6R*;%L4IWse3G#VWaN1#$zSSXcBhlYlH zJ|D}n{r&w2f+Qp)SS*&n?*G4}{}!h?td_mjU6Kad-rW*QwWYCUk7d^e+sjpZAn6kT z5rM;`{~_}-wm+L@%+E;JphLm}C3WzQAQD0wBoY|rOTQX{(@pp-WAA8Iw0HKl|15j) zhGh(SFWu#5zUCw^T!}C~eC}~?{xG-r7ugQC>taC+|L^xr&a%{#cgUOZXIM&v?)k^2 z1i5%0!U00wq)r4vlAwXBA_m5J5WNeuBm-XJQ5pG4GD%vc|K){+TJ{AkHqN@SJKczX zU}QRd9n*_bf^h94)6Ctv{CUfz_;qs#RDuQ$DR%y1&5G-a6rhf*4Y zl+UOD1*GE{GQ7vv;c-tTIMkz0ovO>9j%b5hpa@a*CBJ#W!0@ndSwF|%hMkdFtXiU) z`BEp+yhkt8ZY>tg&uyH@%^%K4jDrbA;et&vnnzZ3z22@e6<27z2Vk13kb7OtISyxv z(XoO-LNQCZe3lfzc%*pNqU<9T+p~teThOEB+~e&U0mC|zS{Q)dJZ)!^1f7L(zg*L> z*vSW%?dR~@@0(}x6-V^A`~ImD;)NaBUnP8;RH=bS2@pk`wp>>8r&jGjmGPy%1BW}v zoPo}ca$~bze@efc3kapuEVW1!%teOZT3j2Tw5=hjiAf02d}7dL0oFC%@=RXp5Ow#% z@a>+AM|YWt$n&e`>sB-32gBcuTi>R>*|8@lp`y6thc7ydyqDsuUn~YzZf|{-R@-3y zL#wx{Ii}xxL_csiW*LBn0-A$>zp4WOmkf6=ilrjlW?-l9+bCd7|i?*b5NTmy<<6NZ0T8$SN@mwdC2f z6jqK=N@bS@!=YSj%>h0}*4p+%0HbTIrE$w7UMT6+AZZ&DAo*qZAAi(OtNbIfl#Dw^ zJWeiCp~zi#&t6x}m9)O^eR4HiLV3QA<<0>HZ8%$^lrSE94Wb}=+MM^!b>n#5&-JQR zkr-CEu9C;_F*7DqDisulV6Pmg$nFL0TPn%~*m^-`Z3^BgU(sNpnx%nW(!eV9A&FvI zHL3X3lw8Wji^6=8KbQDE-e%b?svdFxxdh$8r97@7$ojeI`6AL8Ob6QC$qh&>ZWVDX1F{0vJnT%%mE;GveKWR%C} zM&4d;Jf3s9|HAA)yVUPo`Aq;0do#)uHSXi5*QF*)x@MVVHr+cN)uMZ__F|&Ta#p8d z53TOKtce!PJUuie8UWol-S(`c2nH?UGqJP{!4RR4u$LCfn)q-hj0^f=h(VYy)T6eN zhRO!ja-aDBTcgeyP(8Ua4IdiOog^*CQa?R(cP#9AgL9`j>EX-6Yf1lzX(!~``M1XC zNmM<4<6d~wWZ$Xrk0K}UteTrq@LBBk#MsjkK;pbuVhe)NI7(7Pf(l?lxC7=1Z7Pzl zMbS;nV4NI5_N{1$P)&XC)huOGQ+h^zpYUZfb*1n6>!`#*b3y52LGmi+<4sY5jyD#- zw&$d}DTguLAfnRtjrM*JfqtHqUu6rQoU=g%1E9xk%;)TDm^2<8n-0IhTsQFaek)MY}>PK4;nBk=ow4pF>vzkO& gna%Org-kgQCf=+BeMi^RbuY;YE~rTjend;_cdi8t>i_@% literal 0 HcmV?d00001 diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/index-debug.html b/Tests/Manual/CPControlPerformClickExceptionTest/index-debug.html new file mode 100644 index 000000000..dcc825c28 --- /dev/null +++ b/Tests/Manual/CPControlPerformClickExceptionTest/index-debug.html @@ -0,0 +1,69 @@ + + + + + + + + CPControlPerformClickExceptionTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/index.html b/Tests/Manual/CPControlPerformClickExceptionTest/index.html new file mode 100644 index 000000000..bd9ab5680 --- /dev/null +++ b/Tests/Manual/CPControlPerformClickExceptionTest/index.html @@ -0,0 +1,68 @@ + + + + + + + + CPControlPerformClickExceptionTest + + + + + + + + + + + + +
+ + + +
+ + + diff --git a/Tests/Manual/CPControlPerformClickExceptionTest/main.j b/Tests/Manual/CPControlPerformClickExceptionTest/main.j new file mode 100755 index 000000000..af6279da3 --- /dev/null +++ b/Tests/Manual/CPControlPerformClickExceptionTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * TableCibTest + * + * Created by Francisco Tolmasky on July 5, 2009. + * Copyright 2009, 280 North, Inc. All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} From ad5badb0d75584d307caa2d0a793c13790691694 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sun, 8 Aug 2010 15:12:00 -0400 Subject: [PATCH 44/47] Remove @import statements from source files, doxygen doesn't parse them correctly. --- Jakefile | 2 +- Tools/Documentation/Cappuccino.doxygen | 6 +++--- Tools/Documentation/cleanup_headers | 13 +++---------- Tools/Documentation/make_headers | 10 +--------- Tools/Documentation/make_headers.sh | 11 +++++++++++ 5 files changed, 19 insertions(+), 23 deletions(-) create mode 100755 Tools/Documentation/make_headers.sh diff --git a/Jakefile b/Jakefile index a441cd4b7..e67749c38 100644 --- a/Jakefile +++ b/Jakefile @@ -111,7 +111,7 @@ task ("documentation", function() var documentationDir = FILE.join("Tools", "Documentation"); - if (OS.system(["ruby", FILE.join(documentationDir, "make_headers")])) + if (OS.system(["ruby", FILE.join(documentationDir, "make_headers.sh")])) OS.exit(1); //rake abort if ($? != 0) if (!OS.system([doxygen, FILE.join(documentationDir, "Cappuccino.doxygen")])) diff --git a/Tools/Documentation/Cappuccino.doxygen b/Tools/Documentation/Cappuccino.doxygen index aac9f3027..5b7453b8b 100644 --- a/Tools/Documentation/Cappuccino.doxygen +++ b/Tools/Documentation/Cappuccino.doxygen @@ -590,8 +590,8 @@ WARN_LOGFILE = debug.txt # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = AppKit \ - Foundation +INPUT = AppKit.doc \ + Foundation.doc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -651,7 +651,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = AppKit/Themes +EXCLUDE = AppKit.doc/Themes # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded diff --git a/Tools/Documentation/cleanup_headers b/Tools/Documentation/cleanup_headers index e2336a2b4..bed3a70fb 100755 --- a/Tools/Documentation/cleanup_headers +++ b/Tools/Documentation/cleanup_headers @@ -1,10 +1,3 @@ -#! /usr/bin/env ruby - -filename = File.dirname(__FILE__) + "/header_files" -@files = File.new(filename).read.split("\n") - -for file in @files - File.delete(file) -end - -File.delete(filename) \ No newline at end of file +#! /bin/sh +rm -rf AppKit.doc +rm -rf Foundation.doc diff --git a/Tools/Documentation/make_headers b/Tools/Documentation/make_headers index 8553faf5f..70ad68aec 100755 --- a/Tools/Documentation/make_headers +++ b/Tools/Documentation/make_headers @@ -1,7 +1,5 @@ #! /usr/bin/env ruby -@outputFiles = [] - def makeHeaderFileFrom(fileName) # Grab the entire file (text) data = File.new(fileName).read @@ -29,20 +27,14 @@ def makeHeaderFileFrom(fileName) f = File.new(newFileName, "w") f.write(newLine + "\n@end") f.close() - - @outputFiles.push(newFileName) end end end end end -fileList = Dir['AppKit/**/*.j'] + Dir['Foundation/**/*.j'] +fileList = Dir['AppKit.doc/**/*.j'] + Dir['Foundation.doc/**/*.j'] for fileName in fileList makeHeaderFileFrom(fileName) end - -f = File.new(File.dirname(__FILE__) + "/header_files", "w") -f.write(@outputFiles.join("\n")) -f.close() diff --git a/Tools/Documentation/make_headers.sh b/Tools/Documentation/make_headers.sh new file mode 100755 index 000000000..14bd4fdc3 --- /dev/null +++ b/Tools/Documentation/make_headers.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# NOTE: The working directory should be the main capp directory when this script is run + +cp -r AppKit AppKit.doc +cp -r Foundation Foundation.doc + +find AppKit.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \; +find Foundation.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \; + +exec Tools/Documentation/make_headers.rb From 8dd1d20a2d355238a05b834fe7e3ca186cb20633 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Aug 2010 15:41:00 -0400 Subject: [PATCH 45/47] Made sure to remove the .doc directories first, fixed exec --- Tools/Documentation/make_headers.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Tools/Documentation/make_headers.sh b/Tools/Documentation/make_headers.sh index 14bd4fdc3..a9f031b1a 100755 --- a/Tools/Documentation/make_headers.sh +++ b/Tools/Documentation/make_headers.sh @@ -2,10 +2,20 @@ # # NOTE: The working directory should be the main capp directory when this script is run +echo "Preprocessing source files..." + +if [ -d AppKit.doc ]; then + rm -rf AppKit.doc +fi + +if [ -d Foundation.doc ]; then + rm -rf Foundation.doc +fi + cp -r AppKit AppKit.doc cp -r Foundation Foundation.doc find AppKit.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \; find Foundation.doc -name *.j -exec sed -e '/@import.*/ d' -i '' {} \; -exec Tools/Documentation/make_headers.rb +exec Tools/Documentation/make_headers From b27560c51ea5592d8328a28ca8154a47d4b609e9 Mon Sep 17 00:00:00 2001 From: Blair Duncan Date: Fri, 27 Aug 2010 19:37:32 -0400 Subject: [PATCH 46/47] Fix for issue 841 where the edit cursor would not always flash --- AppKit/CPTextField.j | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index 84037104f..cf5ec9465 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -278,6 +278,10 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); return; _isEditable = shouldBeEditable; + + if(shouldBeEditable) + _isSelectable = YES; + // We only allow first responder status if the field is editable and enabled. if (!shouldBeEditable && [[self window] firstResponder] === self) [[self window] makeFirstResponder:nil]; From 547f1fb7865d9b54627b67c62ea0fc861aaeb682 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 29 Aug 2010 17:42:22 -0400 Subject: [PATCH 47/47] While not used anywhere, the preprocessor 'peak' method was most likely meant to be called 'peek'. Renamed it. Also some minor code styling and whitespace fixes. --- Objective-J/Preprocessor.js | 286 ++++++++++++++++++------------------ 1 file changed, 143 insertions(+), 143 deletions(-) diff --git a/Objective-J/Preprocessor.js b/Objective-J/Preprocessor.js index d66d47144..75a4edc21 100644 --- a/Objective-J/Preprocessor.js +++ b/Objective-J/Preprocessor.js @@ -61,7 +61,7 @@ var TOKEN_ACCESSORS = "accessors", TOKEN_WHITESPACE = /^(?:(?:\s+$)|(?:\/(?:\/|\*)))/, TOKEN_NUMBER = /^[+-]?\d+(([.]\d+)*([eE][+-]?\d+))?$/, TOKEN_IDENTIFIER = /^[a-zA-Z_$](\w|$)*$/; - + #define IS_WORD(token) /^\w+$/.test(token) function Lexer(/*String*/ aString) @@ -70,7 +70,7 @@ function Lexer(/*String*/ aString) // FIXME: Used fixed regex this._tokens = (aString + '\n').match(/\/\/.*(\r|\n)?|\/\*(?:.|\n|\r)*?\*\/|\w+\b|[+-]?\d+(([.]\d+)*([eE][+-]?\d+))?|"[^"\\]*(\\[\s\S][^"\\]*)*"|'[^'\\]*(\\[\s\S][^'\\]*)*'|\s+|./g); this._context = []; - + return this; } @@ -84,17 +84,17 @@ Lexer.prototype.pop = function() this._index = this._context.pop(); } -Lexer.prototype.peak = function(shouldSkipWhitespace) +Lexer.prototype.peek = function(shouldSkipWhitespace) { if (shouldSkipWhitespace) { this.push(); var token = this.skip_whitespace(); this.pop(); - + return token; } - + return this._tokens[this._index + 1]; } @@ -112,18 +112,18 @@ Lexer.prototype.last = function() { if (this._index < 0) return NULL; - + return this._tokens[this._index - 1]; } -Lexer.prototype.skip_whitespace= function(shouldMoveBackwards) -{ +Lexer.prototype.skip_whitespace = function(shouldMoveBackwards) +{ var token; - + if (shouldMoveBackwards) - while((token = this.previous()) && TOKEN_WHITESPACE.test(token)) ; + while ((token = this.previous()) && TOKEN_WHITESPACE.test(token)) ; else - while((token = this.next()) && TOKEN_WHITESPACE.test(token)) ; + while ((token = this.next()) && TOKEN_WHITESPACE.test(token)) ; return token; } @@ -187,7 +187,7 @@ var Preprocessor = function(/*String*/ aString, /*CFURL|String*/ aURL, /*unsigne Preprocessor.prototype.setClassInfo = function(className, superClassName, ivars) { - this._classLookupTable[className] = {superClassName:superClassName, ivars:ivars}; + this._classLookupTable[className] = { superClassName:superClassName, ivars:ivars }; } Preprocessor.prototype.getClassInfo = function(className) @@ -234,7 +234,7 @@ Preprocessor.prototype.accessors = function(tokens) if (token != TOKEN_OPEN_PARENTHESIS) { tokens.previous(); - + return attributes; } @@ -249,7 +249,7 @@ Preprocessor.prototype.accessors = function(tokens) if ((token = tokens.skip_whitespace()) == TOKEN_EQUAL) { value = tokens.skip_whitespace(); - + if (!IS_WORD(value)) throw new SyntaxError(this.error_message("*** @accessors attribute value not valid.")); @@ -257,7 +257,7 @@ Preprocessor.prototype.accessors = function(tokens) { if ((token = tokens.next()) != TOKEN_COLON) throw new SyntaxError(this.error_message("*** @accessors setter attribute requires argument with \":\" at end of selector name.")); - + value += ":"; } @@ -268,30 +268,30 @@ Preprocessor.prototype.accessors = function(tokens) if (token == TOKEN_CLOSE_PARENTHESIS) break; - + if (token != TOKEN_COMMA) throw new SyntaxError(this.error_message("*** Expected ',' or ')' in @accessors attribute list.")); } - + return attributes; } Preprocessor.prototype.brackets = function(/*Lexer*/ tokens, /*StringBuffer*/ aStringBuffer) { var tuples = []; - + while (this.preprocess(tokens, NULL, NULL, NULL, tuples[tuples.length] = [])) ; if (tuples[0].length === 1) { CONCAT(aStringBuffer, '['); - + // When we have an empty array literal ([]), tuples[0][0] will be an empty StringBuffer CONCAT(aStringBuffer, tuples[0][0]); - + CONCAT(aStringBuffer, ']'); } - + else { var selector = new StringBuffer(); @@ -313,15 +313,15 @@ Preprocessor.prototype.brackets = function(/*Lexer*/ tokens, /*StringBuffer*/ aS var index = 1, count = tuples.length, marg_list = new StringBuffer(); - + for(; index < count; ++index) { var pair = tuples[index]; - - CONCAT(selector, pair[1]) + + CONCAT(selector, pair[1]); CONCAT(marg_list, ", " + pair[0]); } - + CONCAT(aStringBuffer, ", \""); CONCAT(aStringBuffer, selector); // FIXME: sel_getUid(selector + "") ? CONCAT(aStringBuffer, '\"'); @@ -335,21 +335,21 @@ Preprocessor.prototype.directive = function(tokens, aStringBuffer, allowedDirect // Grab the next token, preprocessor directives follow '@' immediately. var buffer = aStringBuffer ? aStringBuffer : new StringBuffer(), token = tokens.next(); - - // To provide compatibility with Objective-C files, we convert NSString literals into + + // To provide compatibility with Objective-C files, we convert NSString literals into // toll-freed JavaScript/CPString strings. if (token.charAt(0) == TOKEN_DOUBLE_QUOTE) CONCAT(buffer, token); - - // Currently we simply swallow forward declarations and only provide them to allow + + // Currently we simply swallow forward declarations and only provide them to allow // compatibility with Objective-C files. else if (token === TOKEN_CLASS) { tokens.skip_whitespace(); - + return; } - + // @implementation Class implementations else if (token === TOKEN_IMPLEMENTATION) this.implementation(tokens, buffer); @@ -361,7 +361,7 @@ Preprocessor.prototype.directive = function(tokens, aStringBuffer, allowedDirect // @selector else if (token === TOKEN_SELECTOR) this.selector(tokens, buffer); - + if (!aStringBuffer) return buffer; } @@ -376,7 +376,7 @@ Preprocessor.prototype.hash = function(tokens, aStringBuffer) if (token === TOKEN_PRAGMA) { token = tokens.skip_whitespace(); - + // '#pragma mark' directive is used in Xcode editor for creating labels, // which is irrelevant to Cappuccino - just swallow this line if (token === TOKEN_MARK) @@ -399,7 +399,7 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin instance_methods = new StringBuffer(), class_methods = new StringBuffer(); - + if (!(/^\w/).test(class_name)) throw new Error(this.error_message("*** Expected class name, found \"" + class_name + "\".")); @@ -410,16 +410,16 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin this._currentSelector = ""; // If we reach an open parenthesis, we are declaring a category. - if((token = tokens.skip_whitespace()) == TOKEN_OPEN_PARENTHESIS) + if ((token = tokens.skip_whitespace()) == TOKEN_OPEN_PARENTHESIS) { token = tokens.skip_whitespace(); - + if (token == TOKEN_CLOSE_PARENTHESIS) throw new SyntaxError(this.error_message("*** Can't Have Empty Category Name for class \"" + class_name + "\".")); - + if (tokens.skip_whitespace() != TOKEN_CLOSE_PARENTHESIS) throw new SyntaxError(this.error_message("*** Improper Category Definition for class \"" + class_name + "\".")); - + CONCAT(buffer, "{\nvar the_class = objj_getClass(\"" + class_name + "\")\n"); CONCAT(buffer, "if(!the_class) throw new SyntaxError(\"*** Could not find definition for class \\\"" + class_name + "\\\"\");\n"); CONCAT(buffer, "var meta_class = the_class.isa;"); @@ -430,17 +430,17 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin if(token == TOKEN_COLON) { token = tokens.skip_whitespace(); - + if (!TOKEN_IDENTIFIER.test(token)) throw new SyntaxError(this.error_message("*** Expected class name, found \"" + token + "\".")); - + superclass_name = token; token = tokens.skip_whitespace(); } - + CONCAT(buffer, "{var the_class = objj_allocateClassPair(" + superclass_name + ", \"" + class_name + "\"),\nmeta_class = the_class.isa;"); - + // If we are at an opening curly brace ('{'), then we have an ivar declaration. if (token == TOKEN_OPEN_BRACE) { @@ -449,7 +449,7 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin declaration = [], attributes, accessors = {}; - + while((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_BRACE) { if (token === TOKEN_PREPROCESSOR) @@ -470,10 +470,10 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin var name = declaration[declaration.length - 1]; CONCAT(buffer, "new objj_ivar(\"" + name + "\")"); - + ivar_names[name] = 1; declaration = []; - + if (attributes) { accessors[name] = attributes; @@ -490,7 +490,7 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin if (ivar_count) CONCAT(buffer, "]);\n"); - + if (!token) throw new SyntaxError(this.error_message("*** Expected '}'")); @@ -503,44 +503,44 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin { var accessor = accessors[ivar_name], property = accessor["property"] || ivar_name; - + // getter var getterName = accessor["getter"] || property, getterCode = "(id)" + getterName + "\n{\nreturn " + ivar_name + ";\n}"; if (IS_NOT_EMPTY(instance_methods)) CONCAT(instance_methods, ",\n"); - + CONCAT(instance_methods, this.method(new Lexer(getterCode), ivar_names)); - + // setter if (accessor["readonly"]) continue; - + var setterName = accessor["setter"]; - + if (!setterName) { var start = property.charAt(0) == '_' ? 1 : 0; setterName = (start ? "_" : "") + "set" + property.substr(start, 1).toUpperCase() + property.substring(start + 1) + ":"; } - + var setterCode = "(void)" + setterName + "(id)newValue\n{\n"; - + if (accessor["copy"]) setterCode += "if (" + ivar_name + " !== newValue)\n" + ivar_name + " = [newValue copy];\n}"; else setterCode += ivar_name + " = newValue;\n}"; - + if (IS_NOT_EMPTY(instance_methods)) CONCAT(instance_methods, ",\n"); - + CONCAT(instance_methods, this.method(new Lexer(setterCode), ivar_names)); } } else tokens.previous(); - + // We must make a new class object for our class definition. CONCAT(buffer, "objj_registerClassPair(the_class);\n"); } @@ -565,7 +565,7 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin if (IS_NOT_EMPTY(instance_methods)) CONCAT(instance_methods, ", "); - + CONCAT(instance_methods, this.method(tokens, ivar_names)); } // If we reach a # symbol, we may be at a C preprocessor directive. @@ -585,21 +585,21 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin //else // throw new SyntaxError(this.error_message("*** Expected a method declaration, or \"@end\", found \"" + token + "\".")); } - + if (IS_NOT_EMPTY(instance_methods)) { CONCAT(buffer, "class_addMethods(the_class, ["); CONCAT(buffer, instance_methods); CONCAT(buffer, "]);\n"); } - + if (IS_NOT_EMPTY(class_methods)) { CONCAT(buffer, "class_addMethods(meta_class, ["); CONCAT(buffer, class_methods); CONCAT(buffer, "]);\n"); } - + CONCAT(buffer, '}'); this._currentClass = ""; @@ -613,16 +613,16 @@ Preprocessor.prototype._import = function(tokens) if (token === TOKEN_LESS_THAN) { - while((token = tokens.next()) && token !== TOKEN_GREATER_THAN) + while ((token = tokens.next()) && token !== TOKEN_GREATER_THAN) URLString += token; - - if(!token) + + if (!token) throw new SyntaxError(this.error_message("*** Unterminated import statement.")); } - + else if (token.charAt(0) === TOKEN_DOUBLE_QUOTE) URLString = token.substr(1, token.length - 2); - + else throw new SyntaxError(this.error_message("*** Expecting '<' or '\"', found \"" + token + "\".")); @@ -643,7 +643,7 @@ Preprocessor.prototype.method = function(/*Lexer*/ tokens, ivar_names) ivar_names = ivar_names || {}; - while((token = tokens.skip_whitespace()) && token !== TOKEN_OPEN_BRACE && token !== TOKEN_SEMICOLON) + while ((token = tokens.skip_whitespace()) && token !== TOKEN_OPEN_BRACE && token !== TOKEN_SEMICOLON) { if (token == TOKEN_COLON) { @@ -651,33 +651,33 @@ Preprocessor.prototype.method = function(/*Lexer*/ tokens, ivar_names) // Colons are part of the selector name selector += token; - + token = tokens.skip_whitespace(); - + if (token == TOKEN_OPEN_PARENTHESIS) { // Swallow parameter/return type. Perhaps later we can use this for debugging? - while((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_PARENTHESIS) + while ((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_PARENTHESIS) type += token; - + token = tokens.skip_whitespace(); } - + // Add the type. If it's empty, add null instead. - types[parameters.length+1] = type || null; + types[parameters.length + 1] = type || null; // Since this follows a colon, this must be the parameter name. parameters[parameters.length] = token; if (token in ivar_names) - throw new SyntaxError(this.error_message("*** Method ( "+selector+" ) uses a parameter name that is already in use ( "+token+" )")); + throw new SyntaxError(this.error_message("*** Method ( "+selector+" ) uses a parameter name that is already in use ( "+token+" )")); } else if (token == TOKEN_OPEN_PARENTHESIS) { var type = ""; // Since :( is handled above, this must be the return type, just swallow it. - while((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_PARENTHESIS) + while ((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_PARENTHESIS) type += token; // types[0] is the return argument @@ -709,7 +709,7 @@ Preprocessor.prototype.method = function(/*Lexer*/ tokens, ivar_names) var index = 0, count = parameters.length; - + CONCAT(buffer, "new objj_method(sel_getUid(\""); CONCAT(buffer, selector); CONCAT(buffer, "\"), function"); @@ -718,10 +718,10 @@ Preprocessor.prototype.method = function(/*Lexer*/ tokens, ivar_names) if (this._flags & Preprocessor.Flags.IncludeDebugSymbols) CONCAT(buffer, " $" + this._currentClass + "__" + selector.replace(/:/g, "_")); - + CONCAT(buffer, "(self, _cmd"); - - for(; index < count; ++index) + + for (; index < count; ++index) { CONCAT(buffer, ", "); CONCAT(buffer, parameters[index]); @@ -749,53 +749,53 @@ Preprocessor.prototype.preprocess = function(tokens, /*StringBuffer*/ aStringBuf if (tuple) { tuple[0] = buffer; - + var bracket = false, closures = [0, 0, 0]; } - + while ((token = tokens.next()) && ((token !== terminator) || count)) { if (tuple) { - // Ignore :'s the belong to tertiary operators (?:) + // Ignore :'s the belong to tertiary operators (?:) if (token === TOKEN_QUESTION_MARK) ++closures[2]; - - // Ingore anything between { } and () + + // Ingore anything between { } and () else if (token === TOKEN_OPEN_BRACE) ++closures[0]; - + else if (token === TOKEN_CLOSE_BRACE) --closures[0]; - + else if (token === TOKEN_OPEN_PARENTHESIS) ++closures[1]; - + else if (token === TOKEN_CLOSE_PARENTHESIS) --closures[1]; - + // If not in {} and not in () and this is a colon and we don't belong to a tertiary operator OR this is a closing bracket... - else if ((token === TOKEN_COLON && closures[2]-- === 0 || + else if ((token === TOKEN_COLON && closures[2]-- === 0 || (bracket = (token === TOKEN_CLOSE_BRACKET))) && closures[0] === 0 && closures[1] === 0) { tokens.push(); // 1 - - // If a bracket made us enter, go backwards skipping whitespace ([a b ] allowed), + + // If a bracket made us enter, go backwards skipping whitespace ([a b ] allowed), // if not grab token immediately behind us ([a b : c] not allowed var label = bracket ? tokens.skip_whitespace(true) : tokens.previous(), isEmptyLabel = TOKEN_WHITESPACE.test(label); - + // The label must be an identifier, and preceded by whitespace, or whitespace itself (the "empty label") if (isEmptyLabel || TOKEN_IDENTIFIER.test(label) && TOKEN_WHITESPACE.test(tokens.previous())) { tokens.push(); // 2 - + var last = tokens.skip_whitespace(true), operatorCheck = true, isDoubleOperator = false; - + // unary or binary, still disables. // + - + x is bad because it could be (+ - + x) or (a + - + x) // the only good is unbroken chain @@ -807,28 +807,28 @@ Preprocessor.prototype.preprocess = function(tokens, /*StringBuffer*/ aStringBuf last = tokens.skip_whitespace(true); isDoubleOperator = true; }} - + tokens.pop(); // 2 - + tokens.pop(); // 1 - + //alert(operatorCheck + "operatorCheck for " + label + " and " + last); if (operatorCheck && ( - + // <)>