From bfd8eefa0e0f1c3d44a761920a1ddab7c4ca89d5 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 May 2011 21:14:02 -0400 Subject: [PATCH 01/20] Added textFrame method to locate the text within the view --- AppKit/_CPImageAndTextView.j | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/AppKit/_CPImageAndTextView.j b/AppKit/_CPImageAndTextView.j index 275b0e051..4323b17d8 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) From d581dec6cf40a7f82832efafc8bb6aa9b5cf87ce Mon Sep 17 00:00:00 2001 From: cacaodev Date: Mon, 13 Feb 2012 00:27:44 +0100 Subject: [PATCH 02/20] CPTabView: Do not track the segment when the delegate disallows item selection. --- AppKit/CPTabView.j | 11 ++-- Tests/Manual/CPTabViewNib/AppController.j | 5 ++ .../CPTabViewNib/Resources/MainMenu.cib | 2 +- .../CPTabViewNib/Resources/MainMenu.xib | 58 ++++++++++++++----- 4 files changed, 56 insertions(+), 20 deletions(-) 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/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;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;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 From ee190d07c58c3d6d7a08df6e7f05405aa797ab44 Mon Sep 17 00:00:00 2001 From: Richard van Zon Date: Wed, 29 Feb 2012 13:13:31 +0100 Subject: [PATCH 03/20] Added support for directory symbolic links --- Tools/XcodeCapp/TNXCodeCapp.m | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index bb1196b01..b1b7d2dda 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,26 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification flags = kFSEventStreamCreateFlagUseCFTypes; } + // add symlinked directories + NSFileManager *fileManager = [NSFileManager defaultManager]; + NSError *error; + + NSArray *fileList = [fileManager contentsOfDirectoryAtPath:aPath error:&error]; + + for (NSString *node in fileList) + { + NSDictionary *attributes = [fileManager attributesOfItemAtPath:aPath error:&error]; + if ([[attributes objectForKey:@"NSFileType"] isEqualTo:NSFileTypeDirectory]) + { + NSString *subDirectoryPath = [aPath stringByAppendingPathComponent:node]; + NSString *symlinkDestination = [fileManager destinationOfSymbolicLinkAtPath:subDirectoryPath error:&error]; + if (symlinkDestination) + { + [pathsToWatch addObject:subDirectoryPath]; + } + } + } + stream = FSEventStreamCreate(NULL, &fsevents_callback, &context, (CFArrayRef) pathsToWatch, [lastEventId unsignedLongLongValue], latency, flags); From 0ec10515cd449a659a349c78b6215c020277bf07 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Thu, 5 Apr 2012 20:45:19 +0200 Subject: [PATCH 04/20] Small progress indicator images --- AppKit/CPProgressIndicator.j | 4 ++-- .../CPProgressIndicatorSpinningStyleMini.gif | Bin 0 -> 951 bytes .../CPProgressIndicatorSpinningStyleSmall.gif | Bin 0 -> 2531 bytes 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif create mode 100644 AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif 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/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif new file mode 100644 index 0000000000000000000000000000000000000000..b44c8785a7742c023ab7fcfdfca51ba8dcd32573 GIT binary patch literal 951 zcmZ?wbhEHb6krfw_`<;O|Nnmm28ItGK6G_;J$UfI&CRW7f_WB$PSPr8Cc5|6quMe6`!tPa&h7~?l@t!hfL># z6NlCaZ9bT|fq9ur(;ym6{Fo51#Np!(rO@W4&4J3C=N>vW##qlk%YE2z zl@N~vYyNpFBNeGKW(O87l^Pvm7JhCnUY4eKWhM?b2Hq5w22&O`c>zt_SpupO5{AGd1N)C>>0vjs! zx-m5#Dh=)w5ol(tP;O=AWnnp_xBqTSTck)@pCF45Q@j#0D^~%Ru~Tz+BZ~kFcSmfE z4;ycc*`(^4s#z9u&7;k+I;8^Sl$$(2r?9wixGHhkzNf*;MCU)M)NlgxxXVaJgv$bWDpPhsQ^y(^^9P z(%csU`}G}~H+Jaq2?#ZsGzhS;9$r}>V8YiEr2T!5t`PhD7h4O~a-3M6a4|q*ni)s) z!v%AtK7{K3QQ+j@*3w~V(PUxP(AJMt%JFa2Z_{$jo>)J*i`#ojPgksCotfDJGpyl~ z1CAmIP`D^@9RDZ>bV|E4H_zUE49vRMEDStYgqk)s*!o#7xx%>{wIV(UcT z6^aT-y;$;gW9mGfSE2ddM)BcMpYHaAb#5`tN)KmAbtozI(AO_duy5^5t5crTIn8X! zWM!-lr~^4*rw-5oO-dZiAEl0HakW|V6a;NnWop@=Y{0f;R>DGs15)aTlV@ry5o4a> r<=`MAw_p6=Rv{57eZzy9%q9XIhZ6RNt(EFzVRm}7FN}qsx3m@jHn$gw literal 0 HcmV?d00001 diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif new file mode 100644 index 0000000000000000000000000000000000000000..5231ebeb0fc8a94dfa8da4273c1a9026fe25de3f GIT binary patch literal 2531 zcmc(fX;f2Z8pkiWH#f_@IC^ieY_S1}EVU36D67gERtX4bB%;J1;EF5)L1Ya{kTrxo zQ4*3EaG?mIC{h-Y#p1zQmD15cYC&;rJ$9U#o^fF2%bYWOotgLJd!F~a=l4AS=f@5T zaCM7k01V(g0DSuN2>^iGw{I607x(n^G&ME3xVXf`#7s|5KYRA9udi?2x^)l)E!F(% zSbRdZ`$z5Y_2&3*vS)z?OScw(H}y?Th)+)tFfxhkGi~(q}{Y*&W`2m;4pqfonj%Z z8T^)IL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U0WnC3brSp&2-ClJG`wn{>Dv*`_`AhC49rZ&} zVcntU5vr5<#hCNc46Gk@;(iRG6&Vq?; z+og6KJA?C2Jswzba_r>W3kP2F{HLmZwIJs?Mu%^D>_=(bo9Ytu8=tDu{QUi`!1^Xv zich@<iioOU+P-a}Y-lAD zzWrbDvxUY>z>-SWT%lA}E|a)=CJX8 z6f^~4m=vn!M-;#)I*Qx_C?jx{gm@P8B|2MTwY5x}HezE+12{f0~-5FFm~xffBV$4LmHhnF%i1{TEF-bYLx!Wea?6uv(- zhZD!#e8KxaVK4pWL!Kj5zz6JgUx-em&M2o`#YXMSS*)rZ>%fWhm7VzCScHE7Uq`v& literal 0 HcmV?d00001 From ec9c68205290523f800eff4ab111a1e8d9cb85f1 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Fri, 6 Apr 2012 13:56:06 +0200 Subject: [PATCH 05/20] Small progress indicator images fixed (http://www.preloaders.net/en/terms_of_use) --- .../CPProgressIndicatorSpinningStyleMini.gif | Bin 951 -> 4685 bytes .../CPProgressIndicatorSpinningStyleSmall.gif | Bin 2531 -> 8796 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleMini.gif index b44c8785a7742c023ab7fcfdfca51ba8dcd32573..e0124ff71dfae05eb2ae7eaa23b7aa34ba0f1c3f 100644 GIT binary patch literal 4685 zcmbW5dvH|c8He|B&e^kP@0aW?dpUbMdpmowyGbKphQis+BFRb#4ZG+>3na9_P!wU> z0b|FKEH?uN2#~~Z(wrLfKw6)Z+4%%slseLyeiO8rU=Ko~o zJkR_4z3-PPQImHut~QpGYQ#KN!wEooo1ML))gd!SjRHKfUg8 zd3t+#m;GW{-TifCv9gwREdy^3T>I!+S7+DIABS%I_eN@3>cF7`%N|+Q_i|t3uNo^R zR#@%U=2gx8zw1v`rG~E#=el!?7A|Vr+BSG;@cQ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t`PhD7h4O~a-3M6a4|q*ni)s) z!v%AtK7{K3QQ+j@*3w~V(PUxP(AJMt%JFa2Z_{$jo>)J*i`#ojPgksCotfDJGpyl~ z1CAmIP`D^@9RDZ>bV|E4H_zUE49vRMEDStYgqk)s*!o#7xx%>{wIV(UcT z6^aT-y;$;gW9mGfSE2ddM)BcMpYHaAb#5`tN)KmAbtozI(AO_duy5^5t5crTIn8X! zWM!-lr~^4*rw-5oO-dZiAEl0HakW|V6a;NnWop@=Y{0f;R>DGs15)aTlV@ry5o4a> r<=`MAw_p6=Rv{57eZzy9%q9XIhZ6RNt(EFzVRm}7FN}qsx3m@jHn$gw diff --git a/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif b/AppKit/Resources/CPProgressIndicator/CPProgressIndicatorSpinningStyleSmall.gif index 5231ebeb0fc8a94dfa8da4273c1a9026fe25de3f..140e850c74b529e892ba8e9fac627f704d6a318f 100644 GIT binary patch literal 8796 zcmb8!X;_ozx-akyZ$d^)LMB3hB!mzkKms8QVpm84L>wAq9!kR?A|f)0pwxztgrH!9 zTEzhcoWP|Pl{&KA34)@v76mJ&DjBx|YZ82V<$*aV8$O&I#6d|R=apAA#bDY?LoM(pL{uo~P4SMsiGY%fnao3kLl>4GBZU}MFD zav?NcUWniF)eqzQhuki7#tQNv+TsG*(rS{dEHS7ekVZ~3s9fqfLD?_?Hjf4^4oX#^ zg>L=|tYoPJuW@0Zp>sbJn1sNe3g*S4s$KDt1g@bqNJh8NxC+PKQ+Q|hAY`>OPWr9? z3IUzG^QMgKGbrg5^Oym1zJqqGsKu%^+xDs%L|AoJx5C8_+?f&hI0d+Qu4bVbp$c}$%re5I(Gc`3w zn>O10+ouUk4Z)G{CVnteV2-x$*lzbfJxcE!0rX4jc7R$|tey){$8tKx$*C@B+Alrx z1io8#t22VVs$l5)M;c8*vZ}W;r2{_V@B_E=gV_Eihgfn&g@2VoTJ33a$zn1C4g6G| zR7LW1@bn2TWqKGy6lHLn(wU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6uKVtk|^E4=%e%Q}Ctf3J{ z6w2e2()9feN-d&NH|h|6i+WR2ryp2T6$YZHJH7gfX>Tu5DNsq61b6_2^VCkvG+Sig zMs-FJROG*zb`5O>xY7A0r-AgDy7~F)+kT~1^TEksuRUkEvmT|>U*q`=0?!&oIH53o z*RP((t-n~~vufq>zh4$WWZRMeEQ6U0WnC3brSp&2-ClJG`wn{>Dv*`_`AhC49rZ&} zVcntU5vr5<#hCNc46Gk@;(iRG6&Vq?; z+og6KJA?C2Jswzba_r>W3kP2F{HLmZwIJs?Mu%^D>_=(bo9Ytu8=tDu{QUi`!1^Xv zich@<iioOU+P-a}Y-lAD zzWrbDvxUY>z>-SWT%lA}E|a)=CJX8 z6f^~4m=vn!M-;#)I*Qx_C?jx{gm@P8B|2MTwY5x}HezE+12{f0~-5FFm~xffBV$4LmHhnF%i1{TEF-bYLx!Wea?6uv(- zhZD!#e8KxaVK4pWL!Kj5zz6JgUx-em&M2o`#YXMSS*)rZ>%fWhm7VzCScHE7Uq`v& From 86d5818c0fc6ba0f391becd4b4abd680a65babae Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Sat, 7 Apr 2012 10:42:27 -0700 Subject: [PATCH 06/20] Revert "Use /var/tmp, in Lion /tmp is not world writable" This reverts commit e9d076adcdcab3a0f57445846fd5669b34acc600. --- Tools/nib2cib/Converter.j | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]; From b74682493337db6a56c24a13efe86d42c0cc0fa7 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 8 Apr 2012 18:10:41 +0200 Subject: [PATCH 07/20] Formatting. --- Foundation/CPArray+KVO.j | 2 +- Foundation/CPDate.j | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Foundation/CPArray+KVO.j b/Foundation/CPArray+KVO.j index d58666ff2..7a63b3923 100644 --- a/Foundation/CPArray+KVO.j +++ b/Foundation/CPArray+KVO.j @@ -422,7 +422,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]); From 40d30459b84ed551124f89312053c711a57597cc Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 8 Apr 2012 18:10:54 +0200 Subject: [PATCH 08/20] Missing semicolons. --- Objective-J/CFHTTPRequest.js | 46 ++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 20 deletions(-) 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) { From a3a01c2419b924e5be3fa7d65abcfe6cddaffd7c Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Sun, 8 Apr 2012 18:50:54 +0200 Subject: [PATCH 09/20] Missing semicolons, whitespace. --- Objective-J/CFURL.js | 72 ++++++++++++++++++++++---------------------- 1 file changed, 36 insertions(+), 36 deletions(-) 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); From ec80a4c9e695ae0372cb2a9b6033784a51fb7658 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Apr 2012 00:59:57 -0400 Subject: [PATCH 10/20] Add some missing imports --- AppKit/AppKit.j | 2 ++ 1 file changed, 2 insertions(+) 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" From 342bde7767f5192ebf46b59ec5f5e961958a3cef Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Apr 2012 01:56:59 -0400 Subject: [PATCH 11/20] Started linting CPRuleEditor classes --- AppKit/CPRuleEditor/CPRuleEditor.j | 253 ++++++++++-------- .../CPRuleEditor/_CPPredicateEditorRowNode.j | 16 +- 2 files changed, 146 insertions(+), 123 deletions(-) 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 From d56a15db83ce83c825e3645bcba6727dd086b441 Mon Sep 17 00:00:00 2001 From: Richard van Zon Date: Mon, 9 Apr 2012 08:06:53 +0200 Subject: [PATCH 12/20] Using fm instance and ignore errors --- Tools/XcodeCapp/TNXCodeCapp.m | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index b1b7d2dda..43faf874e 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -144,18 +144,15 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification } // add symlinked directories - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSError *error; - - NSArray *fileList = [fileManager contentsOfDirectoryAtPath:aPath error:&error]; + NSArray *fileList = [fm contentsOfDirectoryAtPath:aPath error:nil]; for (NSString *node in fileList) { - NSDictionary *attributes = [fileManager attributesOfItemAtPath:aPath error:&error]; + NSDictionary *attributes = [fm attributesOfItemAtPath:aPath error:nil]; if ([[attributes objectForKey:@"NSFileType"] isEqualTo:NSFileTypeDirectory]) { NSString *subDirectoryPath = [aPath stringByAppendingPathComponent:node]; - NSString *symlinkDestination = [fileManager destinationOfSymbolicLinkAtPath:subDirectoryPath error:&error]; + NSString *symlinkDestination = [fm destinationOfSymbolicLinkAtPath:subDirectoryPath error:nil]; if (symlinkDestination) { [pathsToWatch addObject:subDirectoryPath]; From 324e75650d3147e14855affd234f3f205aa5d14f Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Mon, 9 Apr 2012 10:24:39 -0700 Subject: [PATCH 13/20] code style cleaning --- Tools/XcodeCapp/TNXCodeCapp.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Tools/XcodeCapp/TNXCodeCapp.m b/Tools/XcodeCapp/TNXCodeCapp.m index 43faf874e..2ec82c616 100644 --- a/Tools/XcodeCapp/TNXCodeCapp.m +++ b/Tools/XcodeCapp/TNXCodeCapp.m @@ -153,6 +153,7 @@ NSString * const XCCListeningStartNotification = @"XCCListeningStartNotification { NSString *subDirectoryPath = [aPath stringByAppendingPathComponent:node]; NSString *symlinkDestination = [fm destinationOfSymbolicLinkAtPath:subDirectoryPath error:nil]; + if (symlinkDestination) { [pathsToWatch addObject:subDirectoryPath]; From bc8dc10ac34b7247f4d21e457293a4e682e983c7 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Apr 2012 13:25:38 -0400 Subject: [PATCH 14/20] Fix for #1433 --- AppKit/CPWindow/CPWindow.j | 39 ++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) 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; From 91642080d61f42f1f9142fcfee14ae61c9079fc6 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Mon, 9 Apr 2012 15:53:31 -0400 Subject: [PATCH 15/20] Eliminate flashing of insertion point when becoming first responder due to double setTimeout --- AppKit/CPTextField.j | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index a421c1f59..5f3197720 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 From 1e2964ad8f5dcbf220c4bdf802730591d0864bc8 Mon Sep 17 00:00:00 2001 From: Antoine Mercadal Date: Mon, 9 Apr 2012 19:20:47 -0700 Subject: [PATCH 16/20] Fix a crash do to calling non-existing selector That said, the popover is not moving correctly with the attached view as it did. Patch in a following commit --- AppKit/_CPAttachedWindow.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; } } From c04f188adc27d2fcc643649f832ff3d80de35ae2 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Tue, 10 Apr 2012 14:26:00 -0400 Subject: [PATCH 17/20] Fix for dump_theme failing without admin rights, common.jake linting --- Tools/dump_theme/Jakefile | 5 +- common.jake | 194 +++++++++++++++++++++++--------------- 2 files changed, 121 insertions(+), 78 deletions(-) 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/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 From f6bdf06e4503db243e6e3f26c05f40f2390e67e4 Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Tue, 10 Apr 2012 15:07:39 -0400 Subject: [PATCH 18/20] Fix _CPFormatLogMessage to do something intelligent if aLevel and/or aTitle is empty or not passed --- Objective-J/CPLog.js | 47 ++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 15 deletions(-) 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); From f222d7bfe7a51ae6b8247977b7c43c19284cf01d Mon Sep 17 00:00:00 2001 From: cacaodev Date: Thu, 8 Mar 2012 01:19:17 +0100 Subject: [PATCH 19/20] CPBinder: move placeholder handling to superclass, add 2 subclassable methods for appying the regular value or a placeholder value. Update binder subclasses for CPTextField, CPCheckBox, CPColorWeel. --- AppKit/CPCheckBox.j | 39 +++++++------------------------------- AppKit/CPKeyValueBinding.j | 33 ++++++++++++++++++++++++++++---- AppKit/CPTextField.j | 31 +++++++----------------------- 3 files changed, 43 insertions(+), 60 deletions(-) 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 89b4214e2..d7518026d 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:@"Can't 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/CPTextField.j b/AppKit/CPTextField.j index 5f3197720..0145649c2 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -1521,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 From 742bfcb0e77e62b56add2615fcca41628f9ac8db Mon Sep 17 00:00:00 2001 From: cacaodev Date: Tue, 10 Apr 2012 22:05:34 +0200 Subject: [PATCH 20/20] Fix non-applicable syntax --- AppKit/CPKeyValueBinding.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPKeyValueBinding.j b/AppKit/CPKeyValueBinding.j index d7518026d..ffb33f9ea 100644 --- a/AppKit/CPKeyValueBinding.j +++ b/AppKit/CPKeyValueBinding.j @@ -162,7 +162,7 @@ var CPBindingOperationAnd = 0, if (newValue === CPNotApplicableMarker && [options objectForKey:CPRaisesForNotApplicableKeysBindingOption]) { [CPException raise:CPGenericException - reason:@"Can't transform non applicable key on: " + _source + " Key Path:" + keyPath + " value: " + newValue]; + reason:@"Cannot transform non-applicable key on: " + _source + " key path: " + keyPath + " value: " + newValue]; } var value = [self _placeholderForMarker:newValue];