diff --git a/AppKit/AppKit.j b/AppKit/AppKit.j index 6da7c3185..a31ee2e9d 100644 --- a/AppKit/AppKit.j +++ b/AppKit/AppKit.j @@ -21,6 +21,7 @@ */ @import "CALayer.j" +@import "CPAccordionView.j" @import "CPAlert.j" @import "CPAnimation.j" @import "CPApplication.j" @@ -37,6 +38,7 @@ @import "CPCibControlConnector.j" @import "CPCibLoading.j" @import "CPCibOutletConnector.j" +@import "CPCibRuntimeAttributesConnector.j" @import "CPClipView.j" @import "CPCollectionView.j" @import "CPCollectionViewItem.j" @@ -46,6 +48,7 @@ @import "CPColorWell.j" @import "CPCompatibility.j" @import "CPControl.j" +@import "CPController.j" @import "CPCookie.j" @import "CPCursor.j" @import "CPDocument.j" diff --git a/AppKit/CPAlert.j b/AppKit/CPAlert.j index 832c06443..fad82a6c2 100644 --- a/AppKit/CPAlert.j +++ b/AppKit/CPAlert.j @@ -117,21 +117,21 @@ CPCriticalAlertStyle = 2; */ + (CPAlert)alertWithMessageText:(CPString)aMessage defaultButton:(CPString)defaultButtonTitle alternateButton:(CPString)alternateButtonTitle otherButton:(CPString)otherButtonTitle informativeTextWithFormat:(CPString)informativeText { - var alert = [[self alloc] init]; + var newAlert = [[self alloc] init]; - [alert setMessageText:aMessage]; - [alert addButtonWithTitle:defaultButtonTitle]; + [newAlert setMessageText:aMessage]; + [newAlert addButtonWithTitle:defaultButtonTitle]; if (alternateButtonTitle) - [alert addButtonWithTitle:alternateButtonTitle]; + [newAlert addButtonWithTitle:alternateButtonTitle]; if (otherButtonTitle) - [alert addButtonWithTitle:otherButtonTitle]; + [newAlert addButtonWithTitle:otherButtonTitle]; if (informativeText) - [alert setInformativeText:informativeText]; + [newAlert setInformativeText:informativeText]; - return alert; + return newAlert; } /*! @@ -142,12 +142,12 @@ CPCriticalAlertStyle = 2; */ + (CPAlert)alertWithError:(CPString)anErrorMessage { - var alert = [[self alloc] init]; + var newAlert = [[self alloc] init]; - [alert setMessageText:anErrorMessage]; - [alert setAlertStyle:CPCriticalAlertStyle]; + [newAlert setMessageText:anErrorMessage]; + [newAlert setAlertStyle:CPCriticalAlertStyle]; - return alert; + return newAlert; } /*! diff --git a/AppKit/CPAnimation.j b/AppKit/CPAnimation.j index c8321ab7b..148db1f6f 100644 --- a/AppKit/CPAnimation.j +++ b/AppKit/CPAnimation.j @@ -122,6 +122,7 @@ ACTUAL_FRAME_RATE = 0; */ - (void)setAnimationCurve:(CPAnimationCurve)anAnimationCurve { + var timingFunctionName; switch (anAnimationCurve) { case CPAnimationEaseInOut: timingFunctionName = kCAMediaTimingFunctionEaseInEaseOut; diff --git a/AppKit/CPBrowser.j b/AppKit/CPBrowser.j index a231fc851..31c21f7c8 100644 --- a/AppKit/CPBrowser.j +++ b/AppKit/CPBrowser.j @@ -258,7 +258,7 @@ var column = [[CPTableColumn alloc] initWithIdentifier:@"Image"], view = [[CPImageView alloc] initWithFrame:CGRectMakeZero()]; - [view setImageScaling:CPScaleProportionally]; + [view setImageScaling:CPImageScaleProportionallyDown]; [column setDataView:view]; [column setResizingMask:CPTableColumnNoResizing]; @@ -988,7 +988,7 @@ var _CPBrowserResizeControlBackgroundImage = nil; isHighlighted = [self themeState] & CPThemeStateSelectedDataView; [imageView setImage: _isLeaf ? (isHighlighted ? _highlightedBranchImage : _branchImage) : nil]; - [imageView setImageScaling:CPScaleNone]; + [imageView setImageScaling:CPImageScaleNone]; } - (void)encodeWithCoder:(CPCoder)aCoder diff --git a/AppKit/CPButton.j b/AppKit/CPButton.j index 095d3d0a3..24a758d2f 100644 --- a/AppKit/CPButton.j +++ b/AppKit/CPButton.j @@ -141,9 +141,9 @@ CPButtonImageOffset = 3.0; } /*! - Initializes and returns a newly allocated CPButton object with a specified frame rectangle. - @param aFrame The frame rectangle for the created button object. - @return An initialized CPView object or nil if the object couldn't be created. + Initializes and returns a newly allocated CPButton object with a specified frame rectangle. + @param aFrame The frame rectangle for the created button object. + @return An initialized CPView object or nil if the object couldn't be created. */ - (id)initWithFrame:(CGRect)aFrame { @@ -155,7 +155,7 @@ CPButtonImageOffset = 3.0; [self setValue:CPCenterTextAlignment forThemeAttribute:@"alignment"]; [self setValue:CPCenterVerticalTextAlignment forThemeAttribute:@"vertical-alignment"]; [self setValue:CPImageLeft forThemeAttribute:@"image-position"]; - [self setValue:CPScaleNone forThemeAttribute:@"image-scaling"]; + [self setValue:CPImageScaleNone forThemeAttribute:@"image-scaling"]; [self setBezelStyle:CPRoundRectBezelStyle]; [self setBordered:YES]; @@ -180,7 +180,7 @@ CPButtonImageOffset = 3.0; // Setting the state /*! - Returns a Boolean value indicating whether the button allows a mixed state. + Returns a Boolean value indicating whether the button allows a mixed state. @return \c YES if the button has a 'mixed' state in addition to on and off. */ - (BOOL)allowsMixedState @@ -206,8 +206,8 @@ CPButtonImageOffset = 3.0; } /*! - Sets the value of the button using an Objective-J object. - @param anObjectValue The value of the button interpreted as an Objective-J object. + Sets the value of the button using an Objective-J object. + @param anObjectValue The value of the button interpreted as an Objective-J object. */ - (void)setObjectValue:(id)anObjectValue { @@ -244,11 +244,11 @@ CPButtonImageOffset = 3.0; } /*! - Returns the button's next state. - @return The button's state. A button can have two or three states. - If it has two, this value is either \c CPOffState (the normal or unpressed state) - or \c CPOnState (the alternate or pressed state). - If it has three, this value can be \c CPOnState (the feature is in effect everywhere), \c CPOffState (the feature is in effect nowhere), or \c CPMixedState (the feature is in effect somewhere). + Returns the button's next state. + @return The button's state. A button can have two or three states. + If it has two, this value is either \c CPOffState (the normal or unpressed state) + or \c CPOnState (the alternate or pressed state). + If it has three, this value can be \c CPOnState (the feature is in effect everywhere), \c CPOffState (the feature is in effect nowhere), or \c CPMixedState (the feature is in effect somewhere). */ - (CPInteger)nextState { @@ -294,9 +294,9 @@ CPButtonImageOffset = 3.0; } /*! - Sets the title displayed by the button when in its normal state. - @param aTitle The string to set as the button's title. This title is always shown on buttons - that don’t use their alternate contents when highlighting or displaying their alternate state. + Sets the title displayed by the button when in its normal state. + @param aTitle The string to set as the button's title. This title is always shown on buttons + that don’t use their alternate contents when highlighting or displaying their alternate state. */ - (void)setTitle:(CPString)aTitle { @@ -310,9 +310,9 @@ CPButtonImageOffset = 3.0; } /*! - Returns the title displayed on the button when it’s in its normal state. - @return The title displayed on the receiver when it’s in its normal state - or the empty string if the button doesn’t display a title. + Returns the title displayed on the button when it’s in its normal state. + @return The title displayed on the receiver when it’s in its normal state + or the empty string if the button doesn’t display a title. */ - (CPString)title { diff --git a/AppKit/CPCheckBox.j b/AppKit/CPCheckBox.j index d58c49402..c13c3b5cc 100644 --- a/AppKit/CPCheckBox.j +++ b/AppKit/CPCheckBox.j @@ -110,40 +110,15 @@ CPCheckBoxImageOffset = 4.0; [self _setPlaceholder:CPOffState forMarker:CPNullMarker isDefault:YES]; } -- (void)setValueFor:(CPString)theBinding +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding { - var destination = [_info objectForKey:CPObservedObjectKey], - keyPath = [_info objectForKey:CPObservedKeyPathKey], - options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath], - isPlaceholder = CPIsControllerMarker(newValue); + [_source setAllowsMixedState:(aValue === CPMixedState)]; + [_source setState:aValue]; +} - if (isPlaceholder) - { - if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) - { - [CPException raise:CPGenericException - reason:@"can't transform non applicable key on: " + _source + " value: " + newValue]; - } - - newValue = [self _placeholderForMarker:newValue]; - - if (newValue === CPMixedState) - { - [_source setAllowsMixedState:YES]; - } - else - { - // Cocoa will always set allowsMixedState to NO - // This behavior will be fine for Cappuccino as well if we (like Cocoa) - // default the CPConditionallySetsEnabledBindingOption to YES - [_source setAllowsMixedState:NO]; - } - } - else - newValue = [self transformValue:newValue withOptions:options]; - - [_source setState:newValue]; +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setState:aValue]; } @end diff --git a/AppKit/CPControl.j b/AppKit/CPControl.j index 1d2a567f3..563b0352f 100644 --- a/AppKit/CPControl.j +++ b/AppKit/CPControl.j @@ -28,42 +28,48 @@ @import "CPView.j" @import "CPKeyValueBinding.j" -CPLeftTextAlignment = 0; -CPRightTextAlignment = 1; -CPCenterTextAlignment = 2; -CPJustifiedTextAlignment = 3; -CPNaturalTextAlignment = 4; +CPLeftTextAlignment = 0; +CPRightTextAlignment = 1; +CPCenterTextAlignment = 2; +CPJustifiedTextAlignment = 3; +CPNaturalTextAlignment = 4; -CPRegularControlSize = 0; -CPSmallControlSize = 1; -CPMiniControlSize = 2; +CPRegularControlSize = 0; +CPSmallControlSize = 1; +CPMiniControlSize = 2; -CPLineBreakByWordWrapping = 0; -CPLineBreakByCharWrapping = 1; -CPLineBreakByClipping = 2; -CPLineBreakByTruncatingHead = 3; -CPLineBreakByTruncatingTail = 4; -CPLineBreakByTruncatingMiddle = 5; +CPLineBreakByWordWrapping = 0; +CPLineBreakByCharWrapping = 1; +CPLineBreakByClipping = 2; +CPLineBreakByTruncatingHead = 3; +CPLineBreakByTruncatingTail = 4; +CPLineBreakByTruncatingMiddle = 5; -CPTopVerticalTextAlignment = 1; -CPCenterVerticalTextAlignment = 2; -CPBottomVerticalTextAlignment = 3; +CPTopVerticalTextAlignment = 1; +CPCenterVerticalTextAlignment = 2; +CPBottomVerticalTextAlignment = 3; -CPScaleProportionally = 0; -CPScaleToFit = 1; -CPScaleNone = 2; +// Deprecated for use with images, use the CPImageScale constants +CPScaleProportionally = 0; +CPScaleToFit = 1; +CPScaleNone = 2; -CPNoImage = 0; -CPImageOnly = 1; -CPImageLeft = 2; -CPImageRight = 3; -CPImageBelow = 4; -CPImageAbove = 5; -CPImageOverlaps = 6; +CPImageScaleProportionallyDown = 0; +CPImageScaleAxesIndependently = 1; +CPImageScaleNone = 2; +CPImageScaleProportionallyUpOrDown = 3; -CPOnState = 1; -CPOffState = 0; -CPMixedState = -1; +CPNoImage = 0; +CPImageOnly = 1; +CPImageLeft = 2; +CPImageRight = 3; +CPImageBelow = 4; +CPImageAbove = 5; +CPImageOverlaps = 6; + +CPOnState = 1; +CPOffState = 0; +CPMixedState = -1; CPControlNormalBackgroundColor = "CPControlNormalBackgroundColor"; CPControlSelectedBackgroundColor = "CPControlSelectedBackgroundColor"; @@ -784,9 +790,10 @@ var CPControlBlackColor = [CPColor blackColor]; Sets the image scaling of the control.
-    CPScaleProportionally
-    CPScaleToFit
-    CPScaleNone
+    CPImageScaleProportionallyDown
+    CPImageScaleAxesIndependently
+    CPImageScaleNone
+    CPImageScaleProportionallyUpOrDown
     
*/ - (void)setImageScaling:(CPImageScaling)scaling diff --git a/AppKit/CPEvent.j b/AppKit/CPEvent.j index 80d931f76..4f309e350 100644 --- a/AppKit/CPEvent.j +++ b/AppKit/CPEvent.j @@ -179,7 +179,8 @@ CPDOMEventTouchCancel = "touchcancel"; var _CPEventPeriodicEventPeriod = 0, _CPEventPeriodicEventTimer = nil, - _CPEventUpperCaseRegex = new RegExp("[A-Z]"); + _CPEventUpperCaseRegex = new RegExp("[A-Z]"), + _CPEventStartupMilliseconds = new Date().getTime(); /*! @ingroup appkit @@ -209,6 +210,14 @@ var _CPEventPeriodicEventPeriod = 0, float _deltaZ; } +/*! + Returns the current time in fractional seconds since startup. +*/ ++ (CPTimeInterval)currentTimestamp +{ + return (new Date().getTime() - _CPEventStartupMilliseconds) / 1000; +} + /*! Creates a new keyboard event. @@ -389,7 +398,7 @@ var _CPEventPeriodicEventPeriod = 0, } /*! - Returns the time the event occurred. + Returns the time the event occurred in seconds since startup. */ - (CPTimeInterval)timestamp { diff --git a/AppKit/CPImageView.j b/AppKit/CPImageView.j index 85f9978b4..535a7f86c 100644 --- a/AppKit/CPImageView.j +++ b/AppKit/CPImageView.j @@ -26,11 +26,6 @@ @import "CPImage.j" @import "CPShadowView.j" - -CPScaleProportionally = 0; -CPScaleToFit = 1; -CPScaleNone = 2; - CPImageAlignCenter = 0; CPImageAlignTop = 1; CPImageAlignTopLeft = 2; @@ -69,6 +64,14 @@ var CPImageViewEmptyPlaceholderImage = nil; CPImageViewEmptyPlaceholderImage = [[CPImage alloc] initWithContentsOfFile:[bundle pathForResource:@"empty.png"]]; } ++ (Class)_binderClassForBinding:(CPString)theBinding +{ + if (theBinding === CPValueBinding || theBinding === CPValueURLBinding || theBinding === CPValuePathBinding) + return [CPImageViewValueBinder class]; + + return [super _binderClassForBinding:theBinding]; +} + - (id)initWithFrame:(CGRect)aFrame { self = [super initWithFrame:aFrame]; @@ -232,7 +235,7 @@ var CPImageViewEmptyPlaceholderImage = nil; [super setImageScaling:anImageScaling]; #if PLATFORM(DOM) - if ([self currentValueForThemeAttribute:@"image-scaling"] === CPScaleToFit) + if ([self currentValueForThemeAttribute:@"image-scaling"] === CPImageScaleAxesIndependently) { CPDOMDisplayServerSetStyleLeftTop(_DOMImageElement, NULL, 0.0, 0.0); } @@ -296,12 +299,12 @@ var CPImageViewEmptyPlaceholderImage = nil; width = boundsWidth - insetWidth, height = boundsHeight - insetHeight; - if (imageScaling === CPScaleToFit) + if (imageScaling === CPImageScaleAxesIndependently) { -#if PLATFORM(DOM) - _DOMImageElement.width = ROUND(width); - _DOMImageElement.height = ROUND(height); -#endif + #if PLATFORM(DOM) + _DOMImageElement.width = ROUND(width); + _DOMImageElement.height = ROUND(height); + #endif } else { @@ -310,17 +313,19 @@ var CPImageViewEmptyPlaceholderImage = nil; if (size.width == -1 && size.height == -1) return; - if (imageScaling === CPScaleProportionally) + switch (imageScaling) { - // The max size it can be is size.width x size.height, so only - // only proportion otherwise. - if (width >= size.width && height >= size.height) - { - width = size.width; - height = size.height; - } - else - { + case CPImageScaleProportionallyDown: + if (width >= size.width && height >= size.height) + { + width = size.width; + height = size.height; + break; + } + + // intentionally fall through to the next case + + case CPImageScaleProportionallyUpOrDown: var imageRatio = size.width / size.height, viewRatio = width / height; @@ -328,26 +333,19 @@ var CPImageViewEmptyPlaceholderImage = nil; width = height * imageRatio; else height = width / imageRatio; - } + break; -#if PLATFORM(DOM) + case CPImageScaleAxesIndependently: + case CPImageScaleNone: + width = size.width; + height = size.height; + break; + } + + #if PLATFORM(DOM) _DOMImageElement.width = ROUND(width); _DOMImageElement.height = ROUND(height); -#endif - } - else - { - width = size.width; - height = size.height; - } - - if (imageScaling == CPScaleNone) - { -#if PLATFORM(DOM) - _DOMImageElement.width = ROUND(size.width); - _DOMImageElement.height = ROUND(size.height); -#endif - } + #endif var x, y; @@ -449,6 +447,33 @@ var CPImageViewEmptyPlaceholderImage = nil; @end +@implementation CPImageViewValueBinder : CPBinder +{ +} + +- (void)_updatePlaceholdersWithOptions:(CPDictionary)options +{ + [self _setPlaceholder:nil forMarker:CPMultipleValuesMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNoSelectionMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNotApplicableMarker isDefault:YES]; + [self _setPlaceholder:nil forMarker:CPNullMarker isDefault:YES]; +} + +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setImage:nil]; +} + +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + if (aBinding === CPValueURLBinding || aBinding === CPValuePathBinding) + aValue = [[CPImage alloc] initWithContentsOfFile:aValue]; + + [_source setImage:aValue]; +} + +@end + var CPImageViewImageKey = @"CPImageViewImageKey", CPImageViewImageScalingKey = @"CPImageViewImageScalingKey", CPImageViewImageAlignmentKey = @"CPImageViewImageAlignmentKey", @@ -475,6 +500,9 @@ var CPImageViewImageKey = @"CPImageViewImageKey", _DOMImageElement.setAttribute("draggable", "true"); _DOMImageElement.style["-khtml-user-drag"] = "element"; } + + if (typeof(appkit_tag_dom_elements) !== "undefined" && !!appkit_tag_dom_elements) + _DOMImageElement.setAttribute("data-cappuccino-view", [self className]); #endif self = [super initWithCoder:aCoder]; diff --git a/AppKit/CPKeyValueBinding.j b/AppKit/CPKeyValueBinding.j index 89b4214e2..608f7ae4a 100644 --- a/AppKit/CPKeyValueBinding.j +++ b/AppKit/CPKeyValueBinding.j @@ -149,15 +149,40 @@ var CPBindingOperationAnd = 0, return self; } -- (void)setValueFor:(CPString)aBinding +- (void)setValueFor:(CPString)theBinding { var destination = [_info objectForKey:CPObservedObjectKey], keyPath = [_info objectForKey:CPObservedKeyPathKey], options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath]; + newValue = [destination valueForKeyPath:keyPath], + isPlaceholder = CPIsControllerMarker(newValue); - newValue = [self transformValue:newValue withOptions:options]; - [_source setValue:newValue forKey:aBinding]; + if (isPlaceholder) + { + if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) + { + [CPException raise:CPGenericException + reason:@"Cannot transform non-applicable key on: " + _source + " key path: " + keyPath + " value: " + newValue]; + } + + var value = [self _placeholderForMarker:newValue]; + [self setPlaceholderValue:value withMarker:newValue forBinding:theBinding]; + } + else + { + var value = [self transformValue:newValue withOptions:options]; + [self setValue:value forBinding:theBinding]; + } +} + +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding +{ + [_source setValue:aValue forKey:aBinding]; +} + +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setValue:aValue forKey:aBinding]; } - (void)reverseSetValueFor:(CPString)aBinding @@ -168,7 +193,10 @@ var CPBindingOperationAnd = 0, newValue = [_source valueForKeyPath:aBinding]; newValue = [self reverseTransformValue:newValue withOptions:options]; + + [self suppressSpecificNotificationFromObject:destination keyPath:keyPath]; [destination setValue:newValue forKeyPath:keyPath]; + [self unsuppressSpecificNotificationFromObject:destination keyPath:keyPath]; } - (void)observeValueForKeyPath:(CPString)aKeyPath ofObject:(id)anObject change:(CPDictionary)changes context:(id)context @@ -443,7 +471,7 @@ var CPBindingOperationAnd = 0, @end -var resolveMultipleValues = function resolveMultipleValues(/*CPString*/key, /*CPDictionary*/bindings, /*GSBindingOperationKind*/operation) +var resolveMultipleValues = function(/*CPString*/key, /*CPDictionary*/bindings, /*GSBindingOperationKind*/operation) { var bindingName = key, theBinding, @@ -467,7 +495,7 @@ var resolveMultipleValues = function resolveMultipleValues(/*CPString*/key, /*CP return !operation; }; -var invokeAction = function invokeAction(/*CPString*/targetKey, /*CPString*/argumentKey, /*CPDictionary*/bindings) +var invokeAction = function(/*CPString*/targetKey, /*CPString*/argumentKey, /*CPDictionary*/bindings) { var theBinding = [bindings objectForKey:targetKey], infoDictionary = theBinding._info, @@ -527,6 +555,9 @@ CPSelectedIndexBinding = @"selectedIndex"; CPTextColorBinding = @"textColor"; CPToolTipBinding = @"toolTip"; CPValueBinding = @"value"; +CPValueURLBinding = @"valueURL"; +CPValuePathBinding = @"valuePath"; +CPDataBinding = @"data"; //Binding options constants CPAllowsEditingMultipleValuesSelectionBindingOption = @"CPAllowsEditingMultipleValuesSelection"; diff --git a/AppKit/CPMenu/_CPMenuManager.j b/AppKit/CPMenu/_CPMenuManager.j index 2d3f67cb7..9b680674a 100644 --- a/AppKit/CPMenu/_CPMenuManager.j +++ b/AppKit/CPMenu/_CPMenuManager.j @@ -5,7 +5,7 @@ _CPMenuManagerScrollingStateUp = -1; _CPMenuManagerScrollingStateDown = 1; _CPMenuManagerScrollingStateNone = 0; -var STICKY_TIME_INTERVAL = 500, +var STICKY_TIME_INTERVAL = 0.5, SharedMenuManager = nil; @implementation _CPMenuManager: CPObject @@ -127,7 +127,7 @@ var STICKY_TIME_INTERVAL = 500, if (_keyBuffer) { - if (([CPDate date] - _startTime) > (STICKY_TIME_INTERVAL + [activeMenu numberOfItems] / 2)) + if (([anEvent timestamp] - _startTime) > (STICKY_TIME_INTERVAL + [activeMenu numberOfItems] / 2)) [self selectNextItemBeginningWith:_keyBuffer inMenu:menu clearBuffer:YES]; if (type === CPPeriodic) @@ -245,7 +245,7 @@ var STICKY_TIME_INTERVAL = 500, 3. The user clicks, drags and then releases. Tracking ends. */ - if (_mouseWasDragged || [anEvent timestamp] - _startTime > STICKY_TIME_INTERVAL) + if (_mouseWasDragged || ([anEvent timestamp] - _startTime > STICKY_TIME_INTERVAL)) { /* Close the menu if: diff --git a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j index 06ee3eb29..179c084e9 100644 --- a/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j +++ b/AppKit/CPMenuItem/_CPMenuItemMenuBarView.j @@ -148,10 +148,8 @@ var SelectionColor = nil, [_submenuIndicatorView setFrame:submenuViewFrame]; } - _minSize = CGSizeMake(x + HORIZONTAL_MARGIN, height); - [self setAutoresizesSubviews:NO]; - [self setFrameSize:_minSize]; + [self setFrameSize:CGSizeMake(x + HORIZONTAL_MARGIN, height)]; [self setAutoresizesSubviews:YES]; } diff --git a/AppKit/CPMenuItem/_CPMenuItemStandardView.j b/AppKit/CPMenuItem/_CPMenuItemStandardView.j index c6fc8182f..19f071c47 100644 --- a/AppKit/CPMenuItem/_CPMenuItemStandardView.j +++ b/AppKit/CPMenuItem/_CPMenuItemStandardView.j @@ -6,14 +6,14 @@ var LEFT_MARGIN = 3.0, STATE_COLUMN_WIDTH = 14.0, INDENTATION_WIDTH = 17.0, VERTICAL_MARGIN = 4.0, - + RIGHT_COLUMNS_MARGIN = 30.0, KEY_EQUIVALENT_MARGIN = 10.0; var SUBMENU_INDICATOR_COLOR = nil, _CPMenuItemSelectionColor = nil, _CPMenuItemTextShadowColor = nil, - + _CPMenuItemDefaultStateImages = [], _CPMenuItemDefaultStateHighlightedImages = []; @@ -43,9 +43,9 @@ var SUBMENU_INDICATOR_COLOR = nil, _CPMenuItemSelectionColor = [CPColor colorWithCalibratedRed:95.0 / 255.0 green:131.0 / 255.0 blue:185.0 / 255.0 alpha:1.0]; _CPMenuItemTextShadowColor = [CPColor colorWithCalibratedRed:26.0 / 255.0 green: 73.0 / 255.0 blue:109.0 / 255.0 alpha:1.0]; - + var bundle = [CPBundle bundleForClass:self]; - + _CPMenuItemDefaultStateImages[CPOffState] = nil; _CPMenuItemDefaultStateHighlightedImages[CPOffState] = nil; @@ -74,7 +74,7 @@ var SUBMENU_INDICATOR_COLOR = nil, { _stateView = [[CPImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 0.0, 0.0)]; - [_stateView setImageScaling:CPScaleNone]; + [_stateView setImageScaling:CPImageScaleNone]; [self addSubview:_stateView]; @@ -175,7 +175,7 @@ var SUBMENU_INDICATOR_COLOR = nil, [_keyEquivalentView setTextShadowOffset:CGSizeMake(0, 1)]; [_keyEquivalentView setFrameOrigin:CGPointMake(x, VERTICAL_MARGIN)]; [_keyEquivalentView sizeToFit]; - + var keyEquivalentViewFrame = [_keyEquivalentView frame]; keyEquivalentViewFrame.origin.x = x; @@ -215,7 +215,7 @@ var SUBMENU_INDICATOR_COLOR = nil, keyEquivalentViewFrame.origin.y = FLOOR((height - CGRectGetHeight(keyEquivalentViewFrame)) / 2.0); [_keyEquivalentView setFrame:keyEquivalentViewFrame]; } - + if (hasSubmenu) { submenuViewFrame.origin.y = FLOOR((height - CGRectGetHeight(submenuViewFrame)) / 2.0); @@ -223,7 +223,7 @@ var SUBMENU_INDICATOR_COLOR = nil, } _minSize = CGSizeMake(x + RIGHT_MARGIN, height); - + [self setAutoresizesSubviews:NO]; [self setFrameSize:_minSize]; [self setAutoresizesSubviews:YES]; @@ -233,7 +233,7 @@ var SUBMENU_INDICATOR_COLOR = nil, { // FIXME: This should probably be even throw. if (![_menuItem isEnabled]) - return; + return; if (shouldHighlight) { @@ -259,7 +259,7 @@ var SUBMENU_INDICATOR_COLOR = nil, [_imageAndTextView setTextShadowColor:[self textShadowColor]]; [_keyEquivalentView setTextShadowColor:[self textShadowColor]]; } - + if ([[_menuItem menu] showsStateColumn]) { if (shouldHighlight) @@ -290,15 +290,15 @@ var SUBMENU_INDICATOR_COLOR = nil, { var context = [[CPGraphicsContext currentContext] graphicsPort], bounds = [self bounds]; - + CGContextBeginPath(context); - + CGContextMoveToPoint(context, CGRectGetMinX(bounds), CGRectGetMinY(bounds)); CGContextAddLineToPoint(context, CGRectGetMaxX(bounds), CGRectGetMidY(bounds)); CGContextAddLineToPoint(context, CGRectGetMinX(bounds), CGRectGetMaxY(bounds)); - + CGContextClosePath(context); - + CGContextSetFillColor(context, _color); CGContextFillPath(context); } diff --git a/AppKit/CPOutlineView.j b/AppKit/CPOutlineView.j index 20fd434fd..1a9dbcb4a 100644 --- a/AppKit/CPOutlineView.j +++ b/AppKit/CPOutlineView.j @@ -151,7 +151,6 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, _retargedChildIndex = nil; _shouldRetargetChildIndex = NO; - _startHoverTime = nil; [self setIndentationPerLevel:16.0]; [self setIndentationMarkerFollowsDataView:YES]; @@ -1365,7 +1364,7 @@ var CPOutlineViewCoalesceSelectionNotificationStateOff = 0, [self collapseItem:item]; else - [self expandItem:item]; + [self expandItem:item expandChildren:([[CPApp currentEvent] modifierFlags] & CPAlternateKeyMask)]; } /*! diff --git a/AppKit/CPRuleEditor/CPPredicateEditor.j b/AppKit/CPRuleEditor/CPPredicateEditor.j index 61b5ee498..5c4aadb64 100644 --- a/AppKit/CPRuleEditor/CPPredicateEditor.j +++ b/AppKit/CPRuleEditor/CPPredicateEditor.j @@ -345,7 +345,8 @@ { var rootRowsArray = [super _rootRowsArray], subpredicates = [CPMutableArray array], - count = count2 = [rootRowsArray count], + count, + count2 = count = [rootRowsArray count], predicate; while (count--) diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index 824413a4c..aa9764ef4 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -140,7 +140,7 @@ var itemsContext = "items", - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; - if (self != nil) + if (self !== nil) { _slices = [[CPMutableArray alloc] init]; @@ -187,7 +187,7 @@ var itemsContext = "items", [_slicesHolder addSubview:_dropLineView]; [self registerForDraggedTypes:[CPArray arrayWithObjects:CPRuleEditorItemPBoardType,nil]]; - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; } /*! @endcond */ @@ -244,7 +244,7 @@ var itemsContext = "items", */ - (void)setEditable:(BOOL)editable { - if (editable == _editable) + if (editable === _editable) return; _editable = editable; @@ -274,7 +274,7 @@ var itemsContext = "items", */ - (void)setNestingMode:(CPRuleEditorNestingMode)mode { - if (mode != _nestingMode) + if (mode !== _nestingMode) { _nestingMode = mode; if ([self numberOfRows] > 0) @@ -341,7 +341,7 @@ var itemsContext = "items", */ - (void)setRowHeight:(float)height { - if (height == _sliceHeight) + if (height === _sliceHeight) return; _sliceHeight = MAX([self _minimumFrameHeight], height); @@ -396,10 +396,10 @@ var itemsContext = "items", - (void)setFormattingStringsFilename:(CPString)stringsFilename { // Can we set _stringsFilename to nil in cocoa ? - if (_standardLocalizer == nil) + if (_standardLocalizer === nil) _standardLocalizer = [_CPRuleEditorLocalizer new]; - if (_stringsFilename != stringsFilename) + if (_stringsFilename !== stringsFilename) { _stringsFilename = stringsFilename; @@ -408,7 +408,7 @@ var itemsContext = "items", if (![stringsFilename hasSuffix:@".strings"]) stringsFilename = stringsFilename + @".strings"; var path = [[CPBundle mainBundle] pathForResource:stringsFilename]; - if (path !=nil) + if (path !== nil) [_standardLocalizer loadContentOfURL:[CPURL URLWithString:path]]; } } @@ -440,7 +440,7 @@ var itemsContext = "items", - (void)setCriteria:(CPArray)criteria andDisplayValues:(CPArray)values forRowAtIndex:(int)rowIndex { // TODO: reload from the delegate if criteria is an empty array. - if (criteria == nil || values == nil) + if (criteria === nil || values === nil) [CPException raise:CPInvalidArgumentException reason:_cmd + @". criteria and values parameters must not be nil."]; if (rowIndex < 0 || rowIndex >= [self numberOfRows]) @@ -510,12 +510,12 @@ var itemsContext = "items", for (var current_index = 0; current_index < rowIndex; current_index++) { - if ([self rowTypeForRow:current_index] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:current_index] === CPRuleEditorRowTypeCompound) { var candidate = [[self _rowCacheForIndex:current_index] rowObject], subObjects = [[self _subrowObjectsOfObject:candidate] _representedObject]; - if ([subObjects indexOfObjectIdenticalTo:targetObject] != CPNotFound) + if ([subObjects indexOfObjectIdenticalTo:targetObject] !== CPNotFound) return current_index; } } @@ -566,7 +566,8 @@ TODO: implement - (CPIndexSet)subrowIndexesForRow:(int)rowIndex { var object; - if (rowIndex == -1) + + if (rowIndex === -1) object = _boundArrayOwner; else object = [[self _rowCacheForIndex:rowIndex] rowObject]; @@ -581,16 +582,16 @@ TODO: implement var candidate = [[self _rowCacheForIndex:i] rowObject], indexInSubrows = [[subobjects _representedObject] indexOfObjectIdenticalTo:candidate]; - if (indexInSubrows != CPNotFound) + if (indexInSubrows !== CPNotFound) { [indexes addIndex:i]; objectsCount --; // [buffer removeObjectAtIndex:indexInSubrows]; - if ([self rowTypeForRow:i] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:i] === CPRuleEditorRowTypeCompound) i += [[self subrowIndexesForRow:i] count]; } - if (objectsCount == 0) + if (objectsCount === 0) break; } @@ -626,12 +627,12 @@ TODO: implement { var slice = _slices[count], rowIndex = [slice rowIndex], - contains = [indexes containsIndex:rowIndex]; + contains = [indexes containsIndex:rowIndex], shouldSelect = (contains && !(extend && [slice _isSelected])); if (contains) [slice _setSelected:shouldSelect]; - [slice _setLastSelected:(rowIndex == lastSelected)]; + [slice _setLastSelected:(rowIndex === lastSelected)]; [slice setNeedsDisplay:YES]; } } @@ -673,7 +674,7 @@ TODO: implement break; default: [CPException raise:CPInvalidArgumentException reason:@"Not supported CPRuleEditorNestingMode " + nestingMode]; - // Compound mode: parentRowIndex=(lastRowType == CPRuleEditorRowTypeCompound)?lastRow :[self parentRowForRow:lastRow]; break; + // Compound mode: parentRowIndex=(lastRowType === CPRuleEditorRowTypeCompound)?lastRow :[self parentRowForRow:lastRow]; break; } [self insertRowAtIndex:numberOfRows withType:rowtype asSubrowOfRow:parentRowIndex animate:YES]; @@ -695,7 +696,7 @@ TODO: implement */ var newObject = [self _insertNewRowAtIndex:rowIndex ofType:rowType withParentRow:parentRow]; - if (rowType == CPRuleEditorRowTypeCompound && !_allowsEmptyCompoundRows) + if (rowType === CPRuleEditorRowTypeCompound && !_allowsEmptyCompoundRows) { var subrow = [self _insertNewRowAtIndex:(rowIndex + 1) ofType:CPRuleEditorRowTypeSimple withParentRow:rowIndex]; } @@ -726,7 +727,7 @@ TODO: implement */ - (void)removeRowsAtIndexes:(CPIndexSet)rowIndexes includeSubrows:(BOOL)includeSubrows { - if ([rowIndexes count] == 0) + if ([rowIndexes count] === 0) return; if ([rowIndexes lastIndex] >= [self numberOfRows]) @@ -737,7 +738,7 @@ TODO: implement childsIndexes = [CPMutableIndexSet indexSet], subrows; - if (parentRowIndex == -1) + if (parentRowIndex === -1) subrows = [self _rootRowsArray]; else { @@ -745,15 +746,15 @@ TODO: implement subrows = [self _subrowObjectsOfObject:parentRowObject]; } - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var rowObject = [[self _rowCacheForIndex:current_index] rowObject], relativeChildIndex = [[subrows _representedObject] indexOfObjectIdenticalTo:rowObject]; - if (relativeChildIndex != CPNotFound) + if (relativeChildIndex !== CPNotFound) [childsIndexes addIndex:relativeChildIndex]; - if (includeSubrows && [self rowTypeForRow:current_index] == CPRuleEditorRowTypeCompound) + if (includeSubrows && [self rowTypeForRow:current_index] === CPRuleEditorRowTypeCompound) { var more_childs = [self subrowIndexesForRow:current_index]; [self removeRowsAtIndexes:more_childs includeSubrows:includeSubrows]; @@ -813,20 +814,20 @@ TODO: implement [predicateParts addEntriesFromDictionary:predpart]; } - if ([self rowTypeForRow:aRow] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:aRow] === CPRuleEditorRowTypeCompound) { var compoundPredicate, subpredicates = [CPMutableArray array], subrowsIndexes = [self subrowIndexesForRow:aRow]; - if ([subrowsIndexes count] == 0) + if ([subrowsIndexes count] === 0) return nil; var current_index = [subrowsIndexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var subpredicate = [self predicateForRow:current_index]; - if (subpredicate != nil) + if (subpredicate !== nil) [subpredicates addObject:subpredicate]; current_index = [subrowsIndexes indexGreaterThanIndex:current_index]; @@ -834,7 +835,7 @@ TODO: implement var compoundType = [predicateParts objectForKey:CPRuleEditorPredicateCompoundType]; - if ([subpredicates count] == 0) + if ([subpredicates count] === 0) return nil; else { @@ -862,16 +863,33 @@ TODO: implement modifier = [predicateParts objectForKey:CPRuleEditorPredicateComparisonModifier], selector = CPSelectorFromString([predicateParts objectForKey:CPRuleEditorPredicateCustomSelector]); - if (lhs == nil){ CPLogConsole(@"missing left expression in predicate parts dictionary"); return NULL;} - if (rhs == nil){ CPLogConsole(@"missing right expression in predicate parts dictionary"); return NULL;} - if (selector == nil && operator == nil){ CPLogConsole(@"missing operator and selector in predicate parts dictionary"); return NULL;} + if (lhs === nil) + { + CPLogConsole(@"missing left expression in predicate parts dictionary"); + return NULL; + } - if (modifier == nil) CPLogConsole(@"missing modifier in predicate parts dictionary. Setting default: CPDirectPredicateModifier"); - if (options == nil) CPLogConsole(@"missing options in predicate parts dictionary. Setting default: CPCaseInsensitivePredicateOption"); + if (rhs === nil) + { + CPLogConsole(@"missing right expression in predicate parts dictionary"); + return NULL; + } + + if (selector === nil && operator === nil) + { + CPLogConsole(@"missing operator and selector in predicate parts dictionary"); + return NULL; + } + + if (modifier === nil) + CPLogConsole(@"missing modifier in predicate parts dictionary. Setting default: CPDirectPredicateModifier"); + + if (options === nil) + CPLogConsole(@"missing options in predicate parts dictionary. Setting default: CPCaseInsensitivePredicateOption"); try { - if (selector != nil) + if (selector !== nil) predicate = [CPComparisonPredicate predicateWithLeftExpression:lhs rightExpression:rhs @@ -918,7 +936,7 @@ TODO: implement */ - (void)setRowClass:(Class)rowClass { - if (rowClass == [CPMutableDictionary class]) + if (rowClass === [CPMutableDictionary class]) rowClass = [RowObject class]; _rowClass = rowClass; @@ -1095,7 +1113,7 @@ TODO: implement - (void)keyDown:(CPEvent)event { - if (!_suppressKeyDownHandling && [self _applicableNestingMode] == CPRuleEditorNestingModeCompound && !_isKeyDown && ([event modifierFlags] & CPAlternateKeyMask)) + if (!_suppressKeyDownHandling && [self _applicableNestingMode] === CPRuleEditorNestingModeCompound && !_isKeyDown && ([event modifierFlags] & CPAlternateKeyMask)) { [_slices makeObjectsPerformSelector:@selector(_configurePlusButtonByRowType:) withObject:CPRuleEditorRowTypeCompound]; } @@ -1130,7 +1148,7 @@ TODO: implement - (BOOL)_wantsRowAnimations { - return (_currentAnimation != nil); + return (_currentAnimation !== nil); } - (void)_updateButtonVisibilities @@ -1153,10 +1171,10 @@ TODO: implement if (!_nestingModeDidChange) return _nestingMode; - var a = (_nestingMode == CPRuleEditorNestingModeCompound || _nestingMode == CPRuleEditorNestingModeSimple); - var b = ([self rowTypeForRow:0] == CPRuleEditorRowTypeCompound); + var a = (_nestingMode === CPRuleEditorNestingModeCompound || _nestingMode === CPRuleEditorNestingModeSimple), + b = ([self rowTypeForRow:0] === CPRuleEditorRowTypeCompound); - if (a == b) + if (a === b) return _nestingMode; return a ? CPRuleEditorNestingModeList : CPRuleEditorNestingModeSimple; @@ -1164,7 +1182,7 @@ TODO: implement - (BOOL)_shouldHideAddButtonForSlice:(id)slice { - return (!_editable || [self _applicableNestingMode] == CPRuleEditorNestingModeSingle); + return (!_editable || [self _applicableNestingMode] === CPRuleEditorNestingModeSingle); } - (BOOL)_shouldHideSubtractButtonForSlice:(id)slice @@ -1184,9 +1202,9 @@ TODO: implement switch (nestingMode) { case CPRuleEditorNestingModeCompound: - case CPRuleEditorNestingModeSimple: shouldHide = ([subrowsIndexes count] == 1 && !_allowsEmptyCompoundRows) || parentIndex == -1; + case CPRuleEditorNestingModeSimple: shouldHide = ([subrowsIndexes count] === 1 && !_allowsEmptyCompoundRows) || parentIndex === -1; break; - case CPRuleEditorNestingModeList: shouldHide = ([self numberOfRows] == 1); + case CPRuleEditorNestingModeList: shouldHide = ([self numberOfRows] === 1); break; case CPRuleEditorNestingModeSingle: shouldHide = YES; break; @@ -1220,7 +1238,7 @@ TODO: implement - (int)_rowIndexForRowObject:(id)rowobject { - if (rowobject == _boundArrayOwner) + if (rowobject === _boundArrayOwner) return -1; return [[self _searchCacheForRowObject:rowobject] rowIndex]; // Pas bon car le rowIndex du row cache n'est pas synchro avec la position dans _rowCache. @@ -1239,14 +1257,14 @@ TODO: implement var childlessParents = [CPIndexSet indexSet], current_index = [indexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { - var parentIndex = [self parentRowForRow:current_index]; + var parentIndex = [self parentRowForRow:current_index], + subrowsIndexes = [self subrowIndexesForRow:parentIndex]; - var subrowsIndexes = [self subrowIndexesForRow:parentIndex]; - if ([subrowsIndexes count]==1) + if ([subrowsIndexes count] === 1) { - if (parentIndex != -1) + if (parentIndex !== -1) return [CPIndexSet indexSetWithIndex:0]; var childlessGranPa = [self _childlessParentsIfSlicesWereDeletedAtIndexes:[CPIndexSet indexSetWithIndex:parentIndex]]; @@ -1265,7 +1283,7 @@ TODO: implement var subindexes = [indexes copy], current_index = [indexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var sub = [self subrowIndexesForRow:current_index]; [subindexes addIndexes:[self _includeSubslicesForSlicesAtIndexes:sub]]; @@ -1301,7 +1319,7 @@ TODO: implement childrenCount = [self _queryNumberOfChildrenOfItem:parentItem withRowType:type], foundIndex = CPNotFound; - if (childrenCount == 0) + if (childrenCount === 0) return NO; var current_criterions = [CPMutableArray array], @@ -1313,34 +1331,34 @@ TODO: implement var aCriteria = [self criteriaForRow:row], itemIndex = [items count]; - if ([self rowTypeForRow:row] == type && itemIndex < [aCriteria count]) + if ([self rowTypeForRow:row] === type && itemIndex < [aCriteria count]) { var crit = [aCriteria objectAtIndex:itemIndex]; [current_criterions addObject:crit]; } } - while (foundIndex == CPNotFound) + while (foundIndex === CPNotFound) { var buffer = [CPMutableArray arrayWithArray:current_criterions], i; for (i = 0; i < childrenCount; i++) { var child = [self _queryChild:i ofItem:parentItem withRowType:type]; - if ([current_criterions indexOfObject:child] == CPNotFound) + if ([current_criterions indexOfObject:child] === CPNotFound) { foundIndex = i; break; } } - if (foundIndex == CPNotFound) + if (foundIndex === CPNotFound) { for (var k = 0; k < childrenCount; k++) { var anobject = [self _queryChild:k ofItem:parentItem withRowType:type], index = [buffer indexOfObject:anobject]; - if (index != CPNotFound) + if (index !== CPNotFound) [buffer removeObjectAtIndex:index]; } @@ -1392,7 +1410,7 @@ TODO: implement var rowIndexEvent = [slice rowIndex], rowTypeEvent = [self rowTypeForRow:rowIndexEvent]; - var parentRowIndex = (rowTypeEvent == CPRuleEditorRowTypeCompound) ? rowIndexEvent:[self parentRowForRow:rowIndexEvent]; + var parentRowIndex = (rowTypeEvent === CPRuleEditorRowTypeCompound) ? rowIndexEvent:[self parentRowForRow:rowIndexEvent]; [self insertRowAtIndex:rowIndexEvent + 1 withType:type asSubrowOfRow:parentRowIndex animate:YES]; @@ -1414,7 +1432,7 @@ TODO: implement [row setValue:[CPMutableArray array] forKey:_subrowsArrayKeyPath]; var subrowsObjects; - if (parentRowIndex == -1 || [self _applicableNestingMode] == CPRuleEditorNestingModeList) + if (parentRowIndex === -1 || [self _applicableNestingMode] === CPRuleEditorNestingModeList) subrowsObjects = [self _rootRowsArray]; else { @@ -1432,7 +1450,7 @@ TODO: implement - (void)_startObservingRowObjectsRecursively:(CPArray)rowObjects { - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; var count = [rowObjects count]; @@ -1440,9 +1458,9 @@ TODO: implement { var rowObject = [rowObjects objectAtIndex:i]; - [rowObject addObserver:self forKeyPath:_itemsKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:itemsContext]; - [rowObject addObserver:self forKeyPath:_valuesKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:valuesContext]; - [rowObject addObserver:self forKeyPath:_subrowsArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:subrowsContext]; + [rowObject addObserver:self forKeyPath:_itemsKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:itemsContext]; + [rowObject addObserver:self forKeyPath:_valuesKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:valuesContext]; + [rowObject addObserver:self forKeyPath:_subrowsArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:subrowsContext]; var subrows = [self _subrowObjectsOfObject:rowObject]; if ([subrows count] > 0) @@ -1478,21 +1496,21 @@ TODO: implement newRows, oldRows; - if (context == boundArrayContext || context == subrowsContext) + if (context === boundArrayContext || context === subrowsContext) { - if (changeKind == CPKeyValueChangeSetting) + if (changeKind === CPKeyValueChangeSetting) { newRows = changeNewValue; oldRows = changeOldValue; } - else if (changeKind == CPKeyValueChangeInsertion) + else if (changeKind === CPKeyValueChangeInsertion) { newRows = [self _subrowObjectsOfObject:object]; oldRows = [CPArray arrayWithArray:newRows]; [oldRows removeObjectsInArray:changeNewValue]; } - else if (changeKind == CPKeyValueChangeRemoval) + else if (changeKind === CPKeyValueChangeRemoval) { newRows = [self _subrowObjectsOfObject:object]; oldRows = [CPArray arrayWithArray:newRows]; @@ -1506,10 +1524,10 @@ TODO: implement [self _postRowCountChangedNotificationOfType:CPRuleEditorRowsDidChangeNotification indexes:[change objectForKey:CPKeyValueChangeIndexesKey]]; } - else if (context == itemsContext) + else if (context === itemsContext) { } - else if (context == valuesContext) + else if (context === valuesContext) { } } @@ -1571,7 +1589,7 @@ TODO: implement //var gindexes = [self _globalIndexesForSubrowIndexes:[CPIndexSet indexSetWithIndexesInRange:CPMakeRange(0,oldRowCount)] ofParentObject:parentRowObject]; - if (parentCacheIndex == -1) + if (parentCacheIndex === -1) parentCacheIndentation = -1; else parentCacheIndentation = [[self _rowCacheForIndex:parentCacheIndex] indentation]; @@ -1600,17 +1618,18 @@ TODO: implement var oldrow = [oldRows objectAtIndex:changeStartIndex], newrow = [newRows objectAtIndex:changeStartIndex]; - if (newrow != oldrow) + if (newrow !== oldrow) break; } - var replaceCount = (deltaCount == 0) ? maxCount : maxCount - minusCount; - var startIndex = parentCacheIndex + changeStartIndex + 1; + var replaceCount = (deltaCount === 0) ? maxCount : maxCount - minusCount, + startIndex = parentCacheIndex + changeStartIndex + 1; if (deltaCount <= 0) { - var removeIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(startIndex, replaceCount)]; - var removeSlices = [_slices objectsAtIndexes:removeIndexes]; + var removeIndexes = [CPIndexSet indexSetWithIndexesInRange:CPMakeRange(startIndex, replaceCount)], + removeSlices = [_slices objectsAtIndexes:removeIndexes]; + [removeSlices makeObjectsPerformSelector:@selector(removeFromSuperview)]; [_slices removeObjectsAtIndexes:removeIndexes]; } @@ -1659,7 +1678,7 @@ TODO: implement - (void)bind:(CPString)binding toObject:(id)observableController withKeyPath:(CPString)keyPath options:(CPDictionary)options { - if (keyPath == nil || [observableController valueForKey:keyPath] == nil) + if (keyPath === nil || [observableController valueForKey:keyPath] === nil) { [CPException raise:CPInvalidArgumentException reason:"Keypath or bound object cannot be nil"]; return; @@ -1686,7 +1705,7 @@ TODO: implement - (void)_setBoundDataSource:(id)datasource withKeyPath:(CPString)keyPath options:(CPDictionary)options { - if (_boundArrayOwner != nil) + if (_boundArrayOwner !== nil) [_boundArrayOwner removeObserver:self forKeyPath:_boundArrayKeyPath]; _boundArrayKeyPath = keyPath; @@ -1694,7 +1713,7 @@ TODO: implement var boundRows = [_boundArrayOwner valueForKey:_boundArrayKeyPath]; - [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld|CPKeyValueObservingOptionNew context:boundArrayContext]; + [_boundArrayOwner addObserver:self forKeyPath:_boundArrayKeyPath options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:boundArrayContext]; if ([boundRows isKindOfClass:[CPArray class]] && [boundRows count] > 0) [_boundArrayOwner setValue:boundRows forKey:_boundArrayKeyPath]; @@ -1721,11 +1740,11 @@ TODO: implement subindexes = [self subrowIndexesForRow:-1], current_index = [subindexes firstIndex]; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var subpredicate = [self predicateForRow:current_index]; - if (subpredicate != nil) + if (subpredicate !== nil) [subpredicates addObject:subpredicate]; current_index = [subindexes indexGreaterThanIndex:current_index]; @@ -1764,7 +1783,7 @@ TODO: implement startRect = [aslice frame], startIndex = [aslice rowIndex] - 1; - if ([aslice superview] == nil) + if ([aslice superview] === nil) { startRect = CGRectMake(0, startIndex * _sliceHeight, CGRectGetWidth(startRect), _sliceHeight); [aslice _reconfigureSubviews]; @@ -1796,7 +1815,7 @@ TODO: implement _lastRow = [self numberOfRows] - 1; - if (_lastRow == -1) + if (_lastRow === -1) _nestingModeDidChange = NO; [self setNeedsDisplay:YES]; @@ -1890,7 +1909,7 @@ TODO: implement { var current_index = [indexes firstIndex]; - while (current_index !=CPNotFound) + while (current_index !== CPNotFound) { var subindexes = [self subrowIndexesForRow:index]; [self _updateSliceIndentationAtIndex:current_index toIndentation:indentation + 1 withIndexSet:subindexes]; @@ -1934,7 +1953,7 @@ TODO: implement - (void)_mouseUpOnSlice:(id)slice withEvent:(CPEvent)event { - if ([slice _rowType] != CPRuleEditorRowTypeSimple) + if ([slice _rowType] !== CPRuleEditorRowTypeSimple) return; var modifierFlags = [event modifierFlags], @@ -2042,7 +2061,7 @@ TODO: implement { [self setNeedsDisplay:YES]; - if (CGRectGetWidth([self frame]) != size.width) + if (CGRectGetWidth([self frame]) !== size.width) [_slices makeObjectsPerformSelector:@selector(setNeedsLayout)]; [super setFrameSize:size]; @@ -2078,7 +2097,7 @@ TODO: implement - (BOOL)_dragShouldBeginFromMouseDown:(CPView)view { - return (([self nestingMode] == CPRuleEditorNestingModeList || [view rowIndex] != 0) && _editable && [view isKindOfClass:[_CPRuleEditorViewSliceRow class]] && _draggingRows == nil); + return (([self nestingMode] === CPRuleEditorNestingModeList || [view rowIndex] !== 0) && _editable && [view isKindOfClass:[_CPRuleEditorViewSliceRow class]] && _draggingRows === nil); } - (BOOL)_performDragForSlice:(id)slice withEvent:(CPEvent)event @@ -2121,7 +2140,7 @@ TODO: implement - (CPDragOperation)draggingEntered:(id < CPDraggingInfo >)sender { - if ([sender draggingSource] == self) + if ([sender draggingSource] === self) { [self _clearDropLine]; return CPDragOperationMove; @@ -2140,7 +2159,7 @@ TODO: implement { [_dropLineView setAlphaValue:0]; - if (_subviewIndexOfDropLine != CPNotFound && _subviewIndexOfDropLine < _lastRow) + if (_subviewIndexOfDropLine !== CPNotFound && _subviewIndexOfDropLine < _lastRow) { var previousBelowSlice = [_slices objectAtIndex:_subviewIndexOfDropLine]; [previousBelowSlice setFrameOrigin:CGPointMake(0, [previousBelowSlice rowIndex] * _sliceHeight)]; @@ -2152,20 +2171,20 @@ TODO: implement - (CPDragOperation)draggingUpdated:(id )sender { var point = [self convertPoint:[sender draggingLocation] fromView:nil], - y = point.y + _sliceHeight /2, + y = point.y + _sliceHeight / 2, indexOfDropLine = FLOOR(y / _sliceHeight), numberOfRows = [self numberOfRows]; if (indexOfDropLine < 0 || indexOfDropLine > numberOfRows || (indexOfDropLine >= [_draggingRows firstIndex] && indexOfDropLine <= [_draggingRows lastIndex] + 1)) { - if (_subviewIndexOfDropLine != CPNotFound && indexOfDropLine != _subviewIndexOfDropLine) + if (_subviewIndexOfDropLine !== CPNotFound && indexOfDropLine !== _subviewIndexOfDropLine) [self _clearDropLine]; return CPDragOperationNone; } - if (_subviewIndexOfDropLine != indexOfDropLine) + if (_subviewIndexOfDropLine !== indexOfDropLine) { - if (_subviewIndexOfDropLine != CPNotFound && _subviewIndexOfDropLine < numberOfRows) + if (_subviewIndexOfDropLine !== CPNotFound && _subviewIndexOfDropLine < numberOfRows) { var previousBelowSlice = [_slices objectAtIndex:_subviewIndexOfDropLine]; [previousBelowSlice setFrameOrigin:CPMakePoint(0, [previousBelowSlice rowIndex] * _sliceHeight)]; @@ -2188,7 +2207,7 @@ TODO: implement - (BOOL)prepareForDragOperation:(id < CPDraggingInfo >)sender { - return (_subviewIndexOfDropLine != CPNotFound); + return (_subviewIndexOfDropLine !== CPNotFound); } - (BOOL)performDragOperation:(id < CPDraggingInfo >)info @@ -2200,11 +2219,11 @@ TODO: implement var rowObjects = [_rowCache valueForKey:@"rowObject"], index = [_draggingRows lastIndex]; - var parentRowIndex = [self parentRowForRow:index]; // first index of draggingrows - var parentRowObject = (parentRowIndex == -1) ? _boundArrayOwner : [[self _rowCacheForIndex:parentRowIndex] rowObject]; - var insertIndex = _subviewIndexOfDropLine; + var parentRowIndex = [self parentRowForRow:index], // first index of draggingrows + parentRowObject = (parentRowIndex === -1) ? _boundArrayOwner : [[self _rowCacheForIndex:parentRowIndex] rowObject], + insertIndex = _subviewIndexOfDropLine; - while (index != CPNotFound) + while (index !== CPNotFound) { if (index >= insertIndex) { @@ -2281,12 +2300,12 @@ TODO: implement current_index = [indexes firstIndex], numberOfChildrenOfPreviousBrother = 0; - while (current_index != CPNotFound) + while (current_index !== CPNotFound) { var globalChildIndex = current_index + parentRowIndex + 1 + numberOfChildrenOfPreviousBrother; [globalIndexes addIndex:globalChildIndex]; - if ([self rowTypeForRow:globalChildIndex] == CPRuleEditorRowTypeCompound) + if ([self rowTypeForRow:globalChildIndex] === CPRuleEditorRowTypeCompound) { var rowObject = [[self _rowCacheForIndex:current_index] rowObject], subrows = [self _subrowObjectsOfObject:rowObject]; @@ -2334,8 +2353,8 @@ TODO: implement var criteria = [self criteriaForRow:aRow]; indexofCriterion = [criteria indexOfObject:criterion]; - if (parentItem != nil - && indexofCriterion != CPNotFound + if (parentItem !== nil + && indexofCriterion !== CPNotFound && indexofCriterion < [criteria count] - 1) { var next = indexofCriterion + 1; @@ -2351,10 +2370,10 @@ TODO: implement var availChild = aChild, availValue = value; - if ( criterion != aChild ) + if (criterion !== aChild) availValue = [self _queryValueForItem:aChild inRow:aRow]; - if ( !availValue ) + if (!availValue) availValue = [self _queryValueForItem:availChild inRow:aRow]; [availItems addObject:availChild]; @@ -2390,7 +2409,7 @@ var CPRuleEditorAlignmentGridWidthKey = @"CPRuleEditorAlignmentGridWidth", - (id)initWithCoder:(CPCoder)coder { self = [super initWithCoder:coder]; - if (self != nil) + if (self !== nil) { [self setFormattingStringsFilename:[coder decodeObjectForKey:CPRuleEditorStringsFilenameKey]]; _alignmentGridWidth = [coder decodeFloatForKey:CPRuleEditorAlignmentGridWidthKey]; @@ -2474,7 +2493,7 @@ var CriteriaKey = @"criteria", - (id)initWithCoder:(id)coder { self = [super init]; - if (self != nil) + if (self !== nil) { subrows = [coder decodeObjectForKey:SubrowsKey]; criteria = [coder decodeObjectForKey:CriteriaKey]; @@ -2504,7 +2523,7 @@ var CriteriaKey = @"criteria", - (CPString)description { - return [CPString stringWithFormat:@"<%d object:%d rowIndex:%d indentation:%d>",[self hash], [rowObject hash], rowIndex, indentation]; + return [CPString stringWithFormat:@"<%d object:%d rowIndex:%d indentation:%d>", [self hash], [rowObject hash], rowIndex, indentation]; } @end @@ -2570,21 +2589,23 @@ var dropSeparatorColor = [CPColor colorWithHexString:@"4886ca"]; - (int)valueType { - var result = 0; + var result = 0, + isString = [self isKindOfClass:CPString]; - var isString = [self isKindOfClass:[CPString class]]; - if ( !isString ) + if (!isString) { - var isView = [self isKindOfClass:[CPView class]]; + var isView = [self isKindOfClass:CPView]; result = 1; - if ( !isView ) + + if (!isView) { - var ismenuItem = [self isKindOfClass:[CPMenuItem class]]; + var ismenuItem = [self isKindOfClass:CPMenuItem]; result = 2; - if ( !ismenuItem ) + + if (!ismenuItem) { - [CPException raise:CPGenericException reason:@"Unknown Type For " + self]; - result = -1; + [CPException raise:CPGenericException reason:@"Unknown type for " + self]; + result = -1; } } } @@ -2593,4 +2614,4 @@ var dropSeparatorColor = [CPColor colorWithHexString:@"4886ca"]; } @end -/*! @endcond */ \ No newline at end of file +/*! @endcond */ diff --git a/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j b/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j index 439b8d037..eadd3993b 100644 --- a/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j +++ b/AppKit/CPRuleEditor/_CPPredicateEditorRowNode.j @@ -28,11 +28,10 @@ node.tree = aTree; var template = [aTree template], - uuid = [template UID]; + uuid = [template UID], + cachedNode = templateTable[uuid]; - var cachedNode = templateTable[uuid]; - - if (cachedNode == nil) + if (cachedNode === nil) { views = [CPMutableArray array]; copiedContainer = [CPMutableArray array]; @@ -67,6 +66,7 @@ - (BOOL)applyTemplate:(id)template withViews:(id)views forOriginalTemplate:(id)originalTemplate { var t = [tree template]; + if (t !== template) { [templateViews setArray:views]; @@ -75,6 +75,7 @@ } var count = [children count]; + for (var i; i < count; i++) [children[i] applyTemplate:template withViews:views forOriginalTemplate:originalTemplate]; } @@ -89,7 +90,7 @@ - (void)copyTemplateIfNecessary { - if ([copiedTemplateContainer count] == 0) + if ([copiedTemplateContainer count] === 0) { CPLogConsole("COPYING TEMPLATE"); var copy = [[tree template] copy]; @@ -118,7 +119,8 @@ - (id)displayValue { var title = [self title]; - if (title != nil) + + if (title !== nil) return title; return [self templateView]; @@ -129,4 +131,4 @@ return [CPString stringWithFormat:@"<%@ %@ %@ tree:%@ tviews:%@", [self className],[self UID], [self title], [tree UID], [templateViews description]]; } -@end \ No newline at end of file +@end diff --git a/AppKit/CPSearchField.j b/AppKit/CPSearchField.j index e2268048c..246fc2a9b 100644 --- a/AppKit/CPSearchField.j +++ b/AppKit/CPSearchField.j @@ -173,7 +173,7 @@ var RECENT_SEARCH_PREFIX = @" "; searchButtonImage = (_searchMenuTemplate === nil) ? CPSearchFieldSearchImage : CPSearchFieldFindImage; [button setBordered:NO]; - [button setImageScaling:CPScaleToFit]; + [button setImageScaling:CPImageScaleAxesIndependently]; [button setImage:searchButtonImage]; [button setAutoresizingMask:CPViewMaxXMargin]; } @@ -215,7 +215,7 @@ var RECENT_SEARCH_PREFIX = @" "; { var button = [self cancelButton]; [button setBordered:NO]; - [button setImageScaling:CPScaleToFit]; + [button setImageScaling:CPImageScaleAxesIndependently]; [button setImage:CPSearchFieldCancelImage]; [button setAlternateImage:CPSearchFieldCancelPressedImage]; [button setAutoresizingMask:CPViewMinXMargin]; diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index d0b92218a..4a28f091f 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -55,7 +55,7 @@ CPSegmentSwitchTrackingMomentary = 2; + (id)themeAttributes { - return [CPDictionary dictionaryWithObjects:[CPCenterTextAlignment, CPCenterVerticalTextAlignment, CPImageLeft, CPScaleNone, _CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], [CPNull null], 1.0, 24.0] + return [CPDictionary dictionaryWithObjects:[CPCenterTextAlignment, CPCenterVerticalTextAlignment, CPImageLeft, CPImageScaleNone, _CGInsetMakeZero(), _CGInsetMakeZero(), [CPNull null], [CPNull null], [CPNull null], [CPNull null], 1.0, 24.0] forKeys:[@"alignment", @"vertical-alignment", @"image-position", @"image-scaling", @"bezel-inset", @"content-inset", @"left-segment-bezel-color", @"right-segment-bezel-color", @"center-segment-bezel-color", @"divider-bezel-color", @"divider-thickness", @"default-height"]]; } diff --git a/AppKit/CPTabView.j b/AppKit/CPTabView.j index f97bb68af..94b1b64e0 100644 --- a/AppKit/CPTabView.j +++ b/AppKit/CPTabView.j @@ -273,7 +273,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1, Selects the item at the specified index. @param anIndex the index of the item to display. */ -- (void)selectTabViewItemAtIndex:(unsigned)anIndex +- (BOOL)selectTabViewItemAtIndex:(unsigned)anIndex { if (anIndex === _selectedIndex) return; @@ -281,7 +281,7 @@ var CPTabViewDidSelectTabViewItemSelector = 1, var aTabViewItem = [self tabViewItemAtIndex:anIndex]; if ((_delegateSelectors & CPTabViewShouldSelectTabViewItemSelector) && ![_delegate tabView:self shouldSelectTabViewItem:aTabViewItem]) - return; + return NO; if (_delegateSelectors & CPTabViewWillSelectTabViewItemSelector) [_delegate tabView:self willSelectTabViewItem:aTabViewItem]; @@ -291,6 +291,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1, if (_delegateSelectors & CPTabViewDidSelectTabViewItemSelector) [_delegate tabView:self didSelectTabViewItem:aTabViewItem]; + + return YES; } /*! @@ -431,11 +433,8 @@ var CPTabViewDidSelectTabViewItemSelector = 1, { var segmentIndex = [_tabs testSegment:[_tabs convertPoint:[anEvent locationInWindow] fromView:nil]]; - if (segmentIndex != CPNotFound) - { - [self selectTabViewItemAtIndex:segmentIndex]; + if (segmentIndex != CPNotFound && [self selectTabViewItemAtIndex:segmentIndex]) [_tabs trackSegment:anEvent]; - } } - (void)_repositionTabs diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index 5898b759e..7fb26a8bf 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -321,7 +321,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; */ - (void)_init { - _tableViewFlags = 0; _lastSelectedRow = -1; _selectedColumnIndexes = [CPIndexSet indexSet]; @@ -335,15 +334,12 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; if (!_alternatingRowBackgroundColors) _alternatingRowBackgroundColors = [[CPColor whiteColor], [CPColor colorWithHexString:@"e4e7ff"]]; - _selectionHighlightColor = [CPColor colorWithHexString:@"5f83b9"]; - _tableColumnRanges = []; _dirtyTableColumnRangeIndex = 0; _numberOfHiddenColumns = 0; _objectValues = { }; _dataViewsForTableColumns = { }; - _dataViews = []; _numberOfRows = 0; _exposedRows = [CPIndexSet indexSet]; _exposedColumns = [CPIndexSet indexSet]; @@ -3373,6 +3369,14 @@ Your delegate can implement this method to avoid subclassing the tableview to ad */ - (void)_commitDataViewObjectValue:(id)sender { + /* + makeFirstResponder at the end of this method causes the dataview to resign. + If the dataview resigning triggers the action (as CPTextField does), we come right + back here and start an infinite loop. So we have to check this flag first. + */ + if (_editingCellIndex === nil) + return; + _editingCellIndex = nil; if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_) @@ -3696,7 +3700,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad [_selectedColumnIndexes getIndexes:indexes maxCount:-1 inIndexRange:exposedRange]; } - var count = count2 = [indexes count]; + var count, + count2 = count = [indexes count]; if (!count) return; @@ -4852,9 +4857,8 @@ var CPTableViewDataSourceKey = @"CPTableViewDataSourceKey", while (index != CPNotFound) { - var indexSet = (switchFlag) ? otherSet : self; - - otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index]; + var indexSet = (switchFlag) ? otherSet : self, + otherIndex = [indexSet indexGreaterThanOrEqualToIndex:index]; if (otherIndex == index) { diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index a421c1f59..0145649c2 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -540,7 +540,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); // Select the text if the textfield became first responder through keyboard interaction if (!_willBecomeFirstResponderByClick) - [self selectText:self]; + [self _selectText:self immediately:YES]; _willBecomeFirstResponderByClick = NO; @@ -1071,24 +1071,36 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); */ - (void)selectText:(id)sender { - // FIXME Should this really make the text field the first responder? + [self _selectText:sender immediately:NO]; +} +- (void)_selectText:(id)sender immediately:(BOOL)immediately +{ + // Selecting the text in a field makes it the first responder if (([self isEditable] || [self isSelectable])) { + var wind = [self window]; + #if PLATFORM(DOM) var element = [self _inputElement]; - if ([[self window] firstResponder] === self) - window.setTimeout(function() { element.select(); }, 0); - else if ([self window] !== nil && [[self window] makeFirstResponder:self]) - window.setTimeout(function() {[self selectText:sender];}, 0); + if ([wind firstResponder] === self) + { + if (immediately) + element.select(); + else + window.setTimeout(function() { element.select(); }, 0); + } + else if (wind !== nil && [wind makeFirstResponder:self]) + [self _selectText:sender immediately:immediately]; #else // Even if we can't actually select the text we need to preserve the first // responder side effect. - if ([self window] !== nil && [[self window] firstResponder] !== self) - [[self window] makeFirstResponder:self]; + if (wind !== nil && [wind firstResponder] !== self) + [wind makeFirstResponder:self]; #endif } + } - (void)copy:(id)sender @@ -1509,32 +1521,15 @@ var CPTextFieldIsEditableKey = "CPTextFieldIsEditableKey", [self _setPlaceholder:@"" forMarker:CPNullMarker isDefault:YES]; } -- (void)setValueFor:(CPString)theBinding +- (void)setPlaceholderValue:(id)aValue withMarker:(CPString)aMarker forBinding:(CPString)aBinding { - var destination = [_info objectForKey:CPObservedObjectKey], - keyPath = [_info objectForKey:CPObservedKeyPathKey], - options = [_info objectForKey:CPOptionsKey], - newValue = [destination valueForKeyPath:keyPath], - isPlaceholder = CPIsControllerMarker(newValue); + [_source setPlaceholderString:aValue]; + [_source setObjectValue:nil]; +} - if (isPlaceholder) - { - if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) - { - [CPException raise:CPGenericException - reason:@"can't transform non applicable key on: " + _source + " value: " + newValue]; - } - - newValue = [self _placeholderForMarker:newValue]; - - [_source setPlaceholderString:newValue]; - [_source setObjectValue:nil]; - } - else - { - newValue = [self transformValue:newValue withOptions:options]; - [_source setObjectValue:newValue]; - } +- (void)setValue:(id)aValue forBinding:(CPString)aBinding +{ + [_source setObjectValue:aValue]; } @end diff --git a/AppKit/CPToolbar.j b/AppKit/CPToolbar.j index 787548ef6..c759a87a2 100644 --- a/AppKit/CPToolbar.j +++ b/AppKit/CPToolbar.j @@ -1024,7 +1024,7 @@ var TOP_MARGIN = 5.0, { _imageView = [[CPImageView alloc] initWithFrame:[self bounds]]; - [_imageView setImageScaling:CPScaleProportionally]; + [_imageView setImageScaling:CPImageScaleProportionallyDown]; [self addSubview:_imageView]; } diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 7b9716963..be1c11a64 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -516,6 +516,7 @@ CPTexturedBackgroundWindowMask - (void)awakeFromCib { _keyViewLoopIsDirty = ![self _hasKeyViewLoop]; + // If no key view loop has been specified by hand, and we are not intending to auto recalculate, // set up a default key view loop. if (_keyViewLoopIsDirty && ![self autorecalculatesKeyViewLoop]) @@ -1301,6 +1302,34 @@ CPTexturedBackgroundWindowMask _initialFirstResponder = aView; } +- (void)_setupFirstResponder +{ + /* + If: + + - The key loop is dirty + - The key loop does not auto-recalculate + - The first responder is the window + - The initial first responder is the content view + + Then calculate the key view loop and set the first responder + to the first view in the loop, since we should + always have an initial first responder and a key loop by default. + */ + if (_keyViewLoopIsDirty && + !_autorecalculatesKeyViewLoop && + _firstResponder === self && + _initialFirstResponder === [self contentView]) + { + [self recalculateKeyViewLoop]; + + // Make the first key view of the content view the first responder + var firstKeyView = [[self contentView] nextValidKeyView]; + + [self makeFirstResponder:firstKeyView]; + } +} + /*! Attempts to make the \c aResponder the first responder. Before trying to make it the first responder, the receiver will ask the current first responder @@ -1655,6 +1684,8 @@ CPTexturedBackgroundWindowMask if (_firstResponder !== self && [_firstResponder respondsToSelector:@selector(becomeKeyWindow)]) [_firstResponder becomeKeyWindow]; + [self _setupFirstResponder]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPWindowDidBecomeKeyNotification object:self]; @@ -2489,10 +2520,7 @@ CPTexturedBackgroundWindowMask [views sortUsingFunction:keyViewComparator context:nil]; - var index = 0, - count = [views count]; - - for (; index < count; ++index) + for (var index = 0, count = [views count]; index < count; ++index) [views[index] setNextKeyView:views[(index + 1) % count]]; _keyViewLoopIsDirty = NO; @@ -2671,8 +2699,7 @@ var allViews = function(aWindow) [views addObjectsFromArray:[[aWindow contentView] subviews]]; - var index = 0; - for (; index < views.length; ++index) + for (var index = 0; index < views.length; ++index) views = views.concat([views[index] subviews]); return views; diff --git a/AppKit/CPWindow/_CPHUDWindowView.j b/AppKit/CPWindow/_CPHUDWindowView.j index 1f3a391bf..b668e865f 100644 --- a/AppKit/CPWindow/_CPHUDWindowView.j +++ b/AppKit/CPWindow/_CPHUDWindowView.j @@ -105,7 +105,7 @@ var HUD_TITLEBAR_HEIGHT = 26.0; if ([[[self window] toolbar] isVisible]) { - toolbarHeight = CGRectGetHeight([[self toolbarView] frame]); + var toolbarHeight = CGRectGetHeight([[self toolbarView] frame]); frameRect.origin.y -= toolbarHeight; frameRect.size.height += toolbarHeight; diff --git a/AppKit/CPWindow/_CPStandardWindowView.j b/AppKit/CPWindow/_CPStandardWindowView.j index 03c44a6c0..47cf61ddb 100644 --- a/AppKit/CPWindow/_CPStandardWindowView.j +++ b/AppKit/CPWindow/_CPStandardWindowView.j @@ -197,7 +197,7 @@ var STANDARD_GRADIENT_HEIGHT = 41.0, if ([theToolbar isVisible]) { - toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); + var toolbarHeight = CGRectGetHeight([[theToolbar _toolbarView] frame]); frameRect.origin.y -= toolbarHeight; frameRect.size.height += toolbarHeight; diff --git a/AppKit/Cib/CPCibRuntimeAttributesConnector.j b/AppKit/Cib/CPCibRuntimeAttributesConnector.j new file mode 100644 index 000000000..ed7b736e6 --- /dev/null +++ b/AppKit/Cib/CPCibRuntimeAttributesConnector.j @@ -0,0 +1,64 @@ +/* + * CPCibRuntimeAttributesConnector.j + * AppKit + * + * Created by Aparajita Fishman. + * Copyright 2012, The Cappuccino Project. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import "CPCibConnector.j" + +var CPCibRuntimeAttributesConnectorObjectKey = @"CPCibRuntimeAttributesConnectorObjectKey", + CPCibRuntimeAttributesConnectorKeyPathsKey = @"CPCibRuntimeAttributesConnectorKeyPathsKey", + CPCibRuntimeAttributesConnectorValuesKey = @"CPCibRuntimeAttributesConnectorValuesKey"; + +@implementation CPCibRuntimeAttributesConnector : CPCibConnector +{ + id _keyPaths; + id _values; +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + if (self = [super initWithCoder:aCoder]) + { + _source = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorObjectKey]; + _keyPaths = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorKeyPathsKey]; + _values = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorValuesKey]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [super encodeWithCoder:aCoder]; + + [aCoder encodeObject:_source forKey:CPCibRuntimeAttributesConnectorObjectKey]; + [aCoder encodeObject:_keyPaths forKey:CPCibRuntimeAttributesConnectorKeyPathsKey]; + [aCoder encodeObject:_values forKey:CPCibRuntimeAttributesConnectorValuesKey]; +} + +- (void)establishConnection +{ + var count = [_keyPaths count]; + + while (count--) + [_source setValue:_values[count] forKeyPath:_keyPaths[count]]; +} + +@end diff --git a/AppKit/Cib/_CPCibClassSwapper.j b/AppKit/Cib/_CPCibClassSwapper.j index 8e1c133df..0d432a313 100644 --- a/AppKit/Cib/_CPCibClassSwapper.j +++ b/AppKit/Cib/_CPCibClassSwapper.j @@ -61,14 +61,14 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey", if (!object) { - CPLog.error("Unable to find class " + theClassName + " in cib file."); + CPLog.error("Unable to find class " + theClassName + " referenced in cib file."); object = [self allocObjectWithCoder:aCoder className:[aCoder decodeObjectForKey:_CPCibClassSwapperOriginalClassNameKey]]; } } if (!object) - [CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " in cib file."]; + [CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " referenced in cib file."]; return object; } diff --git a/AppKit/Cib/_CPCibObjectData.j b/AppKit/Cib/_CPCibObjectData.j index 9bf0eb2e1..79a982bab 100644 --- a/AppKit/Cib/_CPCibObjectData.j +++ b/AppKit/Cib/_CPCibObjectData.j @@ -29,6 +29,7 @@ @import "CPCibControlConnector.j" @import "CPCibOutletConnector.j" @import "CPCibBindingConnector.j" +@import "CPCibRuntimeAttributesConnector.j" @implementation _CPCibObjectData : CPObject @@ -232,15 +233,15 @@ var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey { _replacementObjects[[object UID]] = instantiatedObject; - if ([instantiatedObject isKindOfClass:[CPView class]]) + if ([instantiatedObject isKindOfClass:CPView]) { var clipView = [instantiatedObject superview]; - if ([clipView isKindOfClass:[CPClipView class]]) + if ([clipView isKindOfClass:CPClipView]) { var scrollView = [clipView superview]; - if ([scrollView isKindOfClass:[CPScrollView class]]) + if ([scrollView isKindOfClass:CPScrollView]) [scrollView setDocumentView:instantiatedObject]; } } @@ -257,11 +258,29 @@ var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey _replacementObjects[[_fileOwner UID]] = anOwner; var index = 0, - count = _connections.length; + count = _connections.length, + runtimeAttributeConnectors = [], + connection = nil; for (; index < count; ++index) { - var connection = _connections[index]; + connection = _connections[index]; + + if ([connection isKindOfClass:CPCibRuntimeAttributesConnector]) + // Defer runtime attribute connections until after all other connections are made + runtimeAttributeConnectors.push(connection); + else + { + [connection replaceObjects:_replacementObjects]; + [connection establishConnection]; + } + } + + count = runtimeAttributeConnectors.length; + + for (index = 0; index < count; ++index) + { + connection = runtimeAttributeConnectors[index]; [connection replaceObjects:_replacementObjects]; [connection establishConnection]; diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index 0c89d8684..076ec8f12 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -661,7 +661,7 @@ var ModifierKeyCodes = [ - (void)keyEvent:(DOMEvent)aDOMEvent { var event, - timestamp = aDOMEvent.timeStamp || new Date(), + timestamp = [CPEvent currentTimestamp], sourceElement = aDOMEvent.target || aDOMEvent.srcElement, windowNumber = [[CPApp keyWindow] windowNumber], modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | @@ -871,11 +871,11 @@ var ModifierKeyCodes = [ { if ([self _validateCopyCutOrPasteEvent:aDOMEvent flags:CPPlatformActionKeyMask] && !_ignoreNativeCopyOrCutEvent) { - //we have to send out a fake copy or cut event so that we can force the copy/cut mechanisms to take place + // we have to send out a fake copy or cut event so that we can force the copy/cut mechanisms to take place var cut = aDOMEvent.type === "beforecut", keyCode = cut ? CPKeyCodes.X : CPKeyCodes.C, characters = cut ? "x" : "c", - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], // fake event, might as well use current timestamp windowNumber = [[CPApp keyWindow] windowNumber], modifierFlags = CPPlatformActionKeyMask; @@ -1008,7 +1008,7 @@ var ModifierKeyCodes = [ var deltaX = 0.0, deltaY = 0.0, windowNumber = 0, - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | (aDOMEvent.ctrlKey ? CPControlKeyMask : 0) | (aDOMEvent.altKey ? CPAlternateKeyMask : 0) | @@ -1135,7 +1135,7 @@ var ModifierKeyCodes = [ newEvent.clientX = touch.clientX; newEvent.clientY = touch.clientY; - newEvent.timestamp = aDOMEvent.timestamp; + newEvent.timestamp = [CPEvent currentTimestamp]; newEvent.target = aDOMEvent.target; newEvent.shiftKey = newEvent.ctrlKey = newEvent.altKey = newEvent.metaKey = false; @@ -1179,7 +1179,7 @@ var ModifierKeyCodes = [ var event, location = _CGPointMake(aDOMEvent.clientX, aDOMEvent.clientY), - timestamp = aDOMEvent.timeStamp ? aDOMEvent.timeStamp : new Date(), + timestamp = [CPEvent currentTimestamp], sourceElement = (aDOMEvent.target || aDOMEvent.srcElement), windowNumber = 0, modifierFlags = (aDOMEvent.shiftKey ? CPShiftKeyMask : 0) | diff --git a/AppKit/_CPAttachedWindow.j b/AppKit/_CPAttachedWindow.j index 1eb175b4e..8e53162a6 100644 --- a/AppKit/_CPAttachedWindow.j +++ b/AppKit/_CPAttachedWindow.j @@ -186,7 +186,7 @@ var _CPAttachedWindow_attachedWindowShouldClose_ = 1 << 0, // TODO: don't recompute everything, just compute the move offset var edge = [_windowView preferredEdge]; - [self positionRelativeToView:_targetView preferredEdge:edge]; + [self positionRelativeToRect:nil ofView:_targetView preferredEdge:edge]; } } diff --git a/AppKit/_CPImageAndTextView.j b/AppKit/_CPImageAndTextView.j index d7b39bfce..adb34716f 100644 --- a/AppKit/_CPImageAndTextView.j +++ b/AppKit/_CPImageAndTextView.j @@ -100,7 +100,7 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, [self setAlignment:CPCenterTextAlignment]; [self setFont:[CPFont systemFontOfSize:12.0]]; [self setImagePosition:CPNoImage]; - [self setImageScaling:CPScaleNone]; + [self setImageScaling:CPImageScaleNone]; } _textSize = nil; @@ -607,12 +607,12 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, imageWidth = imageSize.width, imageHeight = imageSize.height; - if (_imageScaling === CPScaleToFit) + if (_imageScaling === CPImageScaleAxesIndependently) { imageWidth = size.width; imageHeight = size.height; } - else if (_imageScaling === CPScaleProportionally) + else if (_imageScaling === CPImageScaleProportionallyDown) { var scale = MIN(MIN(size.width, imageWidth) / imageWidth, MIN(size.height, imageHeight) / imageHeight); diff --git a/Foundation/CPArray/CPArray.j b/Foundation/CPArray/CPArray.j index 5a27eca97..78c462aae 100755 --- a/Foundation/CPArray/CPArray.j +++ b/Foundation/CPArray/CPArray.j @@ -522,7 +522,7 @@ var concat = Array.prototype.concat, if ([objects count]) { - argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; + var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; for (; index < count; ++index) { diff --git a/Foundation/CPArray/_CPJavaScriptArray.j b/Foundation/CPArray/_CPJavaScriptArray.j index 2cadc2113..7860a9adc 100644 --- a/Foundation/CPArray/_CPJavaScriptArray.j +++ b/Foundation/CPArray/_CPJavaScriptArray.j @@ -163,7 +163,7 @@ var concat = Array.prototype.concat, if ([objects count]) { - argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; + var argumentsArray = [[nil, aSelector] arrayByAddingObjectsFromArray:objects]; for (; index < count; ++index) { diff --git a/Foundation/CPURL.j b/Foundation/CPURL.j index 810677c7e..669614dd9 100644 --- a/Foundation/CPURL.j +++ b/Foundation/CPURL.j @@ -122,8 +122,8 @@ CPURLCustomIconKey = @"CPURLCustomIconKey"; - (CPArray)pathComponents { - var path = self.pathComponents(); - return [path copy]; + var components = self.pathComponents(); + return [components copy]; } // if absolute, returns the same as path @@ -202,6 +202,13 @@ CPURLCustomIconKey = @"CPURLCustomIconKey"; return self.pathExtension(); } +- (CPURL)URLByDeletingLastPathComponent +{ + var result = self.createCopyDeletingLastPathComponent(); + result.isa = [self class]; + return result; +} + - (CPURL)standardizedURL { return self.standardizedURL(); diff --git a/Objective-J/CFURL.js b/Objective-J/CFURL.js index cc561a422..757af5617 100644 --- a/Objective-J/CFURL.js +++ b/Objective-J/CFURL.js @@ -122,10 +122,9 @@ function CFURLGetParts(/*CFURL*/ aURL) { var split = parts.path.split("/"), pathComponents = parts.pathComponents, - index = 0, count = split.length; - for (; index < count; ++index) + for (index = 0; index < count; ++index) { var component = split[index]; @@ -160,7 +159,7 @@ GLOBAL(CFURL) = function(/*CFURL|String*/ aURL, /*CFURL*/ aBaseURL) if (aURL instanceof CFURL) { if (!aBaseURL) - return aURL; + return new CFURL(aURL.absoluteString()); var existingBaseURL = aURL.baseURL(); @@ -360,7 +359,7 @@ function standardizePathComponents(/*Array*/ pathComponents, /*BOOL*/ inPlace) var component = pathComponents[index]; if (component === "") - continue; + continue; if (component === ".") { @@ -564,6 +563,25 @@ CFURL.prototype.path = function() DISPLAY_NAME(CFURL.prototype.path); +CFURL.prototype.createCopyDeletingLastPathComponent = function() +{ + var parts = PARTS(this), + components = standardizePathComponents(parts.pathComponents, NO); + + if (components.length > 0) + if (components.length > 1 || components[0] !== "/") + components.pop(); + + // pathFromPathComponents() returns an empty path for ["/"] + var isRoot = components.length === 1 && components[0] === "/"; + + parts.pathComponents = components; + parts.path = isRoot ? "/" : pathFromPathComponents(components, NO); + return new CFURL(URLStringFromParts(parts)); +}; + +DISPLAY_NAME(CFURL.prototype.createCopyDeletingLastPathComponent); + CFURL.prototype.pathComponents = function() { return PARTS(this).pathComponents; diff --git a/Objective-J/CPLog.js b/Objective-J/CPLog.js index 11a3676ee..87e325cc7 100644 --- a/Objective-J/CPLog.js +++ b/Objective-J/CPLog.js @@ -106,16 +106,34 @@ for (var i = 0; i < CPLogLevels.length; i++) var _CPFormatLogMessage = function(aString, aLevel, aTitle) { - var now = new Date(); - aLevel = ( aLevel == null ? '' : ' [' + CPLogColorize(aLevel, aLevel) + ']' ); + var now = new Date(), + titleAndLevel; + + if (aLevel === null) + aLevel = ""; + else + { + aLevel = aLevel || "info"; + aLevel = "[" + CPLogColorize(aLevel, aLevel) + "]"; + } + + aTitle = aTitle || ""; + + if (aTitle && aLevel) + aTitle += " "; + + titleAndLevel = aTitle + aLevel; + + if (titleAndLevel) + titleAndLevel += ": "; if (typeof exports.sprintf == "function") - return exports.sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s%s: %s", + return exports.sprintf("%4d-%02d-%02d %02d:%02d:%02d.%03d %s%s", now.getFullYear(), now.getMonth() + 1, now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds(), now.getMilliseconds(), - aTitle, aLevel, aString); + titleAndLevel, aString); else - return now + " " + aTitle + aLevel + ": " + aString; + return now + " " + titleAndLevel + ": " + aString; } // Loggers: @@ -125,16 +143,15 @@ GLOBAL(CPLogConsole) = function(aString, aLevel, aTitle, aFormatter) { if (typeof console != "undefined") { - var message = (aFormatter || _CPFormatLogMessage)(aString, aLevel, aTitle); - - var logger = { - "fatal": "error", - "error": "error", - "warn": "warn", - "info": "info", - "debug": "debug", - "trace": "debug" - }[aLevel]; + var message = (aFormatter || _CPFormatLogMessage)(aString, aLevel, aTitle), + logger = { + "fatal": "error", + "error": "error", + "warn": "warn", + "info": "info", + "debug": "debug", + "trace": "debug" + }[aLevel]; if (logger && console[logger]) console[logger](message); diff --git a/Tests/AppKit/CPButtonTest.j b/Tests/AppKit/CPButtonTest.j index a859f69f1..eff7f75ec 100644 --- a/Tests/AppKit/CPButtonTest.j +++ b/Tests/AppKit/CPButtonTest.j @@ -41,11 +41,11 @@ [button setAction:@selector(clickMe:)]; [button setKeyEquivalent:"a"]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"b" charactersIgnoringModifiers:"b" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -57,11 +57,11 @@ [button setKeyEquivalent:"a"]; [button setKeyEquivalentModifierMask:CPAlternateKeyMask]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:CPAlternateKeyMask - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -73,12 +73,12 @@ [button setKeyEquivalent:"A"]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:CPShiftKeyMask - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"A" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } @@ -89,15 +89,15 @@ [button setAction:@selector(clickMe:)]; [button setKeyEquivalent:CPEscapeFunctionKey]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:CPDeleteCharacter charactersIgnoringModifiers:CPDeleteCharacter isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:"a" charactersIgnoringModifiers:"a" isARepeat:NO keyCode:0]]; [self assertFalse:wasClicked]; [button performKeyEquivalent:[CPEvent keyEventWithType:CPKeyUp location:CGPointMakeZero() modifierFlags:0 - timestamp:nil windowNumber:nil context:nil + timestamp:0 windowNumber:0 context:nil characters:CPEscapeFunctionKey charactersIgnoringModifiers:CPEscapeFunctionKey isARepeat:NO keyCode:0]]; [self assertTrue:wasClicked]; } diff --git a/Tests/AppKit/CPKeyEquivalentPerformance.j b/Tests/AppKit/CPKeyEquivalentPerformance.j index a6a509437..84ea9e7b1 100644 --- a/Tests/AppKit/CPKeyEquivalentPerformance.j +++ b/Tests/AppKit/CPKeyEquivalentPerformance.j @@ -34,7 +34,7 @@ [button2 setTarget:self]; [button2 setAction:@selector(clicked:)]; [button2 setKeyEquivalent:"a"]; - [button2 setKeyEquivalentModifierMask:CPAlternateKeyMask|CPCommandKeyMask]; + [button2 setKeyEquivalentModifierMask:CPAlternateKeyMask | CPCommandKeyMask]; button2.clicks = 0; [button3 setTarget:self]; @@ -45,16 +45,16 @@ var start = (new Date).getTime(); - for (var i=0; i + + +@implementation AppController : CPObject +{ +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], + contentView = [theWindow contentView]; + + var message = [[CPTextField alloc] initWithFrame:CGRectMake(10,10,1000,32)]; + [message setFont:[CPFont boldSystemFontOfSize:16.0]]; + [message setStringValue:@"Type some text in the text field and press enter. You should NOT see any new call to -setObjectValue: in the console"]; + [contentView addSubview:message]; + + var label = [[TextField alloc] initWithFrame:CGRectMake(0,0,400,22)]; + [label setPlaceholderString:@"Type some text and hit enter"]; + [label setBezeled:YES]; + [label setBezelStyle:CPTextFieldSquareBezel]; + [label setBordered:YES]; + [label setEditable:YES]; + + var oc = [[CPObjectController alloc] initWithContent:[CPDictionary dictionaryWithObject:@"" forKey:@"foo"]]; + [oc setAutomaticallyPreparesContent:YES]; + + [label bind:CPValueBinding toObject:oc withKeyPath:@"selection.foo" options:nil]; + [label setFont:[CPFont boldSystemFontOfSize:24.0]]; + [label setBackgroundColor:[CPColor greenColor]]; + [label sizeToFit]; + + [label setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin | CPViewMinYMargin | CPViewMaxYMargin]; + [label setCenter:[contentView center]]; + + [contentView addSubview:label]; + + [theWindow orderFront:self]; + + // Uncomment the following line to turn on the standard menu bar. + //[CPMenu setMenuBarVisible:YES]; +} + +@end + +@implementation TextField : CPTextField +{ +} + +- (void)setObjectValue:(id)aValue +{ + CPLogConsole(_cmd + [super objectValue] + " > " + aValue); + [self setBackgroundColor:[CPColor redColor]]; + [super setObjectValue:aValue]; +} + +@end diff --git a/Tests/Manual/CPBinder-echo-bug/Info.plist b/Tests/Manual/CPBinder-echo-bug/Info.plist new file mode 100644 index 000000000..6937aee46 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/Info.plist @@ -0,0 +1,12 @@ + + + + + CPApplicationDelegateClass + AppController + CPBundleName + CPBinder-echo-bug + CPPrincipalClass + CPApplication + + diff --git a/Tests/Manual/CPBinder-echo-bug/Jakefile b/Tests/Manual/CPBinder-echo-bug/Jakefile new file mode 100644 index 000000000..eb1b44f6f --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/Jakefile @@ -0,0 +1,93 @@ +/* + * Jakefile + * CPBinder-echo-bug + * + * Created by You on March 29, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +var ENV = require("system").env, + FILE = require("file"), + JAKE = require("jake"), + task = JAKE.task, + FileList = JAKE.FileList, + app = require("cappuccino/jake").app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", + OS = require("os"); + +app ("CPBinderEchoBug", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPBinderEchoBug.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPBinder-echo-bug"); + task.setIdentifier("com.yourcompany.CPBinderEchoBug"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPBinder-echo-bug"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", ["CPBinderEchoBug"], function() +{ + printResults(configuration); +}); + +task ("build", ["default"]); + +task ("debug", function() +{ + ENV["CONFIGURATION"] = "Debug"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("release", function() +{ + ENV["CONFIGURATION"] = "Release"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("run", ["debug"], function() +{ + OS.system(["open", FILE.join("Build", "Debug", "CPBinderEchoBug", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPBinderEchoBug", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPBinderEchoBug")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Deployment", "CPBinderEchoBug")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPBinderEchoBug")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPBinderEchoBug"), FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPBinderEchoBug", "CPBinderEchoBug.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPBinderEchoBug")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPBinder-echo-bug/Resources/spinner.gif b/Tests/Manual/CPBinder-echo-bug/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPBinder-echo-bug/Resources/spinner.gif differ diff --git a/Tests/Manual/CPBinder-echo-bug/index-debug.html b/Tests/Manual/CPBinder-echo-bug/index-debug.html new file mode 100644 index 000000000..2f3319b88 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + CPBinder-echo-bug + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBinder-echo-bug/index.html b/Tests/Manual/CPBinder-echo-bug/index.html new file mode 100644 index 000000000..2d67d3934 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPBinder-echo-bug + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPBinder-echo-bug/main.j b/Tests/Manual/CPBinder-echo-bug/main.j new file mode 100644 index 000000000..e91513816 --- /dev/null +++ b/Tests/Manual/CPBinder-echo-bug/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPBinder-echo-bug + * + * Created by You on March 29, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPImageViewAlignmentScaling/AppController.j b/Tests/Manual/CPImageViewAlignmentScaling/AppController.j new file mode 100644 index 000000000..74b4df51b --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/AppController.j @@ -0,0 +1,39 @@ +/* + * AppController.j + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ +} + +- (void)awakeFromCib +{ +} + +@end + + +@implementation MyImageView : CPImageView + +- (void)drawRect:(CGRect)aRect +{ + var path = [CPBezierPath bezierPathWithRect:[self bounds]]; + + [[CPColor greenColor] set]; + [path setLineWidth:1]; + [path stroke]; +} + +@end diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Info.plist b/Tests/Manual/CPImageViewAlignmentScaling/Info.plist new file mode 100644 index 000000000..5860761a8 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CPImageViewScaling + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Jakefile b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile new file mode 100644 index 000000000..e0f9f9845 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +var ENV = require("system").env, + FILE = require("file"), + JAKE = require("jake"), + task = JAKE.task, + FileList = JAKE.FileList, + app = require("cappuccino/jake").app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", + OS = require("os"); + +app ("CPImageViewScaling", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewScaling.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPImageViewScaling"); + task.setIdentifier("com.aparajita.CPImageViewScaling"); + task.setVersion("1.0"); + task.setAuthor("Victory-Heart Productions"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPImageViewScaling"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + task.setNib2CibFlags("-R Resources/"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", ["CPImageViewScaling"], function() +{ + printResults(configuration); +}); + +task ("build", ["default"]); + +task ("debug", function() +{ + ENV["CONFIGURATION"] = "Debug"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("release", function() +{ + ENV["CONFIGURATION"] = "Release"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("run", ["debug"], function() +{ + OS.system(["open", FILE.join("Build", "Debug", "CPImageViewScaling", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPImageViewScaling", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewScaling")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Deployment", "CPImageViewScaling")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewScaling")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewScaling"), FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPImageViewScaling", "CPImageViewScaling.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewScaling")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.cib b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.cib new file mode 100644 index 000000000..20f3b224f --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;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;D;K;6;CP$UIDd;2;17E;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;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;2;27E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;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;33E;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;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;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;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;52E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;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;2;21E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;11E;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;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;54E;E;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;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;52E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;55E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;52E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;19E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;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;18E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;57E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;58E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;59E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;60E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;61E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;21E;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;20E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;63E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;63E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;64E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;E;D;K;10;$classnameS;18;_CPCibClassSwapperK;8;$classesA;S;18;_CPCibClassSwapperS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;66E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;69E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;75E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;76E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;77E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;78E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;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;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;79E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;85E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;88E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;89E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;90E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;91E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;92E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;72E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;93E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;94E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;95E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;96E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;97E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;98E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;99E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;100E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;101E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;102E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;103E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;104E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;105E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;106E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;107E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;109E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;110E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;3;111E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;112E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;113E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;114E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;115E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;69E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;60E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;116E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;117E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;69E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;118E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;69E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;119E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;121E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;122E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;123E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;67E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;62E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;124E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;120E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;125E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;126E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;127E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;128E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;129E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;130E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;131E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;78E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;132E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;133E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;134E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;135E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;136E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;131E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;76E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;137E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;138E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;69E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;84E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;139E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;86E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;87E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;87E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;69E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;62E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;140E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;141E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;78E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;62E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;142E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;141E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;21E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;68E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;65E;K;15;$aimage-scalingD;K;6;CP$UIDd;2;62E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;62E;K;11;$aalignmentD;K;6;CP$UIDd;2;62E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;72E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;62E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;73E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;143E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;19E;E;E;S;8;delegateS;9;theWindowS;32;{10000000000000, 10000000000000}S;8;CPWindowS;23;{{104, 62}, {742, 591}}d;1;7S;16;CPImageView Testd;1;0S;20;{{0, 0}, {742, 591}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;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;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;51E;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;42E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;30E;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;E;E;S;6;normalS;20;{{58, 60}, {70, 70}}S;18;{{0, 0}, {70, 70}}d;2;36d;1;2D;K;10;$classnameS;20;_CPCibCustomResourceK;8;$classesA;S;20;_CPCibCustomResourceS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;70E;K;32;_CPCibCustomResourceClassNameKeyD;K;6;CP$UIDd;3;144E;K;35;_CPCibCustomResourceResourceNameKeyD;K;6;CP$UIDd;3;145E;K;33;_CPCibCustomResourcePropertiesKeyD;K;6;CP$UIDd;3;147E;E;d;1;4S;11;MyImageViewS;11;CPImageViewS;21;{{140, 60}, {70, 70}}d;1;1S;21;{{224, 60}, {70, 70}}d;1;3S;21;{{58, 135}, {70, 17}}S;18;{{0, 0}, {70, 17}}S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;T;S;8;top leftd;4;3072F;S;22;{{140, 135}, {70, 17}}S;3;topS;22;{{224, 135}, {70, 17}}S;9;top rightS;21;{{58, 175}, {70, 70}}S;21;{{58, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;4;leftS;22;{{140, 175}, {70, 70}}S;22;{{140, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;6;centerS;22;{{224, 175}, {70, 70}}d;1;8S;22;{{224, 250}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;5;rightS;21;{{58, 294}, {70, 70}}d;1;6S;21;{{58, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;8;bot leftS;22;{{140, 294}, {70, 70}}d;1;5S;22;{{140, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;6;bottomS;22;{{224, 294}, {70, 70}}S;22;{{224, 369}, {70, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;9;bot rightS;21;{{58, 25}, {171, 21}}S;19;{{0, 0}, {171, 21}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;150E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;84E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;9;AlignmentS;21;{{381, 60}, {70, 70}}S;22;{{381, 25}, {171, 21}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;150E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;84E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;7;ScalingS;23;{{381, 135}, {219, 17}}S;19;{{0, 0}, {219, 17}}S;30;CPImageScaleProportionallyDownS;23;{{381, 175}, {138, 70}}S;19;{{0, 0}, {138, 70}}S;23;{{381, 250}, {247, 17}}S;19;{{0, 0}, {247, 17}}D;K;6;$classD;K;6;CP$UIDd;2;82E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;148E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;149E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;87E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;87E;E;S;34;CPImageScaleProportionallyUpOrDownS;23;{{381, 294}, {138, 70}}S;23;{{381, 369}, {211, 17}}S;19;{{0, 0}, {211, 17}}S;29;CPImageScaleAxesIndependentlyS;22;{{541, 175}, {76, 31}}S;18;{{0, 0}, {76, 31}}S;21;{{541, 60}, {76, 31}}S;13;AppControllerS;7;CPImageS;7;box.pngD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;146E;K;10;CP.objectsD;K;4;sizeD;K;6;CP$UIDd;3;152E;E;E;S;17;Arial, sans-serifd;2;12d;2;16D;K;10;$classnameS;21;_CPKeyedArchiverValueK;8;$classesA;S;21;_CPKeyedArchiverValueS;7;CPValueS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;151E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;153E;E;S;24;{"width":50,"height":50}E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib new file mode 100644 index 000000000..13370dbe2 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/Resources/MainMenu.xib @@ -0,0 +1,1548 @@ + + + + 1050 + 11D50 + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSTextField + NSView + NSWindowTemplate + NSTextFieldCell + NSImageCell + NSImageView + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{104, 525}, {742, 591}} + 1946157056 + CPImageView Test + NSWindow + + + + + 256 + + YES + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + NSImage + box.png + + _NS:9 + 2 + 2 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 1 + 2 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 3 + 2 + 2 + NO + + YES + + + + 268 + {{58, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top left + + LucidaGrande + 13 + 1044 + + _NS:1505 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{140, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top + + _NS:1505 + + + + + + + + 268 + {{224, 439}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + top right + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 461}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 0 + 2 + NO + + YES + + + + 268 + {{381, 439}, {219, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleProportionallyDown + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 346}, {138, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{541, 385}, {76, 31}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{541, 500}, {76, 31}} + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 0 + 2 + NO + + YES + + + + 268 + {{381, 324}, {247, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleProportionallyUpOrDown + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{381, 227}, {138, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 1 + 2 + NO + + YES + + + + 268 + {{381, 205}, {211, 17}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + CPImageScaleAxesIndependently + + _NS:1505 + + + + + + + + 268 + {{58, 546}, {171, 19}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + Alignment + + LucidaGrande-Bold + 16 + 16 + + _NS:1505 + + + + + + + + 268 + {{381, 546}, {171, 19}} + + + + _NS:1505 + YES + + 68288064 + 4195328 + Scaling + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 4 + 2 + 2 + NO + + YES + + + + 268 + {{58, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + left + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 0 + 2 + 2 + NO + + YES + + + + 268 + {{140, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + center + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 346}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 8 + 2 + 2 + NO + + YES + + + + 268 + {{224, 324}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + right + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{58, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 6 + 2 + 2 + NO + + YES + + + + 268 + {{58, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bot left + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{140, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 5 + 2 + 2 + NO + + YES + + + + 268 + {{140, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bottom + + _NS:1505 + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{224, 227}, {70, 70}} + + + + _NS:9 + YES + + 130560 + 33554432 + + _NS:9 + 7 + 2 + 2 + NO + + YES + + + + 268 + {{224, 205}, {70, 17}} + + + + _NS:1505 + YES + + 68288064 + 138413056 + bot right + + _NS:1505 + + + + + + + {742, 591} + + + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 450 + + + + + 484 + + + YES + + + + + + 485 + + + + + 492 + + + YES + + + + + + 493 + + + + + 494 + + + YES + + + + + + 495 + + + + + 496 + + + YES + + + + + + 497 + + + + + 498 + + + YES + + + + + + 499 + + + + + 500 + + + YES + + + + + + 501 + + + + + 502 + + + YES + + + + + + 503 + + + YES + + + + + + 504 + + + + + 505 + + + + + 506 + + + YES + + + + + + 507 + + + YES + + + + + + 508 + + + + + 509 + + + + + 510 + + + YES + + + + + + 511 + + + YES + + + + + + 512 + + + + + 513 + + + + + 514 + + + YES + + + + + + 515 + + + YES + + + + + + 516 + + + YES + + + + + + 517 + + + YES + + + + + + 518 + + + YES + + + + + + 519 + + + YES + + + + + + 520 + + + + + 521 + + + + + 522 + + + + + 523 + + + + + 524 + + + + + 525 + + + + + 526 + + + YES + + + + + + 527 + + + YES + + + + + + 528 + + + + + 529 + + + + + 530 + + + YES + + + + + + 531 + + + + + 532 + + + YES + + + + + + 533 + + + + + 534 + + + YES + + + + + + 535 + + + YES + + + + + + 536 + + + + + 537 + + + + + 538 + + + YES + + + + + + 539 + + + YES + + + + + + 540 + + + + + 541 + + + + + 542 + + + YES + + + + + + 543 + + + + + 544 + + + YES + + + + + + 545 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBPluginDependency + 484.CustomClassName + 484.IBPluginDependency + 485.IBPluginDependency + 492.CustomClassName + 492.IBPluginDependency + 493.IBPluginDependency + 494.CustomClassName + 494.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 500.IBPluginDependency + 501.IBPluginDependency + 502.CustomClassName + 502.IBPluginDependency + 503.IBPluginDependency + 504.IBPluginDependency + 505.IBPluginDependency + 506.CustomClassName + 506.IBPluginDependency + 507.IBPluginDependency + 508.IBPluginDependency + 509.IBPluginDependency + 510.CustomClassName + 510.IBPluginDependency + 511.IBPluginDependency + 512.IBPluginDependency + 513.IBPluginDependency + 514.CustomClassName + 514.IBPluginDependency + 515.IBPluginDependency + 516.CustomClassName + 516.IBPluginDependency + 517.IBPluginDependency + 518.CustomClassName + 518.IBPluginDependency + 519.IBPluginDependency + 520.IBPluginDependency + 521.IBPluginDependency + 522.IBPluginDependency + 523.IBPluginDependency + 524.IBPluginDependency + 525.IBPluginDependency + 526.CustomClassName + 526.IBPluginDependency + 527.IBPluginDependency + 528.IBPluginDependency + 529.IBPluginDependency + 530.IBPluginDependency + 531.IBPluginDependency + 532.IBPluginDependency + 533.IBPluginDependency + 534.CustomClassName + 534.IBPluginDependency + 535.IBPluginDependency + 536.IBPluginDependency + 537.IBPluginDependency + 538.CustomClassName + 538.IBPluginDependency + 539.IBPluginDependency + 540.IBPluginDependency + 541.IBPluginDependency + 542.CustomClassName + 542.IBPluginDependency + 543.IBPluginDependency + 544.CustomClassName + 544.IBPluginDependency + 545.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + 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 + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + 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 + MyImageView + 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 + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + MyImageView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 545 + + + + YES + + AppController + NSObject + + IBProjectSource + ./Classes/AppController.h + + + + MyImageView + NSImageView + + IBProjectSource + ./Classes/MyImageView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + box.png + {128, 128} + + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png b/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png new file mode 100644 index 000000000..d6d1141be Binary files /dev/null and b/Tests/Manual/CPImageViewAlignmentScaling/Resources/box.png differ diff --git a/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif b/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPImageViewAlignmentScaling/Resources/spinner.gif differ diff --git a/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html b/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html new file mode 100644 index 000000000..5ef913cb9 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + CPImageViewScaling + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/index.html b/Tests/Manual/CPImageViewAlignmentScaling/index.html new file mode 100644 index 000000000..583b7fdd9 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPImageViewScaling + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewAlignmentScaling/main.j b/Tests/Manual/CPImageViewAlignmentScaling/main.j new file mode 100644 index 000000000..9d75ced79 --- /dev/null +++ b/Tests/Manual/CPImageViewAlignmentScaling/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPImageViewScaling + * + * Created by aparajita on April 12, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPImageViewTest/AppController.j b/Tests/Manual/CPImageViewTest/AppController.j index 7bf42534e..5e62e5fdf 100644 --- a/Tests/Manual/CPImageViewTest/AppController.j +++ b/Tests/Manual/CPImageViewTest/AppController.j @@ -32,8 +32,8 @@ image = CPImageInBundle("280px-1730_Homann_Map_of_Scandinavia,_Norway,_Sweden,_Denmark,_Finland_and_the_Baltics_-_Geographicus_-_Scandinavia-homann-1730.jpg", CGSizeMake(280, 240)), imageViewShadow = [[CPImageView alloc] initWithFrame:CGRectMake(320.0, 50.0, 290.0, 250.0)]; - [imageView setImageScaling:CPScaleNone]; - [imageViewShadow setImageScaling:CPScaleNone]; + [imageView setImageScaling:CPImageScaleNone]; + [imageViewShadow setImageScaling:CPImageScaleNone]; [imageView setImage:image]; [imageViewShadow setImage:image]; diff --git a/Tests/Manual/CPImageViewbindingsTest/AppController.j b/Tests/Manual/CPImageViewbindingsTest/AppController.j new file mode 100644 index 000000000..bdc431c95 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/AppController.j @@ -0,0 +1,46 @@ +/* + * AppController.j + * CPImageViewbindingsTest + * + * Created by You on March 13, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import + + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib + CPArray content @accessors; +} + +- (void)awakeFromCib +{ + content = [CPArray new]; + + var path = [[CPBundle mainBundle] pathForResource:@"images.plist"], + request = [CPURLRequest requestWithURL:path], + connection = [CPURLConnection connectionWithRequest:request delegate:self]; + + [theWindow setFullPlatformWindow:YES]; +} + +- (void)connection:(CPURLConnection)connection didReceiveData:(CPString)dataString +{ + if (!dataString) + return; + + var data = [[CPData alloc] initWithRawString:dataString], + theRows = [CPPropertyListSerialization propertyListFromData:data format:CPPropertyListXMLFormat_v1_0]; + +// Add a CPImage to the model to test CPValueBinding. + var path = [[CPBundle mainBundle] pathForResource:@"value.jpg"], + image = [[CPImage alloc] initWithContentsOfFile:path], + dict = [CPDictionary dictionaryWithObject:image forKey:@"image"]; + [theRows addObject:dict]; + + [self setContent:theRows]; +} + +@end diff --git a/Tests/Manual/CPImageViewbindingsTest/Info.plist b/Tests/Manual/CPImageViewbindingsTest/Info.plist new file mode 100644 index 000000000..78c464a7a --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/Info.plist @@ -0,0 +1,10 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CPImageViewbindingsTest + + diff --git a/Tests/Manual/CPImageViewbindingsTest/Jakefile b/Tests/Manual/CPImageViewbindingsTest/Jakefile new file mode 100644 index 000000000..6bdfbd679 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * CPImageViewbindingsTest + * + * Created by You on March 13, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +var ENV = require("system").env, + FILE = require("file"), + JAKE = require("jake"), + task = JAKE.task, + FileList = JAKE.FileList, + app = require("cappuccino/jake").app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", + OS = require("os"); + +app ("CPImageViewbindingsTest", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "CPImageViewbindingsTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CPImageViewbindingsTest"); + task.setIdentifier("com.yourcompany.CPImageViewbindingsTest"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CPImageViewbindingsTest"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + task.setNib2CibFlags("-R Resources/"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", ["CPImageViewbindingsTest"], function() +{ + printResults(configuration); +}); + +task ("build", ["default"]); + +task ("debug", function() +{ + ENV["CONFIGURATION"] = "Debug"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("release", function() +{ + ENV["CONFIGURATION"] = "Release"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("run", ["debug"], function() +{ + OS.system(["open", FILE.join("Build", "Debug", "CPImageViewbindingsTest", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "CPImageViewbindingsTest", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "CPImageViewbindingsTest")); + OS.system(["press", "-f", FILE.join("Build", "Release", "CPImageViewbindingsTest"), FILE.join("Build", "Deployment", "CPImageViewbindingsTest")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "CPImageViewbindingsTest")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "CPImageViewbindingsTest"), FILE.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "CPImageViewbindingsTest", "CPImageViewbindingsTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "CPImageViewbindingsTest")); + print("----------------------------"); +} diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.cib b/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.cib new file mode 100644 index 000000000..0578be53b --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.cib @@ -0,0 +1,4 @@ +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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;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;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;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;1;0E;D;K;6;CP$UIDd;2;37E;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;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;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;49E;D;K;6;CP$UIDd;2;51E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;35E;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;28E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;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;10E;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;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;53E;E;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;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;49E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;54E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;49E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;55E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;47E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;60E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;45E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;61E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;62E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;63E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;64E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;65E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;66E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;35E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;67E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;68E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;69E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;70E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;71E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;72E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;51E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;49E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;73E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;74E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;75E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;76E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;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;25E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;77E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;78E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;79E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;80E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;81E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;28E;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;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;83E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;83E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;84E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;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;29E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;86E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;87E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;88E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;90E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;23;CPScrollViewContentViewD;K;6;CP$UIDd;2;92E;K;29;CPScrollViewHeaderClipViewKeyD;K;6;CP$UIDd;2;93E;K;21;CPScrollViewVScrollerD;K;6;CP$UIDd;2;40E;K;21;CPScrollViewHScrollerD;K;6;CP$UIDd;2;37E;K;23;CPScrollViewVLineScrollD;K;6;CP$UIDd;2;94E;K;23;CPScrollViewVPageScrollD;K;6;CP$UIDd;2;94E;K;23;CPScrollViewHLineScrollD;K;6;CP$UIDd;2;94E;K;23;CPScrollViewHPageScrollD;K;6;CP$UIDd;2;94E;K;24;CPScrollViewHasVScrollerD;K;6;CP$UIDd;2;95E;K;24;CPScrollViewHasHScrollerD;K;6;CP$UIDd;2;95E;K;29;CPScrollViewAutohidesScrollerD;K;6;CP$UIDd;2;95E;K;25;CPScrollViewCornerViewKeyD;K;6;CP$UIDd;1;0E;K;31;CPScrollViewBottomCornerViewKeyD;K;6;CP$UIDd;2;96E;K;25;CPScrollViewBorderTypeKeyD;K;6;CP$UIDd;2;97E;K;28;CPScrollViewScrollerStyleKeyD;K;6;CP$UIDd;1;0E;K;32;CPScrollViewScrollerKnobStyleKeyD;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;31E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;92E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;98E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;98E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;92E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;100E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;101E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;12;$agrid-colorD;K;6;CP$UIDd;3;102E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;103E;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;104E;K;30;CPTableViewIntercellSpacingKeyD;K;6;CP$UIDd;3;105E;K;37;CPTableViewSelectionHighlightStyleKeyD;K;6;CP$UIDd;2;82E;K;37;CPTableViewColumnAutoresizingStyleKeyD;K;6;CP$UIDd;3;103E;K;31;CPTableViewMultipleSelectionKeyD;K;6;CP$UIDd;2;95E;K;28;CPTableViewEmptySelectionKeyD;K;6;CP$UIDd;2;95E;K;30;CPTableViewColumnReorderingKeyD;K;6;CP$UIDd;2;95E;K;28;CPTableViewColumnResizingKeyD;K;6;CP$UIDd;2;95E;K;29;CPTableViewColumnSelectionKeyD;K;6;CP$UIDd;2;95E;K;26;CPTableViewTableColumnsKeyD;K;6;CP$UIDd;3;106E;K;23;CPTableViewGridColorKeyD;K;6;CP$UIDd;3;102E;K;27;CPTableViewGridStyleMaskKeyD;K;6;CP$UIDd;1;0E;K;39;CPTableViewUsesAlternatingBackgroundKeyD;K;6;CP$UIDd;3;107E;K;34;CPTableViewAlternatingRowColorsKeyD;K;6;CP$UIDd;1;0E;K;24;CPTableViewCornerViewKeyD;K;6;CP$UIDd;3;109E;K;24;CPTableViewHeaderViewKeyD;K;6;CP$UIDd;2;39E;K;26;CPTableViewAutosaveNameKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPTableColumnK;8;$classesA;S;13;CPTableColumnS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;33E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;110E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;111E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;112E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;114E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;115E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;116E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;3;107E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;2;95E;K;28;CPSortDescriptorPrototypeKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;33E;K;26;CPTableColumnIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTableColumnWidthKeyD;K;6;CP$UIDd;3;117E;K;24;CPTableColumnMinWidthKeyD;K;6;CP$UIDd;3;111E;K;24;CPTableColumnMaxWidthKeyD;K;6;CP$UIDd;3;112E;K;26;CPTableColumnHeaderViewKeyD;K;6;CP$UIDd;3;118E;K;24;CPTableColumnDataViewKeyD;K;6;CP$UIDd;3;119E;K;28;CPTableColumnResizingMaskKeyD;K;6;CP$UIDd;3;116E;K;24;CPTableColumnIsHiddenKeyD;K;6;CP$UIDd;3;107E;K;26;CPTableColumnIsEditableKeyD;K;6;CP$UIDd;3;107E;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;36E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;120E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;121E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;122E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;82E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;30E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;124E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;103E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;82E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;125E;K;18;CPScrollerStyleKeyD;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;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;93E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;126E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;126E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;93E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;127E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;29;CPTableHeaderViewTableViewKeyD;K;6;CP$UIDd;2;32E;K;33;CPTableHeaderViewDrawsColumnLinesD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;36E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;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;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;122E;K;17;CPViewIsHiddenKeyD;K;6;CP$UIDd;3;130E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;123E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;131E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;132E;K;18;CPControlTargetKeyD;K;6;CP$UIDd;2;30E;K;18;CPControlActionKeyD;K;6;CP$UIDd;3;133E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;103E;K;21;CPScrollerControlSizeD;K;6;CP$UIDd;2;82E;K;24;CPScrollerKnobProportionD;K;6;CP$UIDd;3;134E;K;18;CPScrollerStyleKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;11;CPImageViewK;8;$classesA;S;11;CPImageViewS;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;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;135E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;136E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;116E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;82E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;103E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;82E;K;24;CPImageViewIsEditableKeyD;K;6;CP$UIDd;2;95E;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;43E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;137E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;138E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;6;$afontD;K;6;CP$UIDd;3;141E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;82E;K;11;$aalignmentD;K;6;CP$UIDd;3;103E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;95E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;142E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;107E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;82E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;103E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;144E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;136E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;15;$aimage-scalingD;K;6;CP$UIDd;3;116E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;82E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;103E;K;23;CPImageViewHasShadowKeyD;K;6;CP$UIDd;1;0E;K;28;CPImageViewImageAlignmentKeyD;K;6;CP$UIDd;2;82E;K;24;CPImageViewIsEditableKeyD;K;6;CP$UIDd;2;95E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;145E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;138E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;6;$afontD;K;6;CP$UIDd;3;146E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;82E;K;11;$aalignmentD;K;6;CP$UIDd;3;103E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;95E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;147E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;107E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;82E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;103E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;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;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;150E;K;6;$afontD;K;6;CP$UIDd;3;146E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;97E;K;11;$aalignmentD;K;6;CP$UIDd;3;103E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;95E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;151E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;95E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;95E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;95E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;3;100E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;97E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;103E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;28E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;152E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;153E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;28E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;89E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;6;$afontD;K;6;CP$UIDd;3;141E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;82E;K;11;$aalignmentD;K;6;CP$UIDd;3;103E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;95E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;154E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;107E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;107E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;82E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;3;103E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;155E;E;D;K;10;$classnameS;17;CPArrayControllerK;8;$classesA;S;17;CPArrayControllerS;18;CPObjectControllerS;12;CPControllerS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;50E;K;28;CPObjectControllerContentKeyD;K;6;CP$UIDd;1;0E;K;36;CPObjectControllerObjectClassNameKeyD;K;6;CP$UIDd;3;156E;K;31;CPObjectControllerIsEditableKeyD;K;6;CP$UIDd;2;95E;K;49;CPObjectControllerAutomaticallyPreparesContentKeyD;K;6;CP$UIDd;3;107E;K;37;CPArrayControllerAvoidsEmptySelectionD;K;6;CP$UIDd;2;95E;K;49;CPArrayControllerClearsFilterPredicateOnInsertionD;K;6;CP$UIDd;2;95E;K;41;CPArrayControllerFilterRestrictsInsertionD;K;6;CP$UIDd;2;95E;K;35;CPArrayControllerPreservesSelectionD;K;6;CP$UIDd;2;95E;K;39;CPArrayControllerSelectsInsertedObjectsD;K;6;CP$UIDd;2;95E;K;47;CPArrayControllerAlwaysUsesMultipleValuesMarkerD;K;6;CP$UIDd;3;107E;K;47;CPArrayControllerAutomaticallyRearrangesObjectsD;K;6;CP$UIDd;3;107E;E;S;13;CPApplicationD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;26E;E;E;S;8;delegateS;9;theWindowS;20;value: selection.urlS;5;valueS;13;selection.urlD;K;10;$classnameS;12;CPDictionaryK;8;$classesA;S;12;CPDictionaryS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;22;value: selection.imageS;15;selection.imageD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;23;valueURL: selection.urlS;8;valueURLD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;38;value: arrangedObjects.image.classNameS;31;arrangedObjects.image.classNameD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;26;value: arrangedObjects.urlS;19;arrangedObjects.urlD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;21;contentArray: contentS;12;contentArrayS;7;contentD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;E;E;S;32;{10000000000000, 10000000000000}S;8;CPWindowS;24;{{335, 268}, {794, 370}}d;1;7S;6;Windowd;1;0S;20;{{0, 0}, {794, 370}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;30E;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;46E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;48E;E;E;S;6;normalS;22;{{20, 29}, {381, 143}}S;20;{{0, 0}, {381, 143}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;92E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;96E;E;E;d;2;36S;10;scrollviewD;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;91E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;157E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;158E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;159E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;122E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;160E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;32E;E;D;K;6;$classD;K;6;CP$UIDd;2;91E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;161E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;162E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;163E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;122E;K;21;CPViewBackgroundColorD;K;6;CP$UIDd;3;160E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;24;CPScrollViewDocumentViewD;K;6;CP$UIDd;2;39E;E;d;2;10T;D;K;6;$classD;K;6;CP$UIDd;2;27E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;E;d;1;2S;20;{{0, 0}, {430, 125}}D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;99E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;165E;E;S;9;tableviewD;K;6;$classD;K;6;CP$UIDd;2;99E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;166E;E;d;1;4d;2;23S;6;{3, 2}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;35E;E;E;F;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;108E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;82E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;167E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;168E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;169E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;E;d;3;167d;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;3;113E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;170E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;171E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;16;$atext-alignmentD;K;6;CP$UIDd;2;82E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;172E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;146E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;173E;K;6;$afontD;K;6;CP$UIDd;3;175E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;103E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;97E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;15;$acontent-insetD;K;6;CP$UIDd;3;177E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;151E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;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;3;103E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;82E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;151E;E;d;1;3d;3;257D;K;6;$classD;K;6;CP$UIDd;3;113E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;178E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;171E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;K;16;$atext-alignmentD;K;6;CP$UIDd;2;82E;K;38;_CPTableColumnHeaderViewStringValueKeyD;K;6;CP$UIDd;3;179E;K;32;_CPTableColumnHeaderViewImageKeyD;K;6;CP$UIDd;1;0E;K;31;_CPTableColumnHeaderViewFontKeyD;K;6;CP$UIDd;3;146E;E;D;K;6;$classD;K;6;CP$UIDd;2;43E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;139E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;173E;K;6;$afontD;K;6;CP$UIDd;3;180E;K;17;$aline-break-modeD;K;6;CP$UIDd;3;103E;K;20;$avertical-alignmentD;K;6;CP$UIDd;2;97E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;15;$acontent-insetD;K;6;CP$UIDd;3;181E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;151E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;3;143E;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;3;103E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;82E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;3;151E;E;S;19;{{1, 1}, {379, 15}}S;19;{{0, 0}, {379, 15}}d;1;8S;8;scrollerS;29;_horizontalScrollerDidScroll:f;18;0.8813953488372093S;19;{{0, 0}, {430, 23}}S;14;tableHeaderRowS;22;{{224, 24}, {15, 102}}S;19;{{0, 0}, {15, 102}}d;11;-2147483648S;17;disabled+verticald;2;37S;27;_verticalScrollerDidScroll:f;18;0.1947367936372757S;23;{{421, 26}, {201, 149}}S;20;{{0, 0}, {201, 149}}S;23;{{637, 29}, {149, 131}}S;20;{{0, 0}, {149, 131}}S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;140E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;182E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;183E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;107E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;107E;E;S;27;Editable +CPValueURLBinding.d;4;3072S;24;{{421, 188}, {201, 149}}S;24;{{637, 191}, {149, 131}}D;K;6;$classD;K;6;CP$UIDd;3;140E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;182E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;183E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;107E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;107E;E;S;24;Editable +CPValueBinding.S;22;{{14, 257}, {389, 29}}S;19;{{0, 0}, {389, 29}}S;19;bezeled+placeholderS;0;S;22;{{17, 206}, {387, 51}}S;19;{{0, 0}, {387, 51}}S;85;Image URL selection +Change to 'Resources/value.jpg' or an absolute url and hit enter.S;13;AppControllerS;19;CPMutableDictionaryS;20;{{1, 1}, {379, 125}}S;20;{{0, 0}, {379, 125}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;E;E;D;K;6;$classD;K;6;CP$UIDd;2;99E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;184E;E;S;21;{{1, 126}, {379, 17}}S;19;{{0, 0}, {379, 17}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;E;E;S;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;185E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;185E;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;185E;E;E;S;20;{{224, 0}, {16, 23}}S;18;{{0, 0}, {16, 23}}S;10;cornerviewD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;188E;E;E;S;12;columnHeaderS;9;Image URLS;11;placeholderD;K;10;$classnameS;17;_CPThemeAttributeK;8;$classesA;S;17;_CPThemeAttributeS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;174E;K;4;nameD;K;6;CP$UIDd;3;189E;K;12;defaultValueD;K;6;CP$UIDd;3;146E;K;6;valuesD;K;6;CP$UIDd;3;190E;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;176E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;191E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;192E;E;E;S;7;CPImageD;K;6;$classD;K;6;CP$UIDd;3;174E;K;4;nameD;K;6;CP$UIDd;3;189E;K;12;defaultValueD;K;6;CP$UIDd;3;146E;K;6;valuesD;K;6;CP$UIDd;3;193E;E;D;K;6;$classD;K;6;CP$UIDd;3;176E;K;15;CPValueValueKeyD;K;6;CP$UIDd;3;191E;E;S;17;Arial, sans-serifd;2;12D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;185E;D;K;6;CP$UIDd;3;185E;E;E;d;1;1f;3;0.5D;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;187E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;114E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;114E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;194E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;E;S;4;fontD;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;195E;K;6;normalD;K;6;CP$UIDd;3;146E;E;E;S;39;{"top":0,"right":5,"bottom":0,"left":5}D;K;6;$classD;K;6;CP$UIDd;3;187E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;3;118E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;164E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;164E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;3;118E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;194E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;85E;E;D;K;6;$classD;K;6;CP$UIDd;2;59E;K;10;CP.objectsD;K;21;selectedTableDataViewD;K;6;CP$UIDd;3;195E;K;6;normalD;K;6;CP$UIDd;3;146E;E;E;d;2;18D;K;6;$classD;K;6;CP$UIDd;3;140E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;182E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;183E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;95E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;107E;E;E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.xib b/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.xib new file mode 100644 index 000000000..01a07c8b2 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/Resources/MainMenu.xib @@ -0,0 +1,905 @@ + + + + 1050 + 11D50 + 2427 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2427 + + + YES + NSScroller + NSArrayController + NSTableHeaderView + NSScrollView + NSTextFieldCell + NSImageView + NSImageCell + NSTableView + NSCustomObject + NSView + NSWindowTemplate + NSTableColumn + NSTextField + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{335, 390}, {794, 370}} + 1946157056 + Window + NSWindow + + + + + 256 + + YES + + + 268 + + YES + + + 2304 + + YES + + + 256 + {430, 125} + + + + _NS:13 + YES + + + 256 + {430, 17} + + + + _NS:16 + + + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:19 + + + YES + + 167 + 40 + 1000 + + 75497536 + 2048 + Image URL + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337696320 + 2048 + Text Cell + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + YES + + + + 257 + 40 + 1000 + + 75584576 + 2048 + CPImage + + + + + + 337728576 + 2048 + Text Cell + + + + + + 3 + YES + + + + 3 + 2 + + 3 + MQA + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + -566231040 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 17}, {379, 125}} + + + + _NS:11 + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:58 + + _doScroller: + 37 + 0.1947367936372757 + + + + 256 + {{1, 127}, {379, 15}} + + + + _NS:60 + YES + 1 + + _doScroller: + 0.88139534883720927 + + + + 2304 + + YES + + + {{1, 0}, {379, 17}} + + + + _NS:15 + + + 4 + + + {{20, 198}, {381, 143}} + + + + _NS:9 + 133810 + + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{421, 195}, {201, 149}} + + + + _NS:9 + YES + + 270532608 + 0 + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + {{637, 210}, {149, 131}} + + + + _NS:9 + {250, 750} + YES + + 67108864 + 272629760 + RWRpdGFibGUKQ1BWYWx1ZVVSTEJpbmRpbmcuA + + LucidaGrande + 13 + 16 + + _NS:9 + + + 6 + System + controlColor + + + + + + + + 268 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{421, 33}, {201, 149}} + + + + _NS:9 + YES + + 270532608 + 0 + _NS:9 + 0 + 3 + 2 + NO + + YES + + + + 268 + {{637, 48}, {149, 131}} + + + + _NS:9 + {250, 750} + YES + + 67108864 + 272629760 + RWRpdGFibGUKQ1BWYWx1ZUJpbmRpbmcuA + + _NS:9 + + + + + + + + 268 + {{20, 87}, {381, 22}} + + + + _NS:9 + YES + + -1804599231 + 272630784 + + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + + + 6 + System + textColor + + + + + + + 268 + {{17, 113}, {387, 51}} + + + + _NS:1505 + YES + + 67239424 + 272629760 + SW1hZ2UgVVJMIHNlbGVjdGlvbgpDaGFuZ2UgdG8gJ1Jlc291cmNlcy92YWx1ZS5qcGcnIG9yIGFuIGFi +c29sdXRlIHVybCBhbmQgaGl0IGVudGVyLg + + _NS:1505 + + + + + + + {794, 370} + + + + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + YES + + + AppController + + + YES + + YES + YES + YES + YES + YES + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + contentArray: content + + + + + + contentArray: content + contentArray + content + 2 + + + 490 + + + + value: arrangedObjects.url + + + + + + value: arrangedObjects.url + value + arrangedObjects.url + 2 + + + 474 + + + + value: arrangedObjects.image.className + + + + + + value: arrangedObjects.image.className + value + arrangedObjects.image.className + 2 + + + 505 + + + + valueURL: selection.url + + + + + + valueURL: selection.url + valueURL + selection.url + 2 + + + 479 + + + + value: selection.image + + + + + + value: selection.image + value + selection.image + 2 + + + 503 + + + + value: selection.url + + + + + + value: selection.url + value + selection.url + 2 + + + 511 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + + + + 450 + + + + + 460 + + + + + 461 + + + YES + + + + + + + + + 462 + + + YES + + + + + + + 463 + + + + + 464 + + + + + 465 + + + + + 466 + + + YES + + + + + + 467 + + + YES + + + + + + 468 + + + + + 469 + + + + + 470 + + + YES + + + + + + 471 + + + + + 495 + + + YES + + + + + + 496 + + + + + 497 + + + YES + + + + + + 498 + + + YES + + + + + + 499 + + + + + 500 + + + + + 506 + + + YES + + + + + + 507 + + + + + 508 + + + YES + + + + + + 509 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBPluginDependency + 464.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 468.IBPluginDependency + 469.IBPluginDependency + 470.IBPluginDependency + 471.IBPluginDependency + 495.IBPluginDependency + 496.IBPluginDependency + 497.IBPluginDependency + 498.IBPluginDependency + 499.IBPluginDependency + 500.IBPluginDependency + 506.IBPluginDependency + 507.IBPluginDependency + 508.IBPluginDependency + 509.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + 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 + + + + YES + + + + + + YES + + + + + 511 + + + + YES + + AppController + NSObject + + IBProjectSource + ./Classes/AppController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/images.plist b/Tests/Manual/CPImageViewbindingsTest/Resources/images.plist new file mode 100644 index 000000000..783ab3d40 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/Resources/images.plist @@ -0,0 +1,10 @@ + + + + + + url + Resources/valueURL.jpg + + + diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/spinner.gif b/Tests/Manual/CPImageViewbindingsTest/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/CPImageViewbindingsTest/Resources/spinner.gif differ diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/value.jpg b/Tests/Manual/CPImageViewbindingsTest/Resources/value.jpg new file mode 100644 index 000000000..b4fc056fc Binary files /dev/null and b/Tests/Manual/CPImageViewbindingsTest/Resources/value.jpg differ diff --git a/Tests/Manual/CPImageViewbindingsTest/Resources/valueURL.jpg b/Tests/Manual/CPImageViewbindingsTest/Resources/valueURL.jpg new file mode 100644 index 000000000..d766dd08f Binary files /dev/null and b/Tests/Manual/CPImageViewbindingsTest/Resources/valueURL.jpg differ diff --git a/Tests/Manual/CPImageViewbindingsTest/index-debug.html b/Tests/Manual/CPImageViewbindingsTest/index-debug.html new file mode 100644 index 000000000..9781012c7 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/index-debug.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + CPImageViewbindingsTest + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewbindingsTest/index.html b/Tests/Manual/CPImageViewbindingsTest/index.html new file mode 100644 index 000000000..6ff6852a4 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + CPImageViewbindingsTest + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/CPImageViewbindingsTest/main.j b/Tests/Manual/CPImageViewbindingsTest/main.j new file mode 100644 index 000000000..d22fd17d4 --- /dev/null +++ b/Tests/Manual/CPImageViewbindingsTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CPImageViewbindingsTest + * + * Created by You on March 13, 2012. + * Copyright 2012, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CPTabViewNib/AppController.j b/Tests/Manual/CPTabViewNib/AppController.j index 7ae195f31..6767a0328 100644 --- a/Tests/Manual/CPTabViewNib/AppController.j +++ b/Tests/Manual/CPTabViewNib/AppController.j @@ -42,4 +42,9 @@ CPLogConsole(_cmd + [tabViewItem label]); } +- (void)tabView:(CPTabView)aTabView shouldSelectTabViewItem:(CPTabViewItem)tabViewItem +{ + return [tabViewItem identifier] != @"unselectable"; +} + @end diff --git a/Tests/Manual/CPTabViewNib/Resources/MainMenu.cib b/Tests/Manual/CPTabViewNib/Resources/MainMenu.cib index 7d7a71a3b..38f9dbd0a 100644 --- a/Tests/Manual/CPTabViewNib/Resources/MainMenu.cib +++ b/Tests/Manual/CPTabViewNib/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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;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;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;30E;D;K;6;CP$UIDd;2;32E;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;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;27E;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;2;35E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;11E;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;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;44E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;45E;E;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;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;46E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;43E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;47E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;43E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;29E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;46E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;46E;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;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;35E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;39E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;42E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;43E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;44E;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;51E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;52E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;53E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;54E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;55E;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;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;57E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;57E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;58E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;59E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;E;D;K;10;$classnameS;9;CPTabViewK;8;$classesA;S;9;CPTabViewS;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;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;61E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;62E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;63E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;K;17;CPTabViewItemsKeyD;K;6;CP$UIDd;2;64E;K;16;CPTabViewTypeKeyD;K;6;CP$UIDd;2;56E;K;16;CPTabViewFontKeyD;K;6;CP$UIDd;2;66E;K;20;CPTabViewDelegateKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;67E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;62E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;68E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;69E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;K;17;CPTabViewItemsKeyD;K;6;CP$UIDd;2;70E;K;24;CPTabViewSelectedItemKeyD;K;6;CP$UIDd;2;36E;K;16;CPTabViewTypeKeyD;K;6;CP$UIDd;2;56E;K;16;CPTabViewFontKeyD;K;6;CP$UIDd;2;66E;K;20;CPTabViewDelegateKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPTabViewItemK;8;$classesA;S;13;CPTabViewItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;26;CPTabViewItemIdentifierKeyD;K;6;CP$UIDd;2;71E;K;21;CPTabViewItemLabelKeyD;K;6;CP$UIDd;2;72E;K;20;CPTabViewItemViewKeyD;K;6;CP$UIDd;2;33E;K;23;CPTabViewItemAuxViewKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;73E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;74E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;75E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;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;34E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;33E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;76E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;77E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;33E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;78E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;79E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;K;6;$afontD;K;6;CP$UIDd;2;80E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;56E;K;11;$aalignmentD;K;6;CP$UIDd;2;56E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;81E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;82E;K;19;CPSliderMinValueKeyD;K;6;CP$UIDd;2;56E;K;19;CPSliderMaxValueKeyD;K;6;CP$UIDd;2;83E;K;23;CPSliderAltIncrValueKeyD;K;6;CP$UIDd;2;56E;E;D;K;6;$classD;K;6;CP$UIDd;2;31E;K;26;CPTabViewItemIdentifierKeyD;K;6;CP$UIDd;2;84E;K;21;CPTabViewItemLabelKeyD;K;6;CP$UIDd;2;85E;K;20;CPTabViewItemViewKeyD;K;6;CP$UIDd;2;37E;K;23;CPTabViewItemAuxViewKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;30E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;86E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;74E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;87E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;30E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;88E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;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;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;89E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;90E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;78E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;91E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;92E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;93E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;94E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;95E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;94E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;94E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;94E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;98E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;93E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;82E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;99E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;100E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;101E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;91E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;60E;K;6;$afontD;K;6;CP$UIDd;2;66E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;93E;K;11;$aalignmentD;K;6;CP$UIDd;2;82E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;94E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;102E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;96E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;3;103E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;3;103E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;3;103E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;93E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;82E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;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;41E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;56E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;104E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;105E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;101E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;3;106E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;107E;K;6;$afontD;K;6;CP$UIDd;3;108E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;56E;K;11;$aalignmentD;K;6;CP$UIDd;2;93E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;56E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;82E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;3;109E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;3;103E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;2;93E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;56E;K;24;CPButtonPeriodicDelayKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonPeriodicIntervalKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;110E;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;8;delegateS;10;nibTabViewS;15;nibTabViewEmptyS;20;takeDoubleValueFrom:S;11;changeView:S;32;{10000000000000, 10000000000000}S;8;CPWindowS;23;{{110, 71}, {950, 390}}d;2;15S;6;Windowd;1;0S;20;{{0, 0}, {950, 390}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;42E;E;E;d;2;18S;6;normalS;22;{{478, 6}, {454, 344}}S;20;{{0, 0}, {454, 344}}d;2;51D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;65E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;111E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;112E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;103E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;103E;E;S;21;{{13, 6}, {454, 344}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;37E;E;E;d;2;54D;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;36E;E;E;S;1;1S;3;TabS;22;{{10, 33}, {434, 298}}S;20;{{0, 0}, {434, 298}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;35E;E;E;S;21;{{164, 34}, {96, 21}}S;18;{{0, 0}, {96, 21}}d;2;45S;6;sliderD;K;6;$classD;K;6;CP$UIDd;2;65E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;113E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;112E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;3;103E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;103E;E;d;2;50d;1;4d;3;100S;1;2S;4;ViewS;22;{{10, 13}, {434, 298}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;E;E;d;1;8S;22;{{163, 26}, {104, 29}}S;19;{{0, 0}, {104, 29}}S;9;textfieldS;19;bezeled+placeholderd;1;2T;S;0;d;4;3072D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;97E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;114E;E;S;23;{{594, 359}, {222, 17}}S;19;{{0, 0}, {222, 17}}d;2;13S;33;A Tab View Item Sould be SelectedF;S;23;{{157, 356}, {162, 24}}S;19;{{0, 0}, {162, 24}}S;6;buttonS;8;borderedD;K;6;$classD;K;6;CP$UIDd;2;65E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;111E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;112E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;94E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;3;103E;E;S;20;Replace Current ViewS;13;AppControllerS;17;Arial, sans-serifd;2;12S;9;HelveticaD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;115E;D;K;6;CP$UIDd;3;115E;E;E;d;1;1E;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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;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;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;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;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;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;45E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;34E;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;34E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;11E;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;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;46E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;47E;E;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;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;45E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;49E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;45E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;29E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;50E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;34E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;29E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;48E;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;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;39E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;42E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;51E;E;D;K;6;$classD;K;6;CP$UIDd;2;20E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;33E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;45E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;52E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;46E;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;53E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;54E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;55E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;56E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;57E;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;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;59E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;59E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;60E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;E;D;K;10;$classnameS;9;CPTabViewK;8;$classesA;S;9;CPTabViewS;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;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;63E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;64E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;65E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;K;17;CPTabViewItemsKeyD;K;6;CP$UIDd;2;66E;K;16;CPTabViewTypeKeyD;K;6;CP$UIDd;2;58E;K;16;CPTabViewFontKeyD;K;6;CP$UIDd;2;68E;K;20;CPTabViewDelegateKeyD;K;6;CP$UIDd;1;0E;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;30E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;69E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;70E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;71E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;72E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;K;6;$afontD;K;6;CP$UIDd;2;68E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;74E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;75E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;76E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;77E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;78E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;78E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;78E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;74E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;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;32E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;79E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;80E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;71E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;81E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;82E;K;6;$afontD;K;6;CP$UIDd;2;83E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;58E;K;11;$aalignmentD;K;6;CP$UIDd;2;73E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;58E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;74E;K;16;CPButtonTitleKeyD;K;6;CP$UIDd;2;84E;K;25;CPButtonAlternateTitleKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonAllowsMixedStateKeyD;K;6;CP$UIDd;2;78E;K;32;CPButtonImageDimsWhenDisabledKeyD;K;6;CP$UIDd;1;0E;K;24;CPButtonImagePositionKeyD;K;6;CP$UIDd;2;73E;K;28;CPButtonKeyEquivalentMaskKeyD;K;6;CP$UIDd;2;58E;K;24;CPButtonPeriodicDelayKeyD;K;6;CP$UIDd;1;0E;K;27;CPButtonPeriodicIntervalKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;27E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;85E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;64E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;86E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;27E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;87E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;K;17;CPTabViewItemsKeyD;K;6;CP$UIDd;2;88E;K;24;CPTabViewSelectedItemKeyD;K;6;CP$UIDd;2;43E;K;16;CPTabViewTypeKeyD;K;6;CP$UIDd;2;58E;K;16;CPTabViewFontKeyD;K;6;CP$UIDd;2;68E;K;20;CPTabViewDelegateKeyD;K;6;CP$UIDd;1;0E;E;D;K;10;$classnameS;13;CPTabViewItemK;8;$classesA;S;13;CPTabViewItemS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;26;CPTabViewItemIdentifierKeyD;K;6;CP$UIDd;2;89E;K;21;CPTabViewItemLabelKeyD;K;6;CP$UIDd;2;90E;K;20;CPTabViewItemViewKeyD;K;6;CP$UIDd;2;37E;K;23;CPTabViewItemAuxViewKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;91E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;92E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;93E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;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;38E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;37E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;94E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;95E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;37E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;96E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;97E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;K;6;$afontD;K;6;CP$UIDd;2;98E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;58E;K;11;$aalignmentD;K;6;CP$UIDd;2;58E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;99E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;74E;K;19;CPSliderMinValueKeyD;K;6;CP$UIDd;2;58E;K;19;CPSliderMaxValueKeyD;K;6;CP$UIDd;3;100E;K;23;CPSliderAltIncrValueKeyD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;26;CPTabViewItemIdentifierKeyD;K;6;CP$UIDd;3;101E;K;21;CPTabViewItemLabelKeyD;K;6;CP$UIDd;3;102E;K;20;CPTabViewItemViewKeyD;K;6;CP$UIDd;2;41E;K;23;CPTabViewItemAuxViewKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;91E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;92E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;3;103E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;30E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;41E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;104E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;3;105E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;41E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;96E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;72E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;3;106E;K;6;$afontD;K;6;CP$UIDd;2;68E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;73E;K;11;$aalignmentD;K;6;CP$UIDd;2;74E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;75E;K;17;CPControlValueKeyD;K;6;CP$UIDd;3;107E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;77E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;75E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;75E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;75E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;3;109E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;73E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;74E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;35E;K;26;CPTabViewItemIdentifierKeyD;K;6;CP$UIDd;1;0E;K;21;CPTabViewItemLabelKeyD;K;6;CP$UIDd;3;110E;K;20;CPTabViewItemViewKeyD;K;6;CP$UIDd;2;44E;K;23;CPTabViewItemAuxViewKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;34E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;58E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;3;111E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;92E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;34E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;3;112E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;3;113E;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;8;delegateS;10;nibTabViewS;15;nibTabViewEmptyS;20;takeDoubleValueFrom:S;11;changeView:S;32;{10000000000000, 10000000000000}S;8;CPWindowS;23;{{110, 71}, {950, 390}}d;2;15S;6;Windowd;1;0S;20;{{0, 0}, {950, 390}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;E;E;d;2;18S;6;normalS;22;{{478, 6}, {454, 344}}S;20;{{0, 0}, {454, 344}}d;2;51D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;67E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;114E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;115E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;78E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;78E;E;S;23;{{594, 359}, {222, 17}}S;19;{{0, 0}, {222, 17}}d;2;13S;9;textfieldd;1;2d;1;4T;S;33;A Tab View Item Sould be Selectedd;4;3072F;S;23;{{157, 356}, {162, 24}}S;19;{{0, 0}, {162, 24}}S;6;buttonS;8;borderedD;K;6;$classD;K;6;CP$UIDd;2;67E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;114E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;115E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;75E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;78E;E;S;20;Replace Current ViewS;21;{{13, 6}, {454, 344}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;44E;E;E;d;2;54D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;40E;E;E;S;1;1S;3;TabS;22;{{10, 33}, {434, 298}}S;20;{{0, 0}, {434, 298}}D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;39E;E;E;S;21;{{164, 34}, {96, 21}}S;18;{{0, 0}, {96, 21}}d;2;45S;6;sliderD;K;6;$classD;K;6;CP$UIDd;2;67E;K;13;CPFontNameKeyD;K;6;CP$UIDd;3;116E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;3;115E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;78E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;78E;E;d;2;50d;3;100S;12;unselectableS;14;Not SelectableD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;42E;E;E;S;22;{{163, 26}, {104, 29}}S;19;{{0, 0}, {104, 29}}S;19;bezeled+placeholderS;0;D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;3;108E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;3;117E;E;S;4;ViewS;22;{{10, 13}, {434, 298}}d;1;8S;13;AppControllerS;17;Arial, sans-serifd;2;12S;9;HelveticaD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;118E;D;K;6;CP$UIDd;3;118E;E;E;d;1;1E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/CPTabViewNib/Resources/MainMenu.xib b/Tests/Manual/CPTabViewNib/Resources/MainMenu.xib index 1296a347b..22f32b7e1 100644 --- a/Tests/Manual/CPTabViewNib/Resources/MainMenu.xib +++ b/Tests/Manual/CPTabViewNib/Resources/MainMenu.xib @@ -63,6 +63,7 @@ {{13, 40}, {454, 344}} + YES @@ -77,6 +78,7 @@ 301 {{164, 243}, {96, 21}} + YES -2080244224 @@ -100,6 +102,7 @@ {{10, 33}, {434, 298}} + Tab @@ -113,11 +116,24 @@
- - 2 - + + 256 + {{10, 33}, {434, 298}} + + + + + View + + + + + unselectable + + + 256 YES @@ -125,8 +141,6 @@ 301 {{169, 246}, {96, 22}} - - YES -1804468671 @@ -161,23 +175,21 @@ {{10, 33}, {434, 298}} - - - View + Not Selectable - + 0 YES YES YES - + @@ -200,7 +212,7 @@ {{594, 14}, {222, 17}} - + _NS:3944 YES @@ -225,6 +237,7 @@ {{153, 4}, {174, 32}} + _NS:687 YES @@ -360,9 +373,9 @@ YES - + @@ -378,6 +391,7 @@ YES + @@ -481,6 +495,20 @@ + + 488 + + + YES + + + + + + 489 + + + @@ -509,6 +537,8 @@ 476.IBPluginDependency 479.IBPluginDependency 480.IBPluginDependency + 488.IBPluginDependency + 489.IBPluginDependency YES @@ -534,6 +564,8 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -548,7 +580,7 @@ - 487 + 489 diff --git a/Tests/Manual/TableTest/GroupRowTest/AppController.j b/Tests/Manual/TableTest/GroupRowTest/AppController.j index 143770c52..c2b57e6f8 100644 --- a/Tests/Manual/TableTest/GroupRowTest/AppController.j +++ b/Tests/Manual/TableTest/GroupRowTest/AppController.j @@ -29,7 +29,7 @@ [tableView setDataSource:self]; var iconView = [[CPImageView alloc] initWithFrame:CGRectMake(16,16,0,0)]; - [iconView setImageScaling:CPScaleNone]; + [iconView setImageScaling:CPImageScaleNone]; var iconColumn = [[CPTableColumn alloc] initWithIdentifier:"icons"]; [iconColumn setWidth:32.0]; [iconColumn setMinWidth:32.0]; @@ -69,7 +69,7 @@ [tableView setDataSource:self]; var iconView = [[CPImageView alloc] initWithFrame:CGRectMake(16,16,0,0)]; - [iconView setImageScaling:CPScaleNone]; + [iconView setImageScaling:CPImageScaleNone]; var iconColumn = [[CPTableColumn alloc] initWithIdentifier:"icons"]; [iconColumn setWidth:32.0]; [iconColumn setMinWidth:32.0]; diff --git a/Tests/Manual/TableTest/OldTest/AppController.j b/Tests/Manual/TableTest/OldTest/AppController.j index fdf246160..c72f7746e 100644 --- a/Tests/Manual/TableTest/OldTest/AppController.j +++ b/Tests/Manual/TableTest/OldTest/AppController.j @@ -46,7 +46,7 @@ tableTestDragType = @"CPTableViewTestDragType"; [tableView setDataSource:self]; var iconView = [[CPImageView alloc] initWithFrame:CGRectMake(16, 16, 0, 0)]; - [iconView setImageScaling:CPScaleNone]; + [iconView setImageScaling:CPImageScaleNone]; var iconColumn = [[CPTableColumn alloc] initWithIdentifier:"icons"]; [iconColumn setWidth:32.0]; [iconColumn setMinWidth:32.0]; diff --git a/Tests/Manual/UserlandNSTest/AppController.j b/Tests/Manual/UserlandNSTest/AppController.j new file mode 100644 index 000000000..233355184 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/AppController.j @@ -0,0 +1,36 @@ +/* + * AppController.j + * UserlandNSTest + * + * Created by aparajita on April 11, 2012. + * Copyright 2012, The Cappuccino Foundation. All rights reserved. + */ + +@import +@import "BorderView.j" + +@implementation AppController : CPObject +{ + CPWindow theWindow; //this "outlet" is connected automatically by the Cib + @outlet CPTextField field1 @accessors(readonly); +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ +} + +- (void)awakeFromCib +{ +} + +- (void)setInitialResponderByTag:(CPInteger)tag +{ + CPLog("setInitialFirstResponder:%d", tag); + [theWindow setInitialFirstResponder:[[theWindow contentView] viewWithTag:tag]]; +} + +- (void)setValue:(id)value forUndefinedKey:(CPString)key +{ + CPLog("setValue:" + value + " forKey:" + key); +} +@end diff --git a/Tests/Manual/UserlandNSTest/BorderView.j b/Tests/Manual/UserlandNSTest/BorderView.j new file mode 100644 index 000000000..3328dafe1 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/BorderView.j @@ -0,0 +1,97 @@ +/* + * BorderView.j + * UserlandNSTest + * + * Created by aparajita on April 11, 2012. + * Copyright 2012, The Cappuccino Foundation. All rights reserved. + */ + +@import +@import + +BorderViewDefaultBorderWidth = 1.0; +BorderViewDefaultBorderColor = nil; + + +@implementation BorderView : CPView +{ + int borderWidth @accessors; + CPColor borderColor @accessors; +} + ++ (void)initialize +{ + BorderViewDefaultBorderColor = [CPColor colorWithHexString:@"0000ff"]; +} + +- (id)initWithFrame:(CGRect)aFrame +{ + self = [super initWithFrame:aFrame]; + + if (self) + { + borderWidth = BorderViewDefaultBorderWidth; + borderColor = BorderViewDefaultBorderColor; + } + + return self; +} + +- (void)setBorderWidth:(int)width +{ + if (width === borderWidth) + return; + + borderWidth = width; + [self setNeedsDisplay:YES]; +} + +- (void)setBorderColorWithHexString:(CPString)aColor +{ + CPLog("setBorderColorWithHexString:%s", aColor); + + var hexString = [borderColor hexString] || @""; + + if (aColor.toLowerCase() === hexString.toLowerCase()) + return; + + borderColor = [CPColor colorWithHexString:aColor]; + [self setNeedsDisplay:YES]; +} + +- (void)drawRect:(CGRect)dirtyRect +{ + var path = [CPBezierPath bezierPathWithRect:CGRectInset([self bounds], borderWidth / 2.0, borderWidth / 2.0)]; + + [path setLineWidth:borderWidth]; + [borderColor set]; + [path stroke]; +} + +@end + +var BorderViewBorderWidthKey = @"BorderViewBorderWidthKey", + BorderViewBorderColorKey = @"BorderViewBorderColorKey"; + +@implementation BorderView (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + self = [super initWithCoder:aCoder]; + + if (self) + { + borderWidth = [aCoder decodeIntForKey:BorderViewBorderWidthKey]; + borderColor = [aCoder decodeObjectForKey:BorderViewBorderColorKey]; + } + + return self; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [aCoder encodeInt:borderWidth forKey:BorderViewBorderWidthKey]; + [aCoder encodeObject:borderColor forKey:BorderViewBorderColorKey]; +} + +@end diff --git a/Tests/Manual/UserlandNSTest/Info.plist b/Tests/Manual/UserlandNSTest/Info.plist new file mode 100644 index 000000000..a7fc026c7 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/Info.plist @@ -0,0 +1,14 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + UserlandNSTest + IBClasses + + BorderView + + + diff --git a/Tests/Manual/UserlandNSTest/Jakefile b/Tests/Manual/UserlandNSTest/Jakefile new file mode 100644 index 000000000..8ad13a6fa --- /dev/null +++ b/Tests/Manual/UserlandNSTest/Jakefile @@ -0,0 +1,94 @@ +/* + * Jakefile + * UserlandNSTest + * + * Created by aparajita on April 11, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +var ENV = require("system").env, + FILE = require("file"), + JAKE = require("jake"), + task = JAKE.task, + FileList = JAKE.FileList, + app = require("cappuccino/jake").app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", + OS = require("os"); + +app ("UserlandNSTest", function(task) +{ + task.setBuildIntermediatesPath(FILE.join("Build", "UserlandNSTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("UserlandNSTest"); + task.setIdentifier("com.aparajita.UserlandNSTest"); + task.setVersion("1.0"); + task.setAuthor("Victory-Heart Productions"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("UserlandNSTest"); + task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + task.setNib2CibFlags("-R Resources/"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", ["UserlandNSTest"], function() +{ + printResults(configuration); +}); + +task ("build", ["default"]); + +task ("debug", function() +{ + ENV["CONFIGURATION"] = "Debug"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("release", function() +{ + ENV["CONFIGURATION"] = "Release"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("run", ["debug"], function() +{ + OS.system(["open", FILE.join("Build", "Debug", "UserlandNSTest", "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", "UserlandNSTest", "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", "UserlandNSTest")); + OS.system(["press", "-f", FILE.join("Build", "Release", "UserlandNSTest"), FILE.join("Build", "Deployment", "UserlandNSTest")]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", "UserlandNSTest")); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "UserlandNSTest"), FILE.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", "UserlandNSTest", "UserlandNSTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, "UserlandNSTest")); + print("----------------------------"); +} diff --git a/Tests/Manual/UserlandNSTest/NS_BorderView.j b/Tests/Manual/UserlandNSTest/NS_BorderView.j new file mode 100644 index 000000000..96ef693a2 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/NS_BorderView.j @@ -0,0 +1,40 @@ +/* + * BorderView.j + * UserlandNSTest + * + * Created by aparajita on April 11, 2012. + * Copyright 2012, The Cappuccino Foundation. All rights reserved. + */ + +@import "BorderView.j" + +@implementation BorderView (NSCoding) + +- (id)NS_initWithCoder:(CPCoder)aCoder +{ + self = [super NS_initWithCoder:aCoder]; + + if (self) + { + borderWidth = BorderViewDefaultBorderWidth; + borderColor = BorderViewDefaultBorderColor; + } + + return self; +} + +@end + +@implementation NS_BorderView : BorderView + ++ (Class)classForKeyedArchiver +{ + return [BorderView class]; +} + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [self NS_initWithCoder:aCoder]; +} + +@end diff --git a/Tests/Manual/UserlandNSTest/Resources/MainMenu.cib b/Tests/Manual/UserlandNSTest/Resources/MainMenu.cib new file mode 100644 index 000000000..8c521e059 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/Resources/MainMenu.cib @@ -0,0 +1,5 @@ +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;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;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;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;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;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;1;0E;D;K;6;CP$UIDd;2;30E;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;33E;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;1;0E;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;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;11E;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;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;37E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;38E;E;D;K;10;$classnameS;31;CPCibRuntimeAttributesConnectorK;8;$classesA;S;31;CPCibRuntimeAttributesConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;1;0E;K;40;CPCibRuntimeAttributesConnectorObjectKeyD;K;6;CP$UIDd;2;36E;K;42;CPCibRuntimeAttributesConnectorKeyPathsKeyD;K;6;CP$UIDd;2;39E;K;40;CPCibRuntimeAttributesConnectorValuesKeyD;K;6;CP$UIDd;2;40E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;1;0E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;1;0E;K;40;CPCibRuntimeAttributesConnectorObjectKeyD;K;6;CP$UIDd;2;30E;K;42;CPCibRuntimeAttributesConnectorKeyPathsKeyD;K;6;CP$UIDd;2;41E;K;40;CPCibRuntimeAttributesConnectorValuesKeyD;K;6;CP$UIDd;2;42E;E;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;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;36E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;43E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;32E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;44E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;23E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;45E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;37E;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;46E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;47E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;48E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;49E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;50E;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;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;52E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;52E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;53E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;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;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;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;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;58E;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;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;59E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;60E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;51E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;66E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;68E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;51E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;26E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;69E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;56E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;28;_CPCibCustomViewClassNameKeyD;K;6;CP$UIDd;2;58E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;70E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;60E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;51E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;71E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;68E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;51E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;72E;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;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;75E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;76E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;77E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;65E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;65E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;65E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;79E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;76E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;76E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;80E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;74E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;75E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;76E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;77E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;65E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;65E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;65E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;2;79E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;76E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;81E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;82E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;76E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;83E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;68E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;76E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;28E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;51E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;84E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;85E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;57E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;61E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;54E;K;6;$afontD;K;6;CP$UIDd;2;63E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;76E;K;11;$aalignmentD;K;6;CP$UIDd;2;64E;K;35;CPControlSendsActionOnEndEditingKeyD;K;6;CP$UIDd;2;65E;K;17;CPControlValueKeyD;K;6;CP$UIDd;2;86E;K;24;CPControlSendActionOnKeyD;K;6;CP$UIDd;2;67E;K;24;CPTextFieldIsEditableKeyD;K;6;CP$UIDd;2;68E;K;26;CPTextFieldIsSelectableKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldDrawsBackgroundKeyD;K;6;CP$UIDd;2;68E;K;29;CPTextFieldBackgroundColorKeyD;K;6;CP$UIDd;1;0E;K;27;CPTextFieldLineBreakModeKeyD;K;6;CP$UIDd;2;76E;K;23;CPTextFieldAlignmentKeyD;K;6;CP$UIDd;2;64E;K;31;CPTextFieldPlaceholderStringKeyD;K;6;CP$UIDd;1;0E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;87E;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;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;88E;D;K;6;CP$UIDd;2;89E;D;K;6;CP$UIDd;2;90E;E;E;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;91E;D;K;6;CP$UIDd;2;92E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;93E;D;K;6;CP$UIDd;2;94E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;95E;D;K;6;CP$UIDd;2;96E;E;E;S;8;delegateS;6;field1S;9;theWindowS;32;{10000000000000, 10000000000000}S;8;CPWindowS;23;{{145, 79}, {428, 398}}d;1;7S;40;Runtime Attributes & Userland NS Classesd;1;0S;20;{{0, 0}, {428, 398}}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;29E;D;K;6;CP$UIDd;2;30E;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;E;E;S;6;normalS;22;{{220, 34}, {163, 96}}S;19;{{0, 0}, {163, 96}}d;2;36S;10;BorderViewS;21;{{32, 42}, {183, 88}}S;19;{{0, 0}, {183, 88}}S;9;textfieldD;K;10;$classnameS;6;CPFontK;8;$classesA;S;6;CPFontS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;62E;K;13;CPFontNameKeyD;K;6;CP$UIDd;2;97E;K;13;CPFontSizeKeyD;K;6;CP$UIDd;2;98E;K;15;CPFontIsBoldKeyD;K;6;CP$UIDd;2;68E;K;17;CPFontIsItalicKeyD;K;6;CP$UIDd;2;68E;E;d;1;4T;S;44;Default: +borderWidth: 1 +borderColor: #0000ffd;4;3072F;S;23;{{220, 156}, {163, 96}}S;22;{{32, 164}, {183, 88}}S;43;Custom: +borderWidth: 6 +borderColor: #006600d;1;1S;23;{{276, 297}, {104, 29}}S;19;{{0, 0}, {104, 29}}S;19;bezeled+placeholderd;1;2S;0;D;K;10;$classnameS;7;CPColorK;8;$classesA;S;7;CPColorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;78E;K;20;CPColorComponentsKeyD;K;6;CP$UIDd;2;99E;E;S;23;{{276, 338}, {104, 29}}S;22;{{32, 301}, {220, 17}}S;19;{{0, 0}, {220, 17}}S;32;Ordinarily this would have focusS;22;{{32, 342}, {234, 17}}S;19;{{0, 0}, {234, 17}}S;37;This gets focus via runtime attributeS;13;AppControllerS;21;initialResponderByTagS;16;undefinedKeyPathS;18;field1.stringValueS;4;oopsS;8;runtime!S;11;borderWidthS;24;borderColorWithHexStringd;1;6S;6;006600S;17;Arial, sans-serifd;2;12D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;72E;E;E;E;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E; \ No newline at end of file diff --git a/Tests/Manual/UserlandNSTest/Resources/MainMenu.xib b/Tests/Manual/UserlandNSTest/Resources/MainMenu.xib new file mode 100644 index 000000000..422ecd035 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/Resources/MainMenu.xib @@ -0,0 +1,593 @@ + + + + 1050 + 11D50 + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + YES + NSCustomView + NSTextField + NSWindowTemplate + NSView + NSTextFieldCell + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + 7 + 2 + {{145, 701}, {428, 398}} + 1946157056 + Runtime Attributes & Userland NS Classes + NSWindow + + + + + 256 + + YES + + + 268 + {{220, 268}, {163, 96}} + + + + _NS:9 + BorderView + + + + 268 + {{32, 268}, {183, 88}} + + + + _NS:1505 + YES + + 67239424 + 272629760 + RGVmYXVsdDoKYm9yZGVyV2lkdGg6IDEKYm9yZGVyQ29sb3I6ICMwMDAwZmY + + LucidaGrande + 13 + 1044 + + _NS:1505 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + + + + 268 + {{220, 146}, {163, 96}} + + + + _NS:9 + BorderView + + + + 268 + {{32, 146}, {183, 88}} + + + + _NS:1505 + YES + + 67239424 + 272629760 + Q3VzdG9tOgpib3JkZXJXaWR0aDogNgpib3JkZXJDb2xvcjogIzAwNjYwMA + + _NS:1505 + + + + + + + + 268 + {{282, 75}, {96, 22}} + + + + _NS:9 + 1 + YES + + -1804468671 + 272630784 + + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + + + + 268 + {{282, 34}, {96, 22}} + + + _NS:9 + 2 + YES + + -1804468671 + 272630784 + + + _NS:9 + + YES + + + + + + + 268 + {{32, 80}, {220, 17}} + + + + _NS:1505 + YES + + 68288064 + 272630784 + Ordinarily this would have focus + + _NS:1505 + + + + + + + + 268 + {{32, 39}, {234, 17}} + + + + _NS:1505 + YES + + 68288064 + 272630784 + This gets focus via runtime attribute + + _NS:1505 + + + + + + + {428, 398} + + + + + {{0, 0}, {1920, 1178}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + + YES + + + delegate + + + + 451 + + + + theWindow + + + + 459 + + + + field1 + + + + 474 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 371 + + + YES + + + + + + 372 + + + YES + + + + + + + + + + + + + 450 + + + + + 460 + + + + + 461 + + + YES + + + + + + 462 + + + + + 463 + + + + + 464 + + + YES + + + + + + 465 + + + + + 466 + + + YES + + + + + + 467 + + + + + 468 + + + YES + + + + + + 469 + + + + + 470 + + + YES + + + + + + 471 + + + + + 472 + + + YES + + + + + + 473 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 371.IBAttributePlaceholdersKey + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 372.IBPluginDependency + 450.IBAttributePlaceholdersKey + 450.IBPluginDependency + 460.IBPluginDependency + 461.IBPluginDependency + 462.IBPluginDependency + 463.IBAttributePlaceholdersKey + 463.IBPluginDependency + 464.IBPluginDependency + 465.IBPluginDependency + 466.IBPluginDependency + 467.IBPluginDependency + 468.IBPluginDependency + 469.IBPluginDependency + 470.IBPluginDependency + 471.IBPluginDependency + 472.IBPluginDependency + 473.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + + + + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + com.apple.InterfaceBuilder.CocoaPlugin + + IBUserDefinedRuntimeAttributesPlaceholderName + + IBUserDefinedRuntimeAttributesPlaceholderName + + + YES + + com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.number + initialResponderByTag + + + + com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.string + undefinedKeyPath + oops + + + com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.string + field1.stringValue + runtime! + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBUserDefinedRuntimeAttributesPlaceholderName + + IBUserDefinedRuntimeAttributesPlaceholderName + + + YES + + com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.number + borderWidth + + + + com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.string + borderColorWithHexString + 006600 + + + + + 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 + + + + YES + + + + + + YES + + + + + 474 + + + + YES + + AppController + NSObject + + field1 + NSTextField + + + field1 + + field1 + NSTextField + + + + IBProjectSource + ./Classes/AppController.h + + + + BorderView + NSView + + IBProjectSource + ./Classes/BorderView.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/Tests/Manual/UserlandNSTest/Resources/spinner.gif b/Tests/Manual/UserlandNSTest/Resources/spinner.gif new file mode 100644 index 000000000..06dbc2bc2 Binary files /dev/null and b/Tests/Manual/UserlandNSTest/Resources/spinner.gif differ diff --git a/Tests/Manual/UserlandNSTest/index-debug.html b/Tests/Manual/UserlandNSTest/index-debug.html new file mode 100644 index 000000000..042c48ad1 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/index-debug.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + UserlandNSTest + + + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/UserlandNSTest/index.html b/Tests/Manual/UserlandNSTest/index.html new file mode 100644 index 000000000..7fcf231e5 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/index.html @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + UserlandNSTest + + + + + + + + + + + + +
+
+ + + +
+
+ + + diff --git a/Tests/Manual/UserlandNSTest/main.j b/Tests/Manual/UserlandNSTest/main.j new file mode 100644 index 000000000..c33b3d10d --- /dev/null +++ b/Tests/Manual/UserlandNSTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * UserlandNSTest + * + * Created by aparajita on April 11, 2012. + * Copyright 2012, Victory-Heart Productions All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/UserlandNSTest/nib2cib.conf b/Tests/Manual/UserlandNSTest/nib2cib.conf new file mode 100644 index 000000000..4a3968309 --- /dev/null +++ b/Tests/Manual/UserlandNSTest/nib2cib.conf @@ -0,0 +1 @@ +-v -v diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index bb1196b01..ffe2d1cab 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -125,8 +125,8 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification return; [self stopEventStream]; - - NSArray *pathsToWatch = [NSArray arrayWithObject:aPath]; + + NSMutableArray *pathsToWatch = [NSMutableArray arrayWithObject:aPath]; void *appPointer = (void *)self; FSEventStreamContext context = {0, appPointer, NULL, NULL, NULL}; CFTimeInterval latency = 2.0; @@ -143,6 +143,24 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification flags = kFSEventStreamCreateFlagUseCFTypes; } + // add symlinked directories + NSArray *fileList = [fm contentsOfDirectoryAtPath:aPath error:nil]; + + for (NSString *node in fileList) + { + NSDictionary *attributes = [fm attributesOfItemAtPath:aPath error:nil]; + if ([[attributes objectForKey:@"NSFileType"] isEqualTo:NSFileTypeDirectory]) + { + NSString *subDirectoryPath = [aPath stringByAppendingPathComponent:node]; + NSString *symlinkDestination = [fm destinationOfSymbolicLinkAtPath:subDirectoryPath error:nil]; + + if (symlinkDestination) + { + [pathsToWatch addObject:subDirectoryPath]; + } + } + } + stream = FSEventStreamCreate(NULL, &fsevents_callback, &context, (CFArrayRef) pathsToWatch, [lastEventId unsignedLongLongValue], latency, flags); @@ -568,6 +586,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification [ignoredFilePaths addObject:@"*/Frameworks/*"]; [ignoredFilePaths addObject:@"*/.xCodeSupport/*"]; [ignoredFilePaths addObject:@"*/Build/*"]; + [ignoredFilePaths addObject:@"*/NS_*.j"]; NSLog(@"Ignoring file paths: %@", ignoredFilePaths); } diff --git a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj index b33b98e2d..18ea9cb55 100644 --- a/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj +++ b/Tools/XcodeCapp/XcodeCapp.xcodeproj/project.pbxproj @@ -17,7 +17,6 @@ 027D999F13696A7000D3DB13 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E01A91E0DE9EED20008BB35 /* AppController.m */; }; 027D99A113696A7000D3DB13 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; 027D99A213696A7000D3DB13 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E01A8DD0DE51A7C0008BB35 /* CoreServices.framework */; }; - 027FE49A1462C6CF00B1AB92 /* help.rtfd in Resources */ = {isa = PBXBuildFile; fileRef = 027FE4991462C6CF00B1AB92 /* help.rtfd */; }; 027FE49D1462D74C00B1AB92 /* TNXCodeCapp.m in Sources */ = {isa = PBXBuildFile; fileRef = 027FE49C1462D74C00B1AB92 /* TNXCodeCapp.m */; }; 027FE4BA1462F64E00B1AB92 /* xcodecapp-icon-working.png in Resources */ = {isa = PBXBuildFile; fileRef = 027FE4B91462F64E00B1AB92 /* xcodecapp-icon-working.png */; }; 027FE4BD1462F7EB00B1AB92 /* FSEventCallback.m in Sources */ = {isa = PBXBuildFile; fileRef = 027FE4BC1462F7EB00B1AB92 /* FSEventCallback.m */; }; @@ -48,7 +47,6 @@ 026F3B6413866E7D00EE5B83 /* xcodecapp-icon-active.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "xcodecapp-icon-active.png"; sourceTree = ""; }; 027D9989136969DD00D3DB13 /* XcodeCapp.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XcodeCapp.pch; sourceTree = ""; }; 027D99A613696A7000D3DB13 /* XcodeCapp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XcodeCapp.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 027FE4991462C6CF00B1AB92 /* help.rtfd */ = {isa = PBXFileReference; lastKnownFileType = wrapper.rtfd; path = help.rtfd; sourceTree = ""; }; 027FE49B1462D74C00B1AB92 /* TNXCodeCapp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TNXCodeCapp.h; sourceTree = ""; }; 027FE49C1462D74C00B1AB92 /* TNXCodeCapp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TNXCodeCapp.m; sourceTree = ""; }; 027FE4B91462F64E00B1AB92 /* xcodecapp-icon-working.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "xcodecapp-icon-working.png"; sourceTree = ""; }; @@ -156,7 +154,6 @@ children = ( 022BCEA61468632000B72910 /* project.pbxproj.sample */, 027FE4B91462F64E00B1AB92 /* xcodecapp-icon-working.png */, - 027FE4991462C6CF00B1AB92 /* help.rtfd */, 026F3B6413866E7D00EE5B83 /* xcodecapp-icon-active.png */, 026F3B6113866B0B00EE5B83 /* xcodecapp-icon-inactive.png */, 024A041113699D6800DCBE4D /* parser.j */, @@ -236,7 +233,6 @@ 02998CEB1369BF7D006C73DB /* Growl Registration Ticket.growlRegDict in Resources */, 026F3B6213866B0B00EE5B83 /* xcodecapp-icon-inactive.png in Resources */, 026F3B6513866E7D00EE5B83 /* xcodecapp-icon-active.png in Resources */, - 027FE49A1462C6CF00B1AB92 /* help.rtfd in Resources */, 027FE4BA1462F64E00B1AB92 /* xcodecapp-icon-working.png in Resources */, 0289AC9414668CAF003CD975 /* XcodeCapp.icns in Resources */, 022BCEA71468632000B72910 /* project.pbxproj.sample in Resources */, diff --git a/Tools/XcodeCapp/help.rtfd/TXT.rtf b/Tools/XcodeCapp/help.rtfd/TXT.rtf index f697f651c..23be8a208 100644 --- a/Tools/XcodeCapp/help.rtfd/TXT.rtf +++ b/Tools/XcodeCapp/help.rtfd/TXT.rtf @@ -1,4 +1,4 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230 +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf320 {\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fswiss\fcharset0 Helvetica;\f2\fmodern\fcharset0 Courier; } {\colortbl;\red255\green255\blue255;} @@ -149,6 +149,7 @@ Note that in addition to whatever patterns you specify (if any), XcodeCapp */Frameworks/*\ */.xCodeSupport/*\ */Build/*\ +*/NS_*.j\ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural \f0 \cf0 \ diff --git a/Tools/dump_theme/Jakefile b/Tools/dump_theme/Jakefile index eac854343..1256aabaf 100644 --- a/Tools/dump_theme/Jakefile +++ b/Tools/dump_theme/Jakefile @@ -5,7 +5,6 @@ var FILE = require("file"), SYSTEM = require("system"), path = FILE.Path(FILE.join(SYSTEM.prefix, "bin", "dump_theme")); -FILE.copy("dump_theme", path); -path.chmod(0755); - +sudo(["cp", "-f", "dump_theme", path]); +sudo(["chmod", "755", path]); copyManPage("dump_theme", 1); diff --git a/Tools/nib2cib/Converter.j b/Tools/nib2cib/Converter.j index be2a1b346..654c5dd0a 100644 --- a/Tools/nib2cib/Converter.j +++ b/Tools/nib2cib/Converter.j @@ -40,18 +40,16 @@ ConverterConversionException = @"ConverterConversionException"; @implementation Converter : CPObject { - CPString inputPath @accessors(readonly); - CPString outputPath @accessors; - CPString resourcesPath @accessors; - NibFormat format @accessors(readonly); - CPArray themes @accessors(readonly); + CPString inputPath @accessors(readonly); + CPString outputPath @accessors; + CPString resourcesPath @accessors; + NibFormat format @accessors(readonly); + CPArray themes @accessors(readonly); + CPArray userNSClasses @accessors; } + (Converter)sharedConverter { - if (!SharedConverter) - SharedConverter = [[Converter alloc] init]; - return SharedConverter; } @@ -61,6 +59,7 @@ ConverterConversionException = @"ConverterConversionException"; if (self) { + SharedConverter = self; inputPath = aPath; format = nibFormat; themes = themeList; diff --git a/Tools/nib2cib/NSClassSwapper.j b/Tools/nib2cib/NSClassSwapper.j index ecf733f2d..91e26c765 100644 --- a/Tools/nib2cib/NSClassSwapper.j +++ b/Tools/nib2cib/NSClassSwapper.j @@ -1,3 +1,26 @@ +/* + * NSClassSwapper.j + * nib2cib + * + * Created by Francisco Tolmasky + * Copyright 2009, 280 North, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import "Converter.j" var NSClassSwapperClassNames = {}, NSClassSwapperOriginalClassNames = {}; @@ -16,15 +39,38 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey", if (!swapperClass) { - var originalClass = objj_lookUpClass(anOriginalClassName); + // If this is a userland NS class, call its KVC methods directly + var nsClass = nil; + + if ([[[Converter sharedConverter] userNSClasses] containsObject:aClassName]) + nsClass = objj_lookUpClass("NS_" + aClassName); + + var originalClass = nsClass || objj_lookUpClass(anOriginalClassName); swapperClass = objj_allocateClassPair(originalClass, swapperClassName); objj_registerClassPair(swapperClass); + /* + When calling userland KVC methods, they should think that the class is + the NS class (not the swapper class) so that they are in their userland space, + not in AppKit space. For example, this ensures that bundleForClass:[self class] will work correctly. + We can accomplish this safely by changing the class of self temporarily and sending directly + to self instead of to super. This swizzle is safe because NSClassSwapper and _CPCibClassSwapper + do not add any ivars. + */ + class_addMethod(swapperClass, @selector(initWithCoder:), function(self, _cmd, aCoder) { - self = objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder); + if (nsClass) + { + // Switch to userland temporarily + self.isa = nsClass; + self = objj_msgSend(self, _cmd, aCoder); + self.isa = swapperClass; + } + else + self = objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder); if (self) { @@ -44,9 +90,26 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey", class_addMethod(swapperClass, @selector(encodeWithCoder:), function(self, _cmd, aCoder) { - objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder); + if (nsClass) + { + // Switch to userland temporarily + self.isa = nsClass; + objj_msgSend(self, _cmd, aCoder); + self.isa = swapperClass; + } + else + objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder); + + // If this is a custom NS class, lookup its archiver class so that + // the correct class is swapped during unarchiving. + if (nsClass) + { + var classForArchiver = objj_msgSend(nsClass, "classForKeyedArchiver"); + + if (classForArchiver) + aClassName = [classForArchiver className]; + } - // FIXME: map class name as well? [aCoder encodeObject:aClassName forKey:_CPCibClassSwapperClassNameKey]; [aCoder encodeObject:CP_NSMapClassName(anOriginalClassName) forKey:_CPCibClassSwapperOriginalClassNameKey]; }, ""); diff --git a/Tools/nib2cib/NSFoundation.j b/Tools/nib2cib/NSFoundation.j index 06699e3b8..ab58be02a 100644 --- a/Tools/nib2cib/NSFoundation.j +++ b/Tools/nib2cib/NSFoundation.j @@ -27,5 +27,6 @@ @import "NSExpression.j" @import "NSFormatter.j" @import "NSMutableString.j" +@import "NSNull.j" @import "NSNumberFormatter.j" @import "NSSet.j" diff --git a/Tools/nib2cib/NSImageView.j b/Tools/nib2cib/NSImageView.j index 2856172ee..157ac3201 100644 --- a/Tools/nib2cib/NSImageView.j +++ b/Tools/nib2cib/NSImageView.j @@ -83,13 +83,6 @@ NSImageFrameGrayBezel = 2; NSImageFrameGroove = 3; NSImageFrameButton = 4; -var NSImageScalingToCPImageScaling = {}; - -NSImageScalingToCPImageScaling[NSImageScaleProportionallyDown] = CPScaleProportionally; -NSImageScalingToCPImageScaling[NSImageScaleAxesIndependently] = CPScaleToFit; -NSImageScalingToCPImageScaling[NSImageScaleNone] = CPScaleNone; -NSImageScalingToCPImageScaling[NSImageScaleProportionallyUpOrDown] = CPScaleProportionally; - @implementation NSImageCell : NSCell { BOOL _animates @accessors; @@ -106,7 +99,7 @@ NSImageScalingToCPImageScaling[NSImageScaleProportionallyUpOrDown] = CPScalePro { _animates = [aCoder decodeBoolForKey:@"NSAnimates"]; _imageAlignment = [aCoder decodeIntForKey:@"NSAlign"]; - _imageScaling = NSImageScalingToCPImageScaling[[aCoder decodeIntForKey:@"NSScale"]]; + _imageScaling = [aCoder decodeIntForKey:@"NSScale"]; _frameStyle = [aCoder decodeIntForKey:@"NSStyle"]; } diff --git a/Tools/nib2cib/NSNibConnector.j b/Tools/nib2cib/NSNibConnector.j index bea8769fa..17f29e76b 100644 --- a/Tools/nib2cib/NSNibConnector.j +++ b/Tools/nib2cib/NSNibConnector.j @@ -23,6 +23,7 @@ @import @import @import +@import NIB_CONNECTION_EQUIVALENCY_TABLE = {}; @@ -53,7 +54,8 @@ NIB_CONNECTION_EQUIVALENCY_TABLE = {}; _destination = NIB_CONNECTION_EQUIVALENCY_TABLE[destinationUID]; } - CPLog.debug(@"NSNibConnector: connection: " + [_source description] + " " + [_destination description] + " " + _label); + if (_source && _destination) + CPLog.debug(@"NSNibConnector: connection: " + [_source description] + " " + [_destination description] + " " + _label); } return self; @@ -167,3 +169,47 @@ var NSTransformers = [CPSet setWithObjects: } @end + +@implementation CPCibRuntimeAttributesConnector (NSCoding) + +- (id)NS_initWithCoder:(CPCoder)aCoder +{ + self = [super NS_initWithCoder:aCoder]; + + if (self) + { + _source = [aCoder decodeObjectForKey:@"NSObject"]; + _keyPaths = [aCoder decodeObjectForKey:@"NSKeyPaths"]; + _values = [aCoder decodeObjectForKey:@"NSValues"]; + + var count = [_keyPaths count]; + + CPLog.debug(@"NSNibConnector: runtime attributes connector: " + [_source description]); + + while (count--) + { + var value = _values[count], + type = typeof(value) === "boolean" ? "BOOL" : [value className]; + + CPLog.debug(@" %s (%s): %s", _keyPaths[count], type, value); + } + } + + return self; +} + +@end + +@implementation NSIBUserDefinedRuntimeAttributesConnector : CPCibRuntimeAttributesConnector + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [self NS_initWithCoder:aCoder]; +} + +- (Class)classForKeyedArchiver +{ + return [CPCibRuntimeAttributesConnector class]; +} + +@end diff --git a/Tools/nib2cib/NSNull.j b/Tools/nib2cib/NSNull.j new file mode 100644 index 000000000..6a5be5b0a --- /dev/null +++ b/Tools/nib2cib/NSNull.j @@ -0,0 +1,37 @@ +/* + * NSNull.j + * nib2cib + * + * Created by Aparajita Fishman. + * Copyright 2012 The Cappuccino Foundation. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@import + +@implementation NSNull : CPNull + +- (id)initWithCoder:(CPCoder)aCoder +{ + return [CPNull null]; +} + +- (Class)classForKeyedArchiver +{ + return [CPNull class]; +} + +@end diff --git a/Tools/nib2cib/NSView.j b/Tools/nib2cib/NSView.j index 25b86fcdd..743068b30 100644 --- a/Tools/nib2cib/NSView.j +++ b/Tools/nib2cib/NSView.j @@ -68,6 +68,7 @@ var NSViewAutoresizingMask = 0x3F, _isHidden = vFlags & NSViewHiddenMask; _opacity = 1.0;//[aCoder decodeIntForKey:CPViewOpacityKey]; + _themeClass = [self themeClass]; _themeAttributes = {}; _themeState = CPThemeStateNormal; [self _loadThemeAttributes]; diff --git a/Tools/nib2cib/Nib2Cib.j b/Tools/nib2cib/Nib2Cib.j new file mode 100644 index 000000000..424570cb5 --- /dev/null +++ b/Tools/nib2cib/Nib2Cib.j @@ -0,0 +1,952 @@ +/* + * Nib2Cib.j + * nib2cib + * + * Created by Francisco Tolmasky and Aparajita Fishman. + * Copyright 2008, 280 North, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +@import +@import +@import + +@import "NSFoundation.j" +@import "NSAppKit.j" + +@import "Nib2CibKeyedUnarchiver.j" +@import "Converter.j" + +var FILE = require("file"), + OS = require("os"), + SYS = require("system"), + FileList = require("jake").FileList, + stream = require("narwhal/term").stream, + StaticResource = require("objective-j").StaticResource, + + DefaultTheme = "Aristo", + BuildTypes = ["Debug", "Release"], + DefaultFile = "MainMenu", + AllowedStoredOptionsRe = new RegExp("^(defaultTheme|auxThemes|verbosity|quiet|frameworks|format)$"); + ArgsRe = /"[^\"]+"|'[^\']+'|\S+/g; + + +@implementation Nib2Cib : CPObject +{ + CPArray commandLineArgs; + JSObject parser; + JSObject nibInfo; + CPString appDirectory; + CPString resourcesDirectory; + CPDictionary infoPlist; + CPArray userNSClasses; +} + +- (id)initWithArgs:(CPArray)theArgs +{ + self = [super init]; + + if (self) + { + commandLineArgs = theArgs; + parser = new (require("narwhal/args").Parser)(); + nibInfo = {}; + appDirectory = @""; + resourcesDirectory = @""; + infoPlist = [CPDictionary dictionary]; + userNSClasses = []; + } + + return self; +} + +- (void)run +{ + try + { + var options = [self parseOptionsFromArgs:commandLineArgs]; + + [self setLogLevel:options.quiet ? -1 : options.verbosity]; + + if (options.watch) + [self watchWithOptions:options]; + else + [self convertWithOptions:options inputFile:nil]; + } + catch (anException) + { + CPLog.fatal([self exceptionReason:anException]); + OS.exit(1); + } +} + +- (BOOL)convertWithOptions:(JSObject)options inputFile:(CPString)inputFile +{ + try + { + inputFile = inputFile || [self getInputFile:options.args]; + + [self getAppAndResourceDirectoriesFromInputFile:inputFile options:options]; + + if (options.readStoredOptions) + { + options = [self mergeOptionsWithStoredOptions:options inputFile:inputFile]; + [self setLogLevel:options.quiet ? -1 : options.verbosity]; + } + + if (!options.quiet && options.verbosity > 0) + [self printVersion]; + + var outputFile = [self getOutputFileFromInputFile:inputFile args:options.args], + configInfo = [self readConfigFile:options.configFile || @"" inputFile:inputFile]; + + infoPlist = configInfo.plist; + + if (infoPlist) + { + var systemFontFace = [infoPlist valueForKey:@"CPSystemFontFace"]; + + if (systemFontFace) + [CPFont setSystemFontFace:systemFontFace]; + + var systemFontSize = [infoPlist valueForKey:@"CPSystemFontSize"]; + + if (systemFontSize) + [CPFont setSystemFontSize:parseFloat(systemFontSize, 10)]; + } + + var themeList = [self getThemeList:options], + themes = [self loadThemesFromList:themeList]; + + CPLog.info("\n-------------------------------------------------------------"); + CPLog.info("Input : " + inputFile); + CPLog.info("Output : " + outputFile); + CPLog.info("Format : " + ["Auto", "Mac", "iPhone"][options.format]); + CPLog.info("Application : " + appDirectory); + CPLog.info("Resources : " + resourcesDirectory); + CPLog.info("Frameworks : " + (options.frameworks || "")); + CPLog.info("Default theme : " + themeList[0]); + CPLog.info("Aux themes : " + themeList.slice(1).join(", ")); + CPLog.info("Config file : " + (configInfo.path || "")); + CPLog.info("System Font : " + [CPFont systemFontSize] + "px " + [CPFont systemFontFace]); + CPLog.info("-------------------------------------------------------------\n"); + + var converter = [[Converter alloc] initWithInputPath:inputFile + format:options.format + themes:themes]; + + [converter setOutputPath:outputFile]; + [converter setResourcesPath:resourcesDirectory]; + + var loadFrameworksCallback = function() + { + [self loadNSClassesFromBundle:[CPBundle mainBundle]]; + [converter setUserNSClasses:userNSClasses]; + [converter convert]; + }; + + [self loadFrameworks:options.frameworks verbosity:options.verbosity callback:loadFrameworksCallback]; + + return YES; + } + catch (anException) + { + CPLog.fatal([self exceptionReason:anException]); + return NO; + } +} + +- (void)watchWithOptions:(JSObject)options +{ + var verbosity = options.quiet ? -1 : options.verbosity, + watchDir = options.args[0]; + + if (!watchDir) + watchDir = FILE.canonical(FILE.isDirectory("Resources") ? "Resources" : "."); + else + { + watchDir = FILE.canonical(watchDir); + + if (FILE.basename(watchDir) !== "Resources") + { + var path = FILE.join(watchDir, "Resources"); + + if (FILE.isDirectory(path)) + watchDir = path; + } + } + + if (!FILE.isDirectory(watchDir)) + [self failWithMessage:@"Cannot find the directory: " + watchDir]; + + // Turn on info messages + [self setLogLevel:1]; + + var nibs = new FileList(FILE.join(watchDir, "*.[nx]ib")).items(), + count = nibs.length; + + // First time through only IB files with no corresponding cib + // or a cib with an earlier or equal mtime are converted. + while (count--) + { + var nib = nibs[count], + cib = nib.substr(0, nib.length - 4) + ".cib"; + + if (FILE.exists(cib) && (FILE.mtime(nib) - FILE.mtime(cib)) <= 0) + nibInfo[nib] = FILE.mtime(nib); + } + + CPLog.info("Watching: " + CPLogColorize(watchDir, "debug")); + CPLog.info("Press Control-C to stop..."); + + while (true) + { + var modifiedNibs = [self getModifiedNibsInDirectory:watchDir]; + + for (var i = 0; i < modifiedNibs.length; ++i) + { + var action = modifiedNibs[i][0], + nib = modifiedNibs[i][1], + label = action === "add" ? "Added" : "Modified", + level = action === "add" ? "info" : "debug"; + + CPLog.info(">> %s: %s", CPLogColorize(label, level), nib); + + // Don't convert an add if there is an existing cib with a later mtime + if (action === "add") + { + var cib = nib.substr(0, nib.length - 4) + ".cib"; + + if (FILE.exists(cib) && (FILE.mtime(nib) - FILE.mtime(cib)) < 0) + continue; + } + + // Let the converter log however the user configured it + [self setLogLevel:verbosity]; + + var success = [self convertWithOptions:options inputFile:nib]; + + [self setLogLevel:1]; + + if (success) + { + if (verbosity > 0) + stream.print(); + else + CPLog.warn("Conversion successful"); + } + } + + OS.sleep(1); + } +} + +- (JSObject)parseOptionsFromArgs:(CPArray)theArgs +{ + parser.usage("[--watch DIRECTORY] [INPUT_FILE [OUTPUT_FILE]]"); + + parser.option("--watch", "watch") + .set(true) + .help("Ask nib2cib to watch a directory for changes"); + + parser.option("-R", "resourcesDir") + .set() + .displayName("directory") + .help("Set the Resources directory, usually unnecessary as it is inferred from the input path"); + + parser.option("--default-theme", "defaultTheme") + .set() + .displayName("name") + .help("Specify a custom default theme which is not set in your Info.plist"); + + parser.option("-t", "--theme", "auxThemes") + .push() + .displayName("name") + .help("An additional theme loaded dynamically by your application"); + + parser.option("--config", "configFile") + .set() + .displayName("path") + .help("A path to an Info.plist file from which the system font and/or size can be retrieved"); + + parser.option("-v", "--verbose", "verbosity") + .inc() + .help("Increase verbosity level"); + + parser.option("-q", "--quiet", "quiet") + .set(true) + .help("No output"); + + parser.option("-F", "--framework", "frameworks") + .push() + .help("Add a framework to load"); + + parser.option("--no-stored-options", "readStoredOptions") + .set(false) + .def(true) + .help("Do not read stored options"); + + parser.option("--mac", "format") + .set(NibFormatMac) + .def(NibFormatUndetermined) + .help("Set format to Mac"); + + parser.option("--version", "showVersion") + .action(function() { [self printVersionAndExit]; }) + .help("Show the version of nib2cib and quit"); + + parser.helpful(); + + var options = parser.parse(theArgs, null, null, true); + + if (options.args.length > 2) + { + parser.printUsage(options); + OS.exit(0); + } + + return options; +} + +- (JSObject)mergeOptionsWithStoredOptions:(JSObject)options inputFile:(CPString)inputFile +{ + // We have to clone options + var userOptions = [self readStoredOptionsAtPath:FILE.join(SYS.env["HOME"], ".nib2cibconfig")], + appOptions = [self readStoredOptionsAtPath:FILE.join(appDirectory, "nib2cib.conf")], + filename = FILE.basename(inputFile, FILE.extension(inputFile)) + ".conf", + fileOptions = [self readStoredOptionsAtPath:FILE.join(FILE.dirname(inputFile), filename)]; + + // At this point we have an array of args without the initial command in args[0], + // add the command and parse the options. + userOptions = [self parseOptionsFromArgs:[options.command].concat(userOptions)]; + appOptions = [self parseOptionsFromArgs:[options.command].concat(appOptions)]; + fileOptions = [self parseOptionsFromArgs:[options.command].concat(fileOptions)]; + + // The increasing order of precedence is: user -> app -> file -> command line + var mergedOptions = userOptions; + + [self mergeOptions:appOptions with:mergedOptions]; + [self mergeOptions:fileOptions with:mergedOptions]; + [self mergeOptions:options with:mergedOptions]; + mergedOptions.args = options.args; + + return mergedOptions; +} + +- (CPArray)readStoredOptionsAtPath:(CPString)path +{ + path = FILE.canonical(path); + + if (!FILE.isReadable(path)) + return []; + + var file = FILE.open(path, "r"), + line = file.readLine(), + matches = line.match(ArgsRe) || []; + + file.close(); + CPLog.debug("Reading stored options: " + path); + + if (matches) + { + for (var i = 0; i < matches.length; ++i) + { + var str = matches[i]; + + if ((str.charAt(0) === '"' && str.substr(-1) === '"') || (str.charAt(0) === "'" && str.substr(-1) === "'")) + matches[i] = str.substr(1, str.length - 2); + } + + return matches; + } + else + return []; +} + +- (void)printOptions:options +{ + for (option in options) + { + var value = options[option]; + + if (value) + { + var show = value.length !== undefined ? value.length > 0 : !!value; + + if (show) + print(option + ": " + value); + } + } +} + +// Merges properties in sourceOptions into targetOptions, overriding properties in targetOptions +- (void)mergeOptions:(JSObject)sourceOptions with:(JSObject)targetOptions +{ + for (option in sourceOptions) + { + // Make sure only a supported option is given + if (!AllowedStoredOptionsRe.test(option)) + continue; + + if (sourceOptions.hasOwnProperty(option)) + { + var value = sourceOptions[option]; + + if (value) + { + var copy = value.length !== undefined ? value.length > 0 : !!value; + + if (copy) + targetOptions[option] = value; + } + } + } +} + +- (void)setLogLevel:(int)level +{ + CPLogUnregister(CPLogPrint); + + if (level === 0) + CPLogRegister(CPLogPrint, "warn", logFormatter); + else if (level === 1) + CPLogRegister(CPLogPrint, "info", logFormatter); + else if (level > 1) + CPLogRegister(CPLogPrint, null, logFormatter); +} + +- (CPString)getInputFile:(CPArray)theArgs +{ + var inputFile = theArgs[0] || DefaultFile, + path = ""; + + if (!/^.+\.[nx]ib$/.test(inputFile)) + { + if (path = [self findInputFile:inputFile extension:@".xib"]) + inputFile = path; + else if (path = [self findInputFile:inputFile extension:@".nib"]) + inputFile = path; + else + [self failWithMessage:@"Cannot find the input file (.xib or .nib): " + FILE.canonical(inputFile)]; + } + else if (path = [self findInputFile:inputFile extension:nil]) + inputFile = path; + else + [self failWithMessage:@"Could not read the input file: " + FILE.canonical(inputFile)]; + + return FILE.canonical(inputFile); +} + +- (void)findInputFile:(CPString)inputFile extension:(CPString)extension +{ + var path = inputFile; + + if (extension) + path += extension; + + if (FILE.isReadable(path)) + return path; + + if (FILE.basename(FILE.dirname(inputFile)) !== "Resources" && FILE.isDirectory("Resources")) + { + path = FILE.resolve(path, FILE.join("Resources", FILE.basename(path))); + + if (FILE.isReadable(path)) + return path; + } + + return null; +} + +- (void)getAppAndResourceDirectoriesFromInputFile:(CPString)inputFile options:(JSObject)options +{ + appDirectory = resourcesDirectory = ""; + + if (options.resourcesDir) + { + var path = FILE.canonical(options.resourcesDir); + + if (!FILE.isDirectory(path)) + [self failWithMessage:@"Cannot read resources at: " + path]; + + resourcesDirectory = path; + } + + var parentDir = FILE.dirname(inputFile); + + if (FILE.basename(parentDir) === "Resources") + { + appDirectory = FILE.dirname(parentDir); + resourcesDirectory = resourcesDirectory || parentDir; + } + else + { + appDirectory = parentDir; + + if (!resourcesDirectory) + { + var path = FILE.join(appDirectory, "Resources"); + + if (FILE.isDirectory(path)) + resourcesDirectory = path; + } + } +} + +- (CPString)getOutputFileFromInputFile:(CPString)inputFile args:(CPArray)theArgs +{ + var outputFile = null; + + if (theArgs.length > 1) + { + outputFile = theArgs[1]; + + if (!/^.+\.cib$/.test(outputFile)) + outputFile += ".cib"; + } + else + outputFile = FILE.join(FILE.dirname(inputFile), FILE.basename(inputFile, FILE.extension(inputFile))) + ".cib"; + + outputFile = FILE.canonical(outputFile); + + if (!FILE.isWritable(FILE.dirname(outputFile))) + [self failWithMessage:@"Cannot write the output file at: " + outputFile]; + + return outputFile; +} + +- (void)loadFrameworks:(CPArray)frameworks verbosity:(int)verbosity callback:(JSObject)aCallback +{ + if (!frameworks || frameworks.length === 0) + return aCallback(); + + var returnPath = function(path) { return path; }; + + frameworks.forEach(function(aFramework) + { + [self setLogLevel:verbosity]; + + var frameworkPath = nil; + + // If it is just a name with no path components, try to locate it + if (aFramework.indexOf("/") === -1) + { + frameworkPath = [self findInCappBuild:aFramework isDirectory:YES callback:returnPath]; + + if (!frameworkPath) + frameworkPath = [self findInFrameworks:FILE.join(appDirectory, "Frameworks") + path:aFramework + isDirectory:YES + callback:returnPath]; + + if (!frameworkPath) + frameworkPath = [self findInInstalledFrameworks:aFramework isDirectory:YES callback:returnPath]; + } + else + frameworkPath = FILE.canonical(aFramework); + + if (!frameworkPath) + [self failWithMessage:@"Cannot find the framework \"" + aFramework + "\""]; + + CPLog.debug("Loading framework: " + frameworkPath); + + try + { + // CPBundle is a bit loquacious with logging, we will defer + // logging its exceptions till later. + [self setLogLevel:-1]; + + var frameworkBundle = [[CPBundle alloc] initWithPath:frameworkPath]; + + [frameworkBundle loadWithDelegate:nil]; + [self setLogLevel:verbosity]; + + [self loadNSClassesFromBundle:frameworkBundle]; + } + finally + { + [self setLogLevel:verbosity]; + } + + require("browser/timeout").serviceTimeouts(); + }); + + aCallback(); +} + +- (void)loadNSClassesFromBundle:(CPBundle)aBundle +{ + // See if the framework defines NS classes + var nsClasses = [aBundle objectForInfoDictionaryKey:@"NSClasses"] || [], + bundlePath = [aBundle bundlePath]; + + for (var i = 0; i < nsClasses.length; ++i) + { + if (userNSClasses.indexOf(nsClasses[i]) >= 0) + continue; + + var path = FILE.join(bundlePath, "NS_" + nsClasses[i] + ".j"); + + objj_importFile(path, YES); + CPLog.debug("Imported NS class: %s", path); + + userNSClasses.push(nsClasses[i]); + } +} + +- (CPArray)getThemeList:(JSObject)options +{ + var defaultTheme = options.defaultTheme; + + if (!defaultTheme) + defaultTheme = [infoPlist valueForKey:@"CPDefaultTheme"]; + + if (!defaultTheme) + defaultTheme = [self getAppKitDefaultThemeName]; + + var themes = [CPSet setWithObject:defaultTheme]; + + if (options.auxThemes) + [themes addObjectsFromArray:options.auxThemes]; + + var auxThemes = infoPlist.valueForKey("CPAuxiliaryThemes"); + + if (auxThemes) + [themes addObjectsFromArray:auxThemes]; + + // Now remove the default theme, get the list as an array, and insert the default at the beginning + [themes removeObject:defaultTheme]; + + var allThemes = [themes allObjects]; + + [allThemes insertObject:defaultTheme atIndex:0]; + + return allThemes; +} + +// Returns undefined if $CAPP_BUILD is not defined, false if path cannot be found in $CAPP_BUILD +- (id)findInCappBuild:(CPString)path isDirectory:(BOOL)isDirectory callback:(JSObject)callback +{ + var cappBuild = SYS.env["CAPP_BUILD"]; + + if (!cappBuild) + return undefined; + + cappBuild = FILE.canonical(cappBuild); + + if (FILE.isDirectory(cappBuild)) + { + var result = null; + + for (var i = 0; i < BuildTypes.length && !result; ++i) + { + var findPath = FILE.join(cappBuild, BuildTypes[i], path); + + if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) + result = callback(findPath); + } + + return result; + } + else + return false; +} + +- (id)findInInstalledFrameworks:(CPString)path isDirectory:(BOOL)isDirectory callback:(JSObject)callback +{ + // NOTE: It's safe to use '/' directly in the path, we're guaranteed to be on a Mac + return [self findInFrameworks:FILE.canonical(FILE.join(SYS.prefix, "packages/cappuccino/Frameworks")) + path:path + isDirectory:isDirectory + callback:callback]; +} + +- (id)findInFrameworks:(CPString)frameworksPath path:(CPString)path isDirectory:(BOOL)isDirectory callback:(JSObject)callback +{ + var result = null, + findPath = FILE.join(frameworksPath, "Debug", path); + + if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) + result = callback(findPath); + + if (!result) + { + findPath = FILE.join(frameworksPath, path); + + if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) + result = callback(findPath); + } + + return result; +} + +- (CPString)getAppKitDefaultThemeName +{ + var callback = function(path) { return [self themeNameFromPropertyList:path]; }, + themeName = [self findInCappBuild:@"AppKit/Info.plist" isDirectory:NO callback:callback]; + + if (!themeName) + themeName = [self findInInstalledFrameworks:@"AppKit/Info.plist" isDirectory:NO callback:callback]; + + return themeName || DefaultTheme; +} + +- (CPString)themeNameFromPropertyList:(CPString)path +{ + if (!FILE.isReadable(path)) + return nil; + + var themeName = nil, + plist = CFPropertyList.readPropertyListFromFile(path); + + if (plist) + themeName = plist.valueForKey("CPDefaultTheme"); + + return themeName; +} + +- (CPArray)loadThemesFromList:(CPArray)themeList +{ + var themes = []; + + for (var i = 0; i < themeList.length; ++i) + themes.push([self loadThemeNamed:themeList[i] directory:resourcesDirectory]); + + return themes; +} + +- (CPTheme)loadThemeNamed:(CPString)themeName directory:(CPString)themeDir +{ + if (/^.+\.blend$/.test(themeName)) + themeName = themeName.substr(0, themeName.length - ".blend".length); + + var blendName = themeName + ".blend", + themePath = ""; + + if (themeDir) + { + themePath = FILE.join(FILE.canonical(themeDir), blendName); + + if (!FILE.isDirectory(themePath)) + themePath = themeDir = null; + } + + if (!themeDir) + { + var returnPath = function(path) { return path; }; + + themePath = [self findInCappBuild:blendName isDirectory:YES callback:returnPath]; + + if (!themePath) + themePath = [self findInInstalledFrameworks:@"AppKit/Resources/" + blendName isDirectory:YES callback:returnPath]; + + // Last resort, try the cwd + if (!themePath) + { + var path = FILE.canonical(blendName); + + if (FILE.isDirectory(path)) + themePath = path; + } + } + + if (!themePath) + [self failWithMessage:@"Cannot find the theme \"" + themeName + "\""]; + + return [self readThemeWithName:themeName atPath:themePath]; +} + +- (CPTheme)readThemeWithName:(CPString)name atPath:(CPString)path +{ + var themeBundle = new CFBundle(path); + + // By default when we try to load the bundle it will use the CommonJS environment, + // but we want the Browser environment. So we override mostEligibleEnvironment(). + themeBundle.mostEligibleEnvironment = function() { return "Browser"; } + themeBundle.load(); + + var keyedThemes = themeBundle.valueForInfoDictionaryKey("CPKeyedThemes"); + + if (!keyedThemes) + [self failWithMessage:@"Could not find the keyed themes in the theme: " + path]; + + var index = keyedThemes.indexOf(name + ".keyedtheme"); + + if (index < 0) + [self failWithMessage:@"Could not find the main theme data (" + name + ".keyedtheme" + ") in the theme: " + path]; + + // Load the keyed theme data, making sure to resolve it + var resourcePath = themeBundle.pathForResource(keyedThemes[index]), + themeData = new CFMutableData(); + + themeData.setRawString(StaticResource.resourceAtURL(new CFURL(resourcePath), true).contents()); + + var theme = [CPKeyedUnarchiver unarchiveObjectWithData:themeData]; + + if (!theme) + [self failWithMessage:@"Could not unarchive the theme at: " + path]; + + CPLog.debug("Loaded theme: " + path); + return theme; +} + +- (JSObject)readConfigFile:(CPString)configFile inputFile:(CPString)inputFile +{ + var configPath = null, + path; + + // First see if the user passed a config file path + if (configFile) + { + path = FILE.canonical(configFile); + + if (!FILE.isReadable(path)) + [self failWithMessage:@"Cannot find the config file: " + path]; + + configPath = path; + } + else + { + path = FILE.join(appDirectory, "Info.plist"); + + if (FILE.isReadable(path)) + configPath = path; + } + + var plist = null; + + if (configPath) + { + var plist = FILE.read(configPath); + + if (!plist) + [self failWithMessage:@"Could not read the Info.plist at: " + configPath]; + + plist = CFPropertyList.propertyListFromString(plist); + + if (!plist) + [self failWithMessage:@"Could not parse the Info.plist at: " + configPath]; + } + + return {path: configPath, plist: plist}; +} + +- (CPArray)getModifiedNibsInDirectory:(CPString)path +{ + var nibs = new FileList(FILE.join(path, "*.[nx]ib")).items(), + count = nibs.length, + newNibInfo = {}, + modifiedNibs = []; + + while (count--) + { + var nib = nibs[count]; + + newNibInfo[nib] = FILE.mtime(nib); + + if (!nibInfo.hasOwnProperty(nib)) + modifiedNibs.push(["add", nib]); + else + { + if (newNibInfo[nib] - nibInfo[nib] !== 0) + modifiedNibs.push(["mod", nib]); + + // Remove matching nibs so that we leave + // deleted nibs in nibInfo. + delete nibInfo[nib]; + } + } + + for (var nib in nibInfo) + if (nibInfo.hasOwnProperty(nib)) + CPLog.info(">> %s: %s", CPLogColorize("Deleted", "warn"), nib); + + nibInfo = newNibInfo; + + return modifiedNibs; +} + +- (void)printVersionAndExit +{ + [self printVersion]; + OS.exit(0); +} + +- (void)printVersion +{ + /* + There are two usual possibilities for the location of the nib2cib binary. + If we are executing the installed narwhal binary, the location is: + /packages/cappuccino/bin/nib2cib + If we are executing the built binary, the location is: + /Debug|Release/CommonJS/cappuccino/bin/nib2cib + + Base on these paths we can locate nib2cib's Info.plist. + */ + var path = FILE.dirname(FILE.dirname(FILE.canonical(SYS.args[0]))), + version = null; + + if (FILE.basename(path) === "narwhal") + path = FILE.join(path, "packages", "cappuccino"); + + path = FILE.join(path, "lib", "nib2cib", "Info.plist"); + + if (FILE.isReadable(path)) + { + var plist = FILE.read(path); + + if (!plist) + return; + + plist = CFPropertyList.propertyListFromString(plist); + + if (!plist) + return; + + version = plist.valueForKey("CPBundleVersion"); + + if (version) + stream.print("nib2cib v" + version); + } + + if (!version) + stream.print(""); +} + +- (CPString)exceptionReason:(JSObject)exception +{ + if (typeof(exception) === "string") + return exception; + else if (exception.isa && [exception respondsToSelector:@selector(reason)]) + return [exception reason]; + else + return @"An unknown error occurred"; +} + +- (void)failWithMessage:(CPString)message +{ + [CPException raise:ConverterConversionException reason:message]; +} + +@end + +function logFormatter(aString, aLevel, aTitle) +{ + if (aLevel === "info") + return aString; + else + return CPLogColorize(aString, aLevel); +} diff --git a/Tools/nib2cib/main.j b/Tools/nib2cib/main.j index 50bc79ddf..3e5475c9d 100644 --- a/Tools/nib2cib/main.j +++ b/Tools/nib2cib/main.j @@ -20,731 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -@import -@import -@import - -@import "NSFoundation.j" -@import "NSAppKit.j" - -@import "Nib2CibKeyedUnarchiver.j" -@import "Converter.j" - -var FILE = require("file"), - OS = require("os"), - SYS = require("system"), - FileList = require("jake").FileList, - stream = require("narwhal/term").stream, - StaticResource = require("objective-j").StaticResource, - - DefaultTheme = "Aristo", - BuildTypes = ["Debug", "Release"], - DefaultFile = "MainMenu"; - -var parser = new (require("narwhal/args").Parser)(), - nibInfo = {}, - appDirectory = "", - resourcesDirectory = ""; - +@import "Nib2Cib.j" function main(args) { - try - { - var options = parseOptions(args), - ret = 0; + var nib2cib = [[Nib2Cib alloc] initWithArgs:args]; - if (options.watch) - watch(options); - else - if (!convert(options)) - ret = 2; - } - catch (anException) - { - CPLog.fatal(exceptionReason(anException)); - OS.exit(1); - } - OS.exit(ret); -} - -function convert(options, inputFile) -{ - try - { - inputFile = inputFile || getInputFile(options.args); - - getAppAndResourceDirectoriesFromInputFile(inputFile, options); - - var outputFile = getOutputFile(inputFile, options.args), - configInfo = readConfigFile(options.configFile || "", inputFile), - defaultTheme = null; - - if (configInfo.plist) - { - var systemFontFace = configInfo.plist.valueForKey("CPSystemFontFace"); - - if (systemFontFace) - [CPFont setSystemFontFace:systemFontFace]; - - var systemFontSize = configInfo.plist.valueForKey("CPSystemFontSize"); - - if (systemFontSize) - [CPFont setSystemFontSize:parseFloat(systemFontSize, 10)]; - - if (!options.defaultTheme) - defaultTheme = configInfo.plist.valueForKey("CPDefaultTheme"); - } - - var themeList = getThemeList(defaultTheme || options.defaultTheme, options), - themes = loadThemes(themeList); - - CPLog.info("\n-------------------------------------------------------------"); - CPLog.info("Input : " + inputFile); - CPLog.info("Output : " + outputFile); - CPLog.info("Format : " + ["Auto", "Mac", "iPhone"][options.format]); - CPLog.info("Application : " + appDirectory); - CPLog.info("Resources : " + resourcesDirectory); - CPLog.info("Frameworks : " + (options.frameworks || "")); - CPLog.info("Default theme : " + themeList[0]); - CPLog.info("Extra themes : " + themeList.slice(1).join(", ")); - CPLog.info("Config file : " + (configInfo.path || "")); - CPLog.info("System Font : " + [CPFont systemFontSize] + "px " + [CPFont systemFontFace]); - CPLog.info("-------------------------------------------------------------\n"); - - var converter = [[Converter alloc] initWithInputPath:inputFile - format:options.format - themes:themes]; - - [converter setOutputPath:outputFile]; - [converter setResourcesPath:resourcesDirectory]; - - loadFrameworks(options.frameworks, options.verbosity, function() - { - [converter convert]; - }); - - return true; - } - catch (anException) - { - CPLog.fatal(exceptionReason(anException)); - return false; - } -} - -function watch(options) -{ - var verbosity = options.quiet ? -1 : options.verbosity, - watchDir = options.args[0]; - - if (!watchDir) - watchDir = FILE.canonical(FILE.isDirectory("Resources") ? "Resources" : "."); - else - { - watchDir = FILE.canonical(watchDir); - - if (FILE.basename(watchDir) !== "Resources") - { - var path = FILE.join(watchDir, "Resources"); - - if (FILE.isDirectory(path)) - watchDir = path; - } - } - - if (!FILE.isDirectory(watchDir)) - fail("Cannot find the directory: " + watchDir); - - // Turn on info messages - setLogLevel(1); - - var nibs = new FileList(FILE.join(watchDir, "*.[nx]ib")).items(), - count = nibs.length; - - // First time through only IB files with no corresponding cib - // or a cib with an earlier or equal mtime are converted. - while (count--) - { - var nib = nibs[count], - cib = nib.substr(0, nib.length - 4) + ".cib"; - - if (FILE.exists(cib) && (FILE.mtime(nib) - FILE.mtime(cib)) <= 0) - nibInfo[nib] = FILE.mtime(nib); - } - - CPLog.info("Watching: " + CPLogColorize(watchDir, "debug")); - CPLog.info("Press Control-C to stop..."); - - while (true) - { - var modifiedNibs = getModifiedNibs(watchDir); - - for (var i = 0; i < modifiedNibs.length; ++i) - { - var action = modifiedNibs[i][0], - nib = modifiedNibs[i][1], - label = action === "add" ? "Added" : "Modified", - level = action === "add" ? "info" : "debug"; - - CPLog.info(">> %s: %s", CPLogColorize(label, level), nib); - - // Don't convert an add if there is an existing cib with a later mtime - if (action === "add") - { - var cib = nib.substr(0, nib.length - 4) + ".cib"; - - if (FILE.exists(cib) && (FILE.mtime(nib) - FILE.mtime(cib)) < 0) - continue; - } - - // Let the converter log however the user configured it - setLogLevel(verbosity); - - var success = convert(options, nib); - - setLogLevel(1); - - if (success) - { - if (verbosity > 0) - stream.print(); - else - CPLog.warn("Conversion successful"); - } - } - - OS.sleep(1); - } -} - -function parseOptions(args) -{ - parser.usage("[--watch DIRECTORY] [INPUT_FILE [OUTPUT_FILE]]"); - - parser.option("--watch", "watch") - .set(true) - .help("Ask nib2cib to watch a directory for changes"); - - parser.option("-R", "resourcesDir") - .set() - .displayName("directory") - .help("Set the Resources directory, usually unnecessary as it is inferred from the input path"); - - parser.option("--default-theme", "defaultTheme") - .set() - .displayName("name") - .help("Specify a custom default theme which is not set in your Info.plist"); - - parser.option("-t", "--theme", "extraThemes") - .push() - .displayName("name") - .help("An additional theme loaded dynamically by your application"); - - parser.option("--config", "configFile") - .set() - .displayName("path") - .help("A path to an Info.plist file from which the system font and/or size can be retrieved"); - - // parser.option("--iphone", "format") - // .set(NibFormatIPhone) - // .help("Set format to iPhone"); - - parser.option("-v", "--verbose", "verbosity") - .inc() - .help("Increase verbosity level"); - - parser.option("-q", "--quiet", "quiet") - .set(true) - .help("No output"); - - parser.option("-F", "framework", "frameworks") - .push() - .help("Add a framework to load"); - - parser.option("--mac", "format") - .set(NibFormatMac) - .def(NibFormatUndetermined) - .help("Set format to Mac"); - - parser.option("--version", "showVersion") - .action(printVersionAndExit) - .help("Show the version of nib2cib and quit"); - - parser.helpful(); - - var options = parser.parse(args, null, null, true); - - if (options.args.length > 2) - { - parser.printUsage(options); - OS.exit(0); - } - - setLogLevel(options.quiet ? -1 : options.verbosity); - - if (!options.quiet && options.verbosity > 0) - printVersion(); - - return options; -} - -function setLogLevel(level) -{ - CPLogUnregister(CPLogPrint); - - if (level === 0) - CPLogRegister(CPLogPrint, "warn", logFormatter); - else if (level === 1) - CPLogRegister(CPLogPrint, "info", logFormatter); - else if (level > 1) - CPLogRegister(CPLogPrint, null, logFormatter); -} - -function getInputFile(args) -{ - var inputFile = args[0] || DefaultFile, - path = ""; - - if (!/^.+\.[nx]ib$/.test(inputFile)) - { - if (path = findInputFile(inputFile, ".xib")) - inputFile = path; - else if (path = findInputFile(inputFile, ".nib")) - inputFile = path; - else - fail("Cannot find the input file (.xib or .nib): " + FILE.canonical(inputFile)); - } - else if (path = findInputFile(inputFile)) - inputFile = path; - else - fail("Could not read the input file: " + FILE.canonical(inputFile)); - - return FILE.canonical(inputFile); -} - -function findInputFile(inputFile, extension) -{ - var path = inputFile; - - if (extension) - path += extension; - - if (FILE.isReadable(path)) - return path; - - if (FILE.basename(FILE.dirname(inputFile)) !== "Resources" && FILE.isDirectory("Resources")) - { - path = FILE.resolve(path, FILE.join("Resources", FILE.basename(path))); - - if (FILE.isReadable(path)) - return path; - } - - return null; -} - -function getAppAndResourceDirectoriesFromInputFile(inputFile, options) -{ - appDirectory = resourcesDirectory = ""; - - if (options.resourcesDir) - { - var path = FILE.canonical(options.resourcesDir); - - if (!FILE.isDirectory(path)) - fail("Cannot read resources at: " + path); - - resourcesDirectory = path; - } - - var parentDir = FILE.dirname(inputFile); - - if (FILE.basename(parentDir) === "Resources") - { - appDirectory = FILE.dirname(parentDir); - resourcesDirectory = resourcesDirectory || parentDir; - } - else - { - appDirectory = parentDir; - - if (!resourcesDirectory) - { - var path = FILE.join(appDirectory, "Resources"); - - if (FILE.isDirectory(path)) - resourcesDirectory = path; - } - } -} - -function getOutputFile(inputFile, args) -{ - var outputFile = null; - - if (args.length > 1) - { - outputFile = args[1]; - - if (!/^.+\.cib$/.test(outputFile)) - outputFile += ".cib"; - } - else - outputFile = FILE.join(FILE.dirname(inputFile), FILE.basename(inputFile, FILE.extension(inputFile))) + ".cib"; - - outputFile = FILE.canonical(outputFile); - - if (!FILE.isWritable(FILE.dirname(outputFile))) - fail("Cannot write the output file at: " + outputFile); - - return outputFile; -} - -function loadFrameworks(frameworkPaths, verbosity, aCallback) -{ - if (!frameworkPaths || frameworkPaths.length === 0) - return aCallback(); - - frameworkPaths.forEach(function(aFrameworkPath) - { - setLogLevel(verbosity); - CPLog.info("Loading " + aFrameworkPath); - - try - { - // CPBundle is a bit loquacious with logging, we will defer - // logging its exceptions till later. - setLogLevel(-1); - - var frameworkBundle = [[CPBundle alloc] initWithPath:aFrameworkPath]; - - [frameworkBundle loadWithDelegate:nil]; - } - finally - { - setLogLevel(verbosity); - } - - require("browser/timeout").serviceTimeouts(); - }); - - aCallback(); -} - -function logFormatter(aString, aLevel, aTitle) -{ - if (aLevel === "info") - return aString; - else - return CPLogColorize(aString, aLevel); -} - -function getThemeList(defaultTheme, options) -{ - var themes = [defaultTheme || getAppKitDefaultThemeName()]; - - if (options.extraThemes) - for (var i = 0; i < options.extraThemes.length; ++i) - if (themes.indexOf(options.extraThemes[i]) < 0) - themes.push(options.extraThemes[i]); - - return themes; -} - -// Returns undefined if $CAPP_BUILD is not defined, false if path cannot be found in $CAPP_BUILD -function findInCappBuild(path, isDirectory, callback) -{ - var cappBuild = SYS.env["CAPP_BUILD"]; - - if (!cappBuild) - return undefined; - - cappBuild = FILE.canonical(cappBuild); - - if (FILE.isDirectory(cappBuild)) - { - var result = null; - - for (var i = 0; i < BuildTypes.length && !result; ++i) - { - var findPath = FILE.join(cappBuild, BuildTypes[i], path); - - if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) - result = callback(findPath); - } - - return result; - } - else - return false; -} - -function findInInstalledFrameworks(path, isDirectory, callback) -{ - // NOTE: It's safe to use '/' directly in the path, we're guaranteed to be on a Mac - var frameworks = FILE.canonical(FILE.join(SYS.prefix, "packages/cappuccino/Frameworks")), - result = null, - findPath = FILE.join(frameworks, "Debug", path); - - if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) - result = callback(findPath); - - if (!result) - { - findPath = FILE.join(frameworks, path); - - if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath))) - result = callback(findPath); - } - - return result; -} - -function getAppKitDefaultThemeName() -{ - var callback = function(path) { return themeNameFromPropertyList(path); }, - themeName = findInCappBuild("AppKit/Info.plist", false, callback); - - if (!themeName) - themeName = findInInstalledFrameworks("AppKit/Info.plist", false, callback); - - return themeName || DefaultTheme; -} - -function themeNameFromPropertyList(path) -{ - if (!FILE.isReadable(path)) - return nil; - - var themeName = nil, - plist = CFPropertyList.readPropertyListFromFile(path); - - if (plist) - themeName = plist.valueForKey("CPDefaultTheme"); - - return themeName; -} - -function loadThemes(themeList) -{ - var themes = []; - - for (var i = 0; i < themeList.length; ++i) - themes.push(loadTheme(themeList[i], resourcesDirectory)); - - return themes; -} - -function loadTheme(themeName, themeDir) -{ - if (/^.+\.blend$/.test(themeName)) - themeName = themeName.substr(0, themeName.length - ".blend".length); - - var blendName = themeName + ".blend", - themePath = ""; - - if (themeDir) - { - themePath = FILE.join(FILE.canonical(themeDir), blendName); - - if (!FILE.isDirectory(themePath)) - themePath = themeDir = null; - } - - if (!themeDir) - { - var returnPath = function(path) { return path; }; - - themePath = findInCappBuild(blendName, true, returnPath); - - if (!themePath) - themePath = findInInstalledFrameworks("AppKit/Resources/" + blendName, true, returnPath); - - // Last resort, try the cwd - if (!themePath) - { - var path = FILE.canonical(blendName); - - if (FILE.isDirectory(path)) - themePath = path; - } - } - - if (!themePath) - fail('Cannot find the theme "' + themeName + '"'); - - return readTheme(themeName, themePath); -} - -function readTheme(name, path) -{ - var themeBundle = new CFBundle(path); - - // By default when we try to load the bundle it will use the CommonJS environment, - // but we want the Browser environment. So we override mostEligibleEnvironment(). - themeBundle.mostEligibleEnvironment = function() { return "Browser"; }; - themeBundle.load(); - - var keyedThemes = themeBundle.valueForInfoDictionaryKey("CPKeyedThemes"); - - if (!keyedThemes) - fail("Could not find the keyed themes in the theme: " + path); - - var index = keyedThemes.indexOf(name + ".keyedtheme"); - - if (index < 0) - fail("Could not find the main theme data (" + name + ".keyedtheme" + ") in the theme: " + path); - - // Load the keyed theme data, making sure to resolve it - var resourcePath = themeBundle.pathForResource(keyedThemes[index]), - themeData = new CFMutableData(); - - themeData.setRawString(StaticResource.resourceAtURL(new CFURL(resourcePath), true).contents()); - - var theme = [CPKeyedUnarchiver unarchiveObjectWithData:themeData]; - - if (!theme) - fail("Could not unarchive the theme at: " + path); - - CPLog.debug("Loaded theme: " + path); - return theme; -} - -function readConfigFile(configFile, inputFile) -{ - var configPath = null, - path; - - // First see if the user passed a config file path - if (configFile) - { - path = FILE.canonical(configFile); - - if (!FILE.isReadable(path)) - fail("Cannot find the config file: " + path); - - configPath = path; - } - else - { - path = FILE.join(appDirectory, "Info.plist"); - - if (FILE.isReadable(path)) - configPath = path; - } - - var plist = null; - - if (configPath) - { - var plist = FILE.read(configPath); - - if (!plist) - fail("Could not read the Info.plist at: " + configPath); - - plist = CFPropertyList.propertyListFromString(plist); - - if (!plist) - fail("Could not parse the Info.plist at: " + configPath); - } - - return {path: configPath, plist: plist}; -} - -function getModifiedNibs(path) -{ - var nibs = new FileList(FILE.join(path, "*.[nx]ib")).items(), - count = nibs.length, - newNibInfo = {}, - modifiedNibs = []; - - while (count--) - { - var nib = nibs[count]; - - newNibInfo[nib] = FILE.mtime(nib); - - if (!nibInfo.hasOwnProperty(nib)) - modifiedNibs.push(["add", nib]); - else - { - if (newNibInfo[nib] - nibInfo[nib] !== 0) - modifiedNibs.push(["mod", nib]); - - // Remove matching nibs so that we leave - // deleted nibs in nibInfo. - delete nibInfo[nib]; - } - } - - for (var nib in nibInfo) - if (nibInfo.hasOwnProperty(nib)) - CPLog.info(">> %s: %s", CPLogColorize("Deleted", "warn"), nib); - - nibInfo = newNibInfo; - - return modifiedNibs; -} - -function printVersionAndExit() -{ - printVersion(); - OS.exit(0); -} - -function printVersion() -{ - /* - There are two usual possibilities for the location of the nib2cib binary. - If we are executing the installed narwhal binary, the location is: - /packages/cappuccino/bin/nib2cib - If we are executing the built binary, the location is: - /Debug|Release/CommonJS/cappuccino/bin/nib2cib - - Base on these paths we can locate nib2cib's Info.plist. - */ - var path = FILE.dirname(FILE.dirname(FILE.canonical(SYS.args[0]))), - version = null; - - if (FILE.basename(path) === "narwhal") - path = FILE.join(path, "packages", "cappuccino"); - - path = FILE.join(path, "lib", "nib2cib", "Info.plist"); - - if (FILE.isReadable(path)) - { - var plist = FILE.read(path); - - if (!plist) - return; - - plist = CFPropertyList.propertyListFromString(plist); - - if (!plist) - return; - - version = plist.valueForKey("CPBundleVersion"); - - if (version) - stream.print("nib2cib v" + version); - } - - if (!version) - stream.print(""); -} - -function exceptionReason(exception) -{ - if (typeof(exception) === "string") - return exception; - else if (exception.isa && [exception respondsToSelector:@selector(reason)]) - return [exception reason]; - else - return "An unknown error occurred"; -} - -function fail(message) -{ - [CPException raise:ConverterConversionException reason:message]; + [nib2cib run]; } diff --git a/Tools/nib2cib/nib2cib.1 b/Tools/nib2cib/nib2cib.1 index 44c5ec433..e7498b902 100644 --- a/Tools/nib2cib/nib2cib.1 +++ b/Tools/nib2cib/nib2cib.1 @@ -1,6 +1,7 @@ .Dd April 3, 2011 .Os "Cappuccino" .Dt NIB2CIB 1 "PRM" +.nh .\"----------------------------------------------------------------------------------------- .Sh NAME .\"----------------------------------------------------------------------------------------- @@ -154,8 +155,82 @@ options, one for each theme that you load. .Pp Themes are searched for in the Resources, $CAPP_BUILD/Debug and $CAPP_BUILD/Release directories. +.Pp +If you have a list of auxiliary themes in your Info.plist using the +.Ar CPAuxiliaryThemes +item, +.Nm +will load them automatically, you do not have to do anything special. .\"----------------------------------------------------------------------------------------- -.Sh "COMMON OPTIONS" +.Ss "Userland NS Classes" +.\"----------------------------------------------------------------------------------------- +Let's say you are working on a subclass of CPTextField called FormField. Obviously you will +want to use FormFields in cibs. You would also like to have some reasonable defaults established +for the view in Xcode, and perhaps override or ignore some CPTextField settings that do not apply to FormField. +.Pp +.Nm +allows you to dynamically define NS classes and use them in Interface Builder. Here's how: +.Bl -enum +.It +Indicate which classes will be used in Interface Builder by setting an +.Ar NSClasses +item in Info.plist: + + NSClasses + + BorderView + +.It +For each class listed in +.Ar NSClasses , +a corresponding NS_.j file must be +created. This file is structured exactly like a Cappuccino NS class, with one exception: + + @implementation BorderView (NSCoding) + + - (id)NS_initWithCoder:(CPCoder)aCoder + { + self = [super NS_initWithCoder:aCoder]; + + if (self) + { + // Do default initialization here + } + + return self; + } + + @end + + @implementation NS_BorderView : BorderView + + + (Class)classForKeyedArchiver + { + return [BorderView class]; + } + + - (id)initWithCoder:(CPCoder)aCoder + { + return [self NS_initWithCoder:aCoder]; + } + + @end + +The only difference between this file and a Cappuccino NS file is that +.Sy classForKeyedArchiver +is a class method instead of an instance method. +.It +If necessary, the main class' +.Sy encodeWithCoder +can be enhanced to do extra work to support +.Sy nib2cib. +.Pp +By making your classes key-value coding compliant, you can use User Defined +Runtime Attributes in Interface Builder to configure your custom views without +any code. +.El +.\"----------------------------------------------------------------------------------------- +.Sh "OPTIONS" .\"----------------------------------------------------------------------------------------- The following options are available in watch mode or single mode: .Bl -tag -width 4n @@ -192,7 +267,7 @@ use this option, as uses the Info.plist in the application directory, which is inferred from the input file. .It Fl F -Specify the path of a framework to load before converting. This is only useful if: +Specify the name or path of a framework to load before converting. This is only useful if: .Bl -dash -width 0n -hang .It Your IB files use classes from the framework. @@ -202,13 +277,33 @@ Those classes need to serialize/deserialize more data than their superclasses. Those classes implement encodeWithCoder: and initWithCoder:. .El .Pp -This option may be used multiple times to load multiple frameworks. +This option may be used multiple times to load multiple frameworks. If the argument +contains a "/" character, it is considered to be a relative or absolute path and +the framework is searched for at that location. Otherwise it is considered a framework +name and is searched for in the following directories: +.Bl -ohang -offset 4n +.It $CAPP_BUILD/Debug +.It $CAPP_BUILD/Release +.It /Frameworks/Debug +.It /Frameworks +.It /packages/cappuccino/Frameworks/Debug +.It /packages/cappuccino/Frameworks +.El .It Fl \-quiet Tells .Nm to output nothing. This is useful if you are using .Nm -in a shell script and are only interested in the return value. +in a shell script and are only interested in the return value. Note that this +option overrides the +.Fl v +option. +.It Fl \-no-stored-options +Tells +.Nm +not to read stored options. See +.Sy Stored Options +below for more information. .It Fl \-version Prints the current version of .Nm @@ -221,6 +316,45 @@ Displays usage and options. .El .\"----------------------------------------------------------------------------------------- +.Ss "Stored Options" +.\"----------------------------------------------------------------------------------------- +To make it easier to use nib2cib in an automated way, you can store command line options +that will apply to converted xibs/nibs. To store command line options, you enter the +options on a single line into a text file. For example, if you always want to set +"MyTheme" as the default theme, you would create a text file with this line: +.Pp +.D1 --default-theme MyTheme +.Pp +If an option takes a parameter and the parameter contains spaces, it must be enclosed in +single or double quotes. You may store options in the following three places, in increasing +order of precedence: +.Bl -ohang -offset 4n +.It Em ~/.nib2cibconfig +nib2cib options that apply to all nibs converted under your user account. +.It Em /nib2cib.conf +nib2cib options that apply to all nibs in /Resources. +.It Em /Resources/.conf +nib2cib options that apply to a specific xib or nib. For example, if the xib +is called MainMenu.xib, the stored options file would be MainMenu.conf. +.El +.Pp +Each of these files is read in the order listed above, and if it exists, its options +are merged with the previous file's options. Options in later files (more specific) +override options in earlier files (more generic). After all of the stored options +are merged, the command line options are merged in. Thus command line options always +override stored options. +.Pp +Using stored options is especially useful if your xibs/nibs use custom themes or +frameworks. By using stored options, you can avoid remembering (or forgetting!) to +specify the theme or framework every time you invoke +.Nm . +.Pp +To prevent +.Nm +from reading stored options, and thus only use command line options, use the +.Fl \-no-stored-options +option on the command line. +.\"----------------------------------------------------------------------------------------- .Sh "RETURN VALUES" .\"----------------------------------------------------------------------------------------- .Nm diff --git a/common.jake b/common.jake index 28c1d6e64..720f7d923 100644 --- a/common.jake +++ b/common.jake @@ -1,12 +1,34 @@ -var SYSTEM = require("system"); -var FILE = require("file"); -var OS = require("os"); -var UTIL = require("narwhal/util"); -var stream = require("narwhal/term").stream; +/* + * command.jake + * toolchain + * + * Copyright 2012 The Cappuccino Foundation + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ -var requiresSudo = false; +var SYSTEM = require("system"), + FILE = require("file"), + OS = require("os"), + UTIL = require("narwhal/util"), + stream = require("narwhal/term").stream, -SYSTEM.args.slice(1).forEach(function(arg){ + requiresSudo = false; + +SYSTEM.args.slice(1).forEach(function(arg) +{ if (arg === "sudo-install") requiresSudo = true; }); @@ -21,7 +43,7 @@ function ensurePackageUpToDate(packageName, requiredVersion, options) if (options.optional) return; - print("You are missing package \"" + packageName + "\", version " + requiredVersion + " or later. Please install using \"tusk install "+packageName+"\" and re-run jake"); + print("You are missing package \"" + packageName + "\", version " + requiredVersion + " or later. Please install using \"tusk install "+ packageName +"\" and re-run jake"); OS.exit(1); } @@ -35,11 +57,12 @@ function ensurePackageUpToDate(packageName, requiredVersion, options) if (version && UTIL.compare(version, requiredVersion) !== -1) return; - print("Your copy of " + packageName + " is out of date (" + (version||["0"]).join(".") + " installed, " + requiredVersion.join(".") + " required)."); + print("Your copy of " + packageName + " is out of date (" + (version || ["0"]).join(".") + " installed, " + requiredVersion.join(".") + " required)."); if (!options.noupdate) { print("Update? Existing package will be overwritten. yes or no:"); + if (!SYSTEM.env["CAPP_AUTO_UPGRADE"] && system.stdin.readLine() !== "yes\n") { print("Jake aborted."); @@ -51,7 +74,7 @@ function ensurePackageUpToDate(packageName, requiredVersion, options) if (OS.system(["sudo", "tusk", "install", "--force", packageName])) { // Attempt a hackish work-around for sudo compiled with the --with-secure-path option - if (OS.system("sudo bash -c 'source " + getShellConfigFile() + "; tusk install --force "+packageName)) + if (OS.system("sudo bash -c 'source " + getShellConfigFile() + "; tusk install --force "+ packageName)) OS.exit(1); //rake abort if ($? != 0) } } @@ -110,7 +133,7 @@ if (!SYSTEM.env["CONFIG"]) SYSTEM.env["CONFIG"] = "Release"; global.ENV = SYSTEM.env; -global.ARGV = SYSTEM.args +global.ARGV = SYSTEM.args; global.FILE = FILE; global.OS = OS; @@ -141,7 +164,8 @@ global.$LICENSE_FILE = FILE.absolute(FILE.join(FILE.dirname(module.path), 'LI global.FIXME_fileDependency = function(destinationPath, sourcePath) { - file(destinationPath, [sourcePath], function(){ + file(destinationPath, [sourcePath], function() + { FILE.touch(destinationPath); }); }; @@ -185,22 +209,26 @@ serializedENV = function() var envNew = {}; // add changed keys to the new ENV - Object.keys(SYSTEM.env).forEach(function(key) { + Object.keys(SYSTEM.env).forEach(function(key) + { if (SYSTEM.env[key] !== envInitial[key]) envNew[key] = SYSTEM.env[key]; }); // pseudo-HACK: add NARWHALOPT with packages we should ensure are loaded var packages = additionalPackages(); - if (packages.length) { + + if (packages.length) + { envNew["NARWHALOPT"] = packages.map(function(p) { return "-p " + OS.enquote(p); }).join(" "); envNew["PATH"] = packages.map(function(p) { return FILE.join(p, "bin"); }).concat(SYSTEM.env["PATH"]).join(":"); } - return Object.keys(envNew).map(function(key) { + return Object.keys(envNew).map(function(key) + { return key + "=" + OS.enquote(envNew[key]); }).join(" "); -} +}; function getShellConfigFile() { @@ -220,7 +248,8 @@ function getShellConfigFile() function reforkWithPackages() { - if (additionalPackages().length > 0) { + if (additionalPackages().length > 0) + { var cmd = serializedENV() + " " + system.args.map(OS.enquote).join(" "); //print("REFORKING: " + cmd); OS.exit(OS.system(cmd)); @@ -229,8 +258,10 @@ function reforkWithPackages() reforkWithPackages(); -function handleSetupEnvironmentError(e) { - if (String(e).indexOf("require error")==-1) { +function handleSetupEnvironmentError(e) +{ + if (String(e).indexOf("require error") == -1) + { print("setupEnvironment warning: " + e); //throw e; } @@ -238,9 +269,12 @@ function handleSetupEnvironmentError(e) { function setupEnvironment() { - try { + try + { require("objective-j").OBJJ_INCLUDE_PATHS.push(FILE.join($BUILD_CONFIGURATION_DIR, "CommonJS", "cappuccino", "Frameworks")); - } catch (e) { + } + catch (e) + { handleSetupEnvironmentError(e); } } @@ -251,7 +285,7 @@ global.rm_rf = function(/*String*/ aFilename) { try { FILE.rmtree(aFilename); } catch (anException) { } -} +}; global.cp_r = function(/*String*/ from, /*String*/ to) { @@ -260,20 +294,29 @@ global.cp_r = function(/*String*/ from, /*String*/ to) if (FILE.isDirectory(from)) FILE.copyTree(from, to); - else{try{ - FILE.copy(from, to);}catch(e) { print(e + FILE.exists(from) + " " + FILE.exists(FILE.dirname(to))); }} -} + else + { + try + { + FILE.copy(from, to); + } + catch (e) + { + print(e + FILE.exists(from) + " " + FILE.exists(FILE.dirname(to))); + } + } +}; global.cp = function(/*String*/ from, /*String*/ to) { FILE.copy(from, to); // FILE.chmod(to, FILE.mod(from)); -} +}; global.mv = function(/*String*/ from, /*String*/ to) { FILE.move(from, to); -} +}; global.subjake = function(/*Array*/ directories, /*String*/ aTaskName) { @@ -284,15 +327,16 @@ global.subjake = function(/*Array*/ directories, /*String*/ aTaskName) { if (FILE.isDirectory(aDirectory) && FILE.isFile(FILE.join(aDirectory, "Jakefile"))) { - var cmd = "cd " + OS.enquote(aDirectory) + " && " + serializedENV() + " " + OS.enquote(SYSTEM.args[0]) + " " + OS.enquote(aTaskName); - var returnCode = OS.system(cmd); + var cmd = "cd " + OS.enquote(aDirectory) + " && " + serializedENV() + " " + OS.enquote(SYSTEM.args[0]) + " " + OS.enquote(aTaskName), + returnCode = OS.system(cmd); + if (returnCode) OS.exit(returnCode); } else print("warning: subjake missing: " + aDirectory + " (this is not necessarily an error, " + aDirectory + " may be optional)"); }); -} +}; global.executableExists = function(/*String*/ executableName) { @@ -303,7 +347,7 @@ global.executableExists = function(/*String*/ executableName) return path; } return null; -} +}; $OBJJ_TEMPLATE_EXECUTABLE = FILE.join($HOME_DIR, "Objective-J", "CommonJS", "objj-executable"); @@ -311,21 +355,23 @@ global.make_objj_executable = function(aPath) { cp($OBJJ_TEMPLATE_EXECUTABLE, aPath); FILE.chmod(aPath, 0755); -} +}; global.symlink_executable = function(source) { relative = FILE.relative($ENVIRONMENT_NARWHAL_BIN_DIR, source); destination = FILE.join($ENVIRONMENT_NARWHAL_BIN_DIR, FILE.basename(source)); FILE.symlink(relative, destination); -} +}; -global.getCappuccinoVersion = function() { +global.getCappuccinoVersion = function() +{ var versionFile = FILE.path(module.path).dirname().join("version.json"); return JSON.parse(versionFile.read({ charset : "UTF-8" })).version; -} +}; -global.setPackageMetadata = function(packagePath) { +global.setPackageMetadata = function(packagePath) +{ var pkg = JSON.parse(FILE.read(packagePath, { charset : "UTF-8" })); var p = OS.popen(["git", "rev-parse", "--verify", "HEAD"]); @@ -343,7 +389,7 @@ global.setPackageMetadata = function(packagePath) { stream.print(" Timestamp: \0purple(" + pkg["cappuccino-timestamp"] + "\0)"); FILE.write(packagePath, JSON.stringify(pkg, null, 4), { charset : "UTF-8" }); -} +}; global.subtasks = function(subprojects, taskNames) { @@ -358,7 +404,7 @@ global.subtasks = function(subprojects, taskNames) subjake(subprojects, aTaskName); }); }); -} +}; global.installSymlink = function(sourcePath) { @@ -396,21 +442,41 @@ global.installSymlink = function(sourcePath) FILE.symlink(relative, target); }); } -} +}; global.spawnJake = function(/*String*/ aTaskName) { if (OS.system(serializedENV() + " " + SYSTEM.args[0] + " " + aTaskName)) OS.exit(1);//rake abort if ($? != 0) -} +}; -global.sudo = function(/*String*/ aTaskName) +var normalizeCommand = function(/*Array or String*/ command) { - var cmd = "sudo bash -c 'source " + getShellConfigFile() + "; " + aTaskName + "'"; + if (Array.isArray(command)) + return command.map(function (arg) + { + return OS.enquote(arg); + }).join(" "); + else + return command; +}; - if (OS.system(cmd)) - OS.exit(1); //rake abort if ($? != 0) -} +global.sudo = function(/*Array or String*/ command) +{ + // First try without sudo + command = normalizeCommand(command); + + if (OS.system(command + " >/dev/null 2>&1")) + return OS.system("sudo -p '\nEnter your admin password: ' " + command); + + return 0; +}; + +global.exec = function(/*Array or String*/ command, quiet) +{ + command = normalizeCommand(command) + (quiet === true ? " >/dev/null 2>&1" : ""); + return OS.system(command); +}; global.copyManPage = function(/*String*/ name, /*int*/ section) { @@ -420,54 +486,29 @@ global.copyManPage = function(/*String*/ name, /*int*/ section) if (!FILE.exists(manPagePath) || FILE.mtime(pageFile) > FILE.mtime(manPagePath)) { - var sudo = ["sudo", "-p", "\nEnter your admin password: "], - useSudo = false, - success = true, - cmd; - if (!FILE.isDirectory(manDir)) { - cmd = ["mkdir", "-p", "-m", "0755", manDir]; - - if (FILE.isWritable(FILE.dirname(manDir))) - success = OS.system(cmd) === 0; - else - { - useSudo = true; - success = OS.system(sudo.concat(cmd)) === 0; - } - - if (!success) - { + if (sudo(["mkdir", "-p", "-m", "0755", manDir])) stream.print("\0red(Unable to create the man directory.\0)"); - OS.exit(1); - } } - cmd = ["cp", "-f", pageFile, manDir]; - - if (FILE.isWritable(manDir)) - success = OS.system(cmd) === 0; - else - success = OS.system(sudo.concat(cmd)) === 0; - - if (!success) + if (sudo(["cp", "-f", pageFile, manDir])) stream.print("\0red(Unable to copy the man file.\0)"); } } global.xcodebuildCanListSDKs = function() { - return OS.system("xcodebuild -showsdks > /dev/null 2>&1") == 0; -} + return global.exec("xcodebuild -showsdks", true) === 0; +}; global.xcodebuildHasTenPointFiveSDK = function() { if (xcodebuildCanListSDKs()) - return OS.system("xcodebuild -showsdks | grep 'macosx10.5' > /dev/null 2>&1") == 0; + return global.exec("xcodebuild -showsdks | grep 'macosx10.5'", true) === 0; return FILE.exists(FILE.join("/", "Developer", "SDKs", "MacOSX10.5.sdk")); -} +}; global.colorize = function(/* String */ message, /* String */ color) { @@ -482,12 +523,12 @@ global.colorize = function(/* String */ message, /* String */ color) message = "\0bold(" + message + "\0)"; return message; -} +}; global.colorPrint = function(/* String */ message, /* String */ color) { stream.print(colorize(message, color)); -} +}; // built in tasks