diff --git a/AppKit/AppKit.j b/AppKit/AppKit.j index 6da7c3185..64de5a469 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" @@ -46,6 +47,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/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/CPKeyValueBinding.j b/AppKit/CPKeyValueBinding.j index 76e0bafd1..9bab609e9 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 diff --git a/AppKit/CPProgressIndicator.j b/AppKit/CPProgressIndicator.j index 7950ad3d8..e1e30b571 100644 --- a/AppKit/CPProgressIndicator.j +++ b/AppKit/CPProgressIndicator.j @@ -88,9 +88,9 @@ var CPProgressIndicatorSpinningStyleColors = nil, CPProgressIndicatorSpinningStyleColors = []; CPProgressIndicatorSpinningStyleColors[CPMiniControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: - [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; + [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif"] size:CGSizeMake(16.0, 16.0)]]; CPProgressIndicatorSpinningStyleColors[CPSmallControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: - [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; + [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif"] size:CGSizeMake(32.0, 32.0)]]; CPProgressIndicatorSpinningStyleColors[CPRegularControlSize] = [CPColor colorWithPatternImage:[[CPImage alloc] initWithContentsOfFile: [bundle pathForResource:@"CPProgressIndicator/CPProgressIndicatorSpinningStyleRegular.gif"] size:CGSizeMake(64.0, 64.0)]]; 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/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/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/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/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif new file mode 100644 index 000000000..e0124ff71 Binary files /dev/null and b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif differ diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif new file mode 100644 index 000000000..140e850c7 Binary files /dev/null and b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif differ 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 29ed9e7de..d7b39bfce 100644 --- a/AppKit/_CPImageAndTextView.j +++ b/AppKit/_CPImageAndTextView.j @@ -288,6 +288,28 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0, return _textShadowOffset; } +- (CGRect)textFrame +{ + [self layoutIfNeeded]; + + var textFrame = CGRectMakeZero(); + + if (_DOMTextElement) + { + var textStyle = _DOMTextElement.style; + + textFrame.origin.y = parseInt(textStyle.top.substr(0, textStyle.top.length - 2), 10), + textFrame.origin.x = parseInt(textStyle.left.substr(0, textStyle.left.length - 2), 10), + textFrame.size.width = parseInt(textStyle.width.substr(0, textStyle.width.length - 2), 10), + textFrame.size.height = parseInt(textStyle.height.substr(0, textStyle.height.length - 2), 10); + + textFrame.size.width += _textShadowOffset.width; + textFrame.size.height += _textShadowOffset.height; + } + + return textFrame; +} + - (void)setImage:(CPImage)anImage { if (_image == anImage) diff --git a/Foundation/CPArray+KVO.j b/Foundation/CPArray+KVO.j index f89e080cf..11068d42e 100644 --- a/Foundation/CPArray+KVO.j +++ b/Foundation/CPArray+KVO.j @@ -424,7 +424,7 @@ if (aKey.indexOf("@") === 0) { if (aKey.indexOf(".") !== -1) - [CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key ("+aKey+"). use valueForKeyPath:"]; + [CPException raise:CPInvalidArgumentException reason:"called valueForKey: on an array with a complex key (" + aKey + "). use valueForKeyPath:"]; if (aKey === "@count") return length; diff --git a/Foundation/CPDate.j b/Foundation/CPDate.j index febad01e9..e666ceb15 100644 --- a/Foundation/CPDate.j +++ b/Foundation/CPDate.j @@ -119,7 +119,7 @@ var CPDateReferenceDate = new Date(Date.UTC(2001, 1, 1, 0, 0, 0, 0)); date.setMinutes(d[5]); date.setSeconds(d[6]); - self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000); + self = new Date(date.getTime() + (timeZoneOffset - date.getTimezoneOffset()) * 60 * 1000); return self; } @@ -236,7 +236,9 @@ var numericKeys = [1, 4, 5, 6, 7, 10, 11]; Date.parseISO8601 = function (date) { - var timestamp, struct, minutesOffset = 0; + var timestamp, + struct, + minutesOffset = 0; // First, check for native parsing. timestamp = Date.parse(date); @@ -245,9 +247,7 @@ Date.parseISO8601 = function (date) { // avoid NaN timestamps caused by “undefined” values being passed to Date.UTC for (var i = 0, k; (k = numericKeys[i]); ++i) - { struct[k] = +struct[k] || 0; - } // allow undefined days and months struct[2] = (+struct[2] || 1) - 1; @@ -258,9 +258,7 @@ Date.parseISO8601 = function (date) minutesOffset = struct[10] * 60 + struct[11]; if (struct[9] === '+') - { minutesOffset = 0 - minutesOffset; - } } return Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]); diff --git a/Objective-J/CFHTTPRequest.js b/Objective-J/CFHTTPRequest.js index 2ef8c721f..6d57fc3da 100644 --- a/Objective-J/CFHTTPRequest.js +++ b/Objective-J/CFHTTPRequest.js @@ -52,7 +52,10 @@ function Asynchronous(/*Function*/ aFunction) if (asynchronousTimeoutCount > currentAsynchronousTimeoutCount) aFunction.apply(this, args); else - asynchronousFunctionQueue.push(function() { aFunction.apply(this, args) }); + asynchronousFunctionQueue.push(function() + { + aFunction.apply(this, args); + }); }; } @@ -77,7 +80,7 @@ if (window.ActiveXObject !== undefined) NativeRequest = function() { return new ActiveXObject(MSXML_XMLHTTP); - } + }; break; } @@ -103,12 +106,15 @@ GLOBAL(CFHTTPRequest) = function() this._stateChangeHandler = function() { determineAndDispatchHTTPRequestEvents(self); - } + }; this._nativeRequest.onreadystatechange = this._stateChangeHandler; if (CFHTTPRequest.AuthenticationDelegate !== nil) - this._eventDispatcher.addEventListener("HTTP403", function(){CFHTTPRequest.AuthenticationDelegate(self)}); + this._eventDispatcher.addEventListener("HTTP403", function() + { + CFHTTPRequest.AuthenticationDelegate(self); + }); } CFHTTPRequest.UninitializedState = 0; @@ -130,7 +136,7 @@ CFHTTPRequest.prototype.status = function() { return 0; } -} +}; CFHTTPRequest.prototype.statusText = function() { @@ -142,12 +148,12 @@ CFHTTPRequest.prototype.statusText = function() { return ""; } -} +}; CFHTTPRequest.prototype.readyState = function() { return this._nativeRequest.readyState; -} +}; CFHTTPRequest.prototype.success = function() { @@ -159,7 +165,7 @@ CFHTTPRequest.prototype.success = function() // file:// requests return with status 0, to know if they succeeded, we // need to know if there was any content. return status === 0 && this.responseText() && this.responseText().length; -} +}; CFHTTPRequest.prototype.responseXML = function() { @@ -169,7 +175,7 @@ CFHTTPRequest.prototype.responseXML = function() return responseXML; return parseXML(this.responseText()); -} +}; CFHTTPRequest.prototype.responsePropertyList = function() { @@ -179,32 +185,32 @@ CFHTTPRequest.prototype.responsePropertyList = function() return CFPropertyList.propertyListFromXML(this.responseXML()); return CFPropertyList.propertyListFromString(responseText); -} +}; CFHTTPRequest.prototype.responseText = function() { return this._nativeRequest.responseText; -} +}; CFHTTPRequest.prototype.setRequestHeader = function(/*String*/ aHeader, /*Object*/ aValue) { this._requestHeaders[aHeader] = aValue; -} +}; CFHTTPRequest.prototype.getResponseHeader = function(/*String*/ aHeader) { return this._nativeRequest.getResponseHeader(aHeader); -} +}; CFHTTPRequest.prototype.getAllResponseHeaders = function() { return this._nativeRequest.getAllResponseHeaders(); -} +}; CFHTTPRequest.prototype.overrideMimeType = function(/*String*/ aMimeType) { this._mimeType = aMimeType; -} +}; CFHTTPRequest.prototype.open = function(/*String*/ aMethod, /*String*/ aURL, /*Boolean*/ isAsynchronous, /*String*/ aUser, /*String*/ aPassword) { @@ -215,7 +221,7 @@ CFHTTPRequest.prototype.open = function(/*String*/ aMethod, /*String*/ aURL, /*B this._user = aUser; this._password = aPassword; return this._nativeRequest.open(aMethod, aURL, isAsynchronous, aUser, aPassword); -} +}; CFHTTPRequest.prototype.send = function(/*Object*/ aBody) { @@ -246,23 +252,23 @@ CFHTTPRequest.prototype.send = function(/*Object*/ aBody) // FIXME: Do something more complex, with 404's? this._eventDispatcher.dispatchEvent({ type:"failure", request:this }); } -} +}; CFHTTPRequest.prototype.abort = function() { this._isOpen = false; return this._nativeRequest.abort(); -} +}; CFHTTPRequest.prototype.addEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.addEventListener(anEventName, anEventListener); -} +}; CFHTTPRequest.prototype.removeEventListener = function(/*String*/ anEventName, /*Function*/ anEventListener) { this._eventDispatcher.removeEventListener(anEventName, anEventListener); -} +}; function determineAndDispatchHTTPRequestEvents(/*CFHTTPRequest*/ aRequest) { diff --git a/Objective-J/CFURL.js b/Objective-J/CFURL.js index b9b5052b5..cc561a422 100644 --- a/Objective-J/CFURL.js +++ b/Objective-J/CFURL.js @@ -124,18 +124,18 @@ function CFURLGetParts(/*CFURL*/ aURL) pathComponents = parts.pathComponents, index = 0, count = split.length; - + for (; index < count; ++index) { var component = split[index]; - + if (component) pathComponents.push(component); - + else if (index === 0) pathComponents.push("/"); } - + parts.pathComponents = pathComponents; } @@ -209,7 +209,7 @@ DISPLAY_NAME(CFURL); CFURL.prototype.UID = function() { return this._UID; -} +}; DISPLAY_NAME(CFURL.prototype.UID); @@ -218,14 +218,14 @@ var URLMap = { }; CFURL.prototype.mappedURL = function() { return URLMap[this.absoluteString()] || this; -} +}; DISPLAY_NAME(CFURL.prototype.mappedURL); CFURL.setMappedURLForURL = function(/*CFURL*/ fromURL, /*CFURL*/ toURL) { URLMap[fromURL.absoluteString()] = toURL; -} +}; DISPLAY_NAME(CFURL.setMappedURLForURL); @@ -243,7 +243,7 @@ CFURL.prototype.schemeAndAuthority = function() string += "//" + authority; return string; -} +}; DISPLAY_NAME(CFURL.prototype.schemeAndAuthority); @@ -253,14 +253,14 @@ CFURL.prototype.absoluteString = function() this._absoluteString = this.absoluteURL().string(); return this._absoluteString; -} +}; DISPLAY_NAME(CFURL.prototype.absoluteString); CFURL.prototype.toString = function() { return this.absoluteString(); -} +}; DISPLAY_NAME(CFURL.prototype.toString); @@ -280,7 +280,7 @@ function resolveURL(aURL) if (parts.scheme || parts.authority) resolvedParts = parts; - + else { resolvedParts = { }; @@ -296,14 +296,14 @@ function resolveURL(aURL) resolvedParts.queryString = parts.queryString; resolvedParts.fragment = parts.fragment; - var pathComponents = parts.pathComponents + var pathComponents = parts.pathComponents; if (pathComponents.length && pathComponents[0] === "/") { resolvedParts.path = parts.path; resolvedParts.pathComponents = pathComponents; } - + else { var basePathComponents = baseParts.pathComponents, @@ -424,7 +424,7 @@ CFURL.prototype.absoluteURL = function() this._absoluteURL = resolveURL(this); return this._absoluteURL; -} +}; DISPLAY_NAME(CFURL.prototype.absoluteURL); @@ -458,7 +458,7 @@ CFURL.prototype.standardizedURL = function() } return this._standardizedURL; -} +}; DISPLAY_NAME(CFURL.prototype.standardizedURL); @@ -466,7 +466,7 @@ function CFURLPartsCreateCopy(parts) { var copiedParts = { }, count = URI_KEYS.length; - + while (count--) { var partName = URI_KEYS[count]; @@ -480,7 +480,7 @@ function CFURLPartsCreateCopy(parts) CFURL.prototype.string = function() { return this._string; -} +}; DISPLAY_NAME(CFURL.prototype.string); @@ -494,7 +494,7 @@ CFURL.prototype.authority = function() var baseURL = this.baseURL(); return baseURL && baseURL.authority() || ""; -} +}; DISPLAY_NAME(CFURL.prototype.authority); @@ -520,21 +520,21 @@ CFURL.prototype.hasDirectoryPath = function() } return hasDirectoryPath; -} +}; DISPLAY_NAME(CFURL.prototype.hasDirectoryPath); CFURL.prototype.hostName = function() { return this.authority(); -} +}; DISPLAY_NAME(CFURL.prototype.hostName); CFURL.prototype.fragment = function() { return PARTS(this).fragment; -} +}; DISPLAY_NAME(CFURL.prototype.fragment); @@ -553,21 +553,21 @@ CFURL.prototype.lastPathComponent = function() } return this._lastPathComponent; -} +}; DISPLAY_NAME(CFURL.prototype.lastPathComponent); CFURL.prototype.path = function() { return PARTS(this).path; -} +}; DISPLAY_NAME(CFURL.prototype.path); CFURL.prototype.pathComponents = function() { return PARTS(this).pathComponents; -} +}; DISPLAY_NAME(CFURL.prototype.pathComponents); @@ -583,14 +583,14 @@ CFURL.prototype.pathExtension = function() var index = lastPathComponent.lastIndexOf("."); return index <= 0 ? "" : lastPathComponent.substring(index + 1); -} +}; DISPLAY_NAME(CFURL.prototype.pathExtension); CFURL.prototype.queryString = function() { return PARTS(this).queryString; -} +}; DISPLAY_NAME(CFURL.prototype.queryString); @@ -613,42 +613,42 @@ CFURL.prototype.scheme = function() } return scheme; -} +}; DISPLAY_NAME(CFURL.prototype.scheme); CFURL.prototype.user = function() { return PARTS(this).user; -} +}; DISPLAY_NAME(CFURL.prototype.user); CFURL.prototype.password = function() { return PARTS(this).password; -} +}; DISPLAY_NAME(CFURL.prototype.password); CFURL.prototype.portNumber = function() { return PARTS(this).portNumber; -} +}; DISPLAY_NAME(CFURL.prototype.portNumber); CFURL.prototype.domain = function() { return PARTS(this).domain; -} +}; DISPLAY_NAME(CFURL.prototype.domain); CFURL.prototype.baseURL = function() { return this._baseURL; -} +}; DISPLAY_NAME(CFURL.prototype.baseURL); @@ -665,7 +665,7 @@ CFURL.prototype.asDirectoryPathURL = function() lastPathComponent = "./" + lastPathComponent; return new CFURL(lastPathComponent + "/", this); -} +}; DISPLAY_NAME(CFURL.prototype.asDirectoryPathURL); @@ -680,14 +680,14 @@ function CFURLGetResourcePropertiesForKeys(/*CFURL*/ aURL) CFURL.prototype.resourcePropertyForKey = function(/*String*/ aKey) { return CFURLGetResourcePropertiesForKeys(this).valueForKey(aKey); -} +}; DISPLAY_NAME(CFURL.prototype.resourcePropertyForKey); CFURL.prototype.setResourcePropertyForKey = function(/*String*/ aKey, /*id*/ aValue) { CFURLGetResourcePropertiesForKeys(this).setValueForKey(aKey, aValue); -} +}; DISPLAY_NAME(CFURL.prototype.setResourcePropertyForKey); @@ -698,6 +698,6 @@ CFURL.prototype.staticResourceData = function() data.setRawString(StaticResource.resourceAtURL(this).contents()); return data; -} +}; DISPLAY_NAME(CFURL.prototype.staticResourceData); 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/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/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index bb1196b01..2ec82c616 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); 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 33da96f48..be2a1b346 100644 --- a/Tools/nib2cib/Converter.j +++ b/Tools/nib2cib/Converter.j @@ -116,13 +116,13 @@ ConverterConversionException = @"ConverterConversionException"; try { // Compile xib or nib to make sure we have a non-new format nib. - temporaryNibFilePath = FILE.join("/var/tmp", FILE.basename(aFilePath) + ".tmp.nib"); + temporaryNibFilePath = FILE.join("/tmp", FILE.basename(aFilePath) + ".tmp.nib"); if (OS.popen(["/usr/bin/ibtool", aFilePath, "--compile", temporaryNibFilePath]).wait() === 1) [CPException raise:ConverterConversionException reason:@"Could not compile file: " + aFilePath]; // Convert from binary plist to XML plist - var temporaryPlistFilePath = FILE.join("/var/tmp", FILE.basename(aFilePath) + ".tmp.plist"); + var temporaryPlistFilePath = FILE.join("/tmp", FILE.basename(aFilePath) + ".tmp.plist"); if (OS.popen(["/usr/bin/plutil", "-convert", "xml1", temporaryNibFilePath, "-o", temporaryPlistFilePath]).wait() === 1) [CPException raise:ConverterConversionException reason:@"Could not convert to xml plist for file: " + aFilePath]; diff --git a/common.jake b/common.jake index 28c1d6e64..7c7f18dc3 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,32 @@ 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 +526,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