mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Merge remote-tracking branch 'upstream/master' into cpview-skip_settransform
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@
|
||||
|
||||
- (CGRect)documentVisibleRect
|
||||
{
|
||||
return [self convertRect:[self bounds] fromView:_documentView];
|
||||
return [_documentView visibleRect];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -60,6 +60,8 @@ var CPCollectionViewDelegate_collectionView_acceptDrop_index_dropOperation_
|
||||
|
||||
@end
|
||||
|
||||
var HORIZONTAL_MARGIN = 2;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPCollectionView
|
||||
@@ -88,9 +90,6 @@ var CPCollectionViewDelegate_collectionView_acceptDrop_index_dropOperation_
|
||||
@param indices the indices to obtain drag types
|
||||
@return an array of drag types (CPString)
|
||||
*/
|
||||
|
||||
var HORIZONTAL_MARGIN = 2;
|
||||
|
||||
@implementation CPCollectionView : CPView
|
||||
{
|
||||
CPArray _content;
|
||||
|
||||
+51
-7
@@ -42,13 +42,6 @@
|
||||
|
||||
@end
|
||||
|
||||
@typedef CPTextAlignment
|
||||
CPLeftTextAlignment = 0;
|
||||
CPRightTextAlignment = 1;
|
||||
CPCenterTextAlignment = 2;
|
||||
CPJustifiedTextAlignment = 3;
|
||||
CPNaturalTextAlignment = 4;
|
||||
|
||||
@typedef CPControlSize
|
||||
CPRegularControlSize = 0;
|
||||
CPSmallControlSize = 1;
|
||||
@@ -126,6 +119,8 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
CGPoint _previousTrackingLocation;
|
||||
|
||||
CPControlSize _controlSize;
|
||||
|
||||
CPWritingDirection _baseWritingDirection @accessors(property=baseWritingDirection);
|
||||
}
|
||||
|
||||
+ (CPDictionary)themeAttributes
|
||||
@@ -1016,6 +1011,49 @@ var CPControlBlackColor = [CPColor blackColor];
|
||||
return [self hasThemeState:CPThemeStateHighlighted];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Base writing direction
|
||||
|
||||
/*!
|
||||
Sets the initial writing direction of the receiver
|
||||
@param writingDirection - It could be CPWritingDirectionNatural, CPWritingDirectionLeftToRight, CPWritingDirectionRightToLeft
|
||||
*/
|
||||
- (void)setBaseWritingDirection:(CPWritingDirection)writingDirection
|
||||
{
|
||||
if (writingDirection == _baseWritingDirection)
|
||||
return;
|
||||
|
||||
[self willChangeValueForKey:@"baseWritingDirection"];
|
||||
_baseWritingDirection = writingDirection;
|
||||
[self didChangeValueForKey:@"baseWritingDirection"];
|
||||
|
||||
#if PLATFORM(DOM)
|
||||
|
||||
var style;
|
||||
|
||||
switch (_baseWritingDirection)
|
||||
{
|
||||
case CPWritingDirectionNatural:
|
||||
style = "initial";
|
||||
break;
|
||||
|
||||
case CPWritingDirectionLeftToRight:
|
||||
style = "ltr";
|
||||
break;
|
||||
|
||||
case CPWritingDirectionRightToLeft:
|
||||
style = "rtl";
|
||||
break;
|
||||
|
||||
default:
|
||||
style = "initial";
|
||||
}
|
||||
|
||||
_DOMElement.style.direction = style;
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
var CPControlActionKey = @"CPControlActionKey",
|
||||
@@ -1027,6 +1065,7 @@ var CPControlActionKey = @"CPControlActionKey",
|
||||
CPControlSendsActionOnEndEditingKey = @"CPControlSendsActionOnEndEditingKey",
|
||||
CPControlTargetKey = @"CPControlTargetKey",
|
||||
CPControlValueKey = @"CPControlValueKey",
|
||||
CPControlBaseWrittingDirectionKey = @"CPControlBaseWrittingDirectionKey";
|
||||
|
||||
__Deprecated__CPImageViewImageKey = @"CPImageViewImageKey";
|
||||
|
||||
@@ -1055,6 +1094,8 @@ var CPControlActionKey = @"CPControlActionKey",
|
||||
[self setFormatter:[aCoder decodeObjectForKey:CPControlFormatterKey]];
|
||||
|
||||
[self setControlSize:[aCoder decodeIntForKey:CPControlControlSizeKey]];
|
||||
|
||||
[self setBaseWritingDirection:[aCoder decodeIntForKey:CPControlBaseWrittingDirectionKey]];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -1089,6 +1130,9 @@ var CPControlActionKey = @"CPControlActionKey",
|
||||
[aCoder encodeObject:_formatter forKey:CPControlFormatterKey];
|
||||
|
||||
[aCoder encodeInt:_controlSize forKey:CPControlControlSizeKey];
|
||||
|
||||
[aCoder encodeInt:_baseWritingDirection forKey:CPControlBaseWrittingDirectionKey];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -630,14 +630,6 @@ CPEraDatePickerElementFlag = 0x0100;
|
||||
return [[_locale objectForKey:CPLocaleCountryCode] isEqualToString:@"US"];
|
||||
}
|
||||
|
||||
/*! Check if we are in the english format or not. Depending on the locale
|
||||
*/
|
||||
- (BOOL)_isEnglishFormat
|
||||
{
|
||||
return [[_locale objectForKey:CPLocaleLanguageCode] isEqualToString:@"en"];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Key event
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ var RADIANS = Math.PI / 180;
|
||||
[_minuteHandLayer setImage:[_datePicker currentValueForThemeAttribute:@"minute-hand-image"]];
|
||||
[_secondHandLayer setImage:[_datePicker currentValueForThemeAttribute:@"second-hand-image"]];
|
||||
|
||||
if ([_datePicker _isEnglishFormat])
|
||||
if ([_datePicker _isAmericanFormat])
|
||||
{
|
||||
if (dateValue.getHours() > 11)
|
||||
[_PMAMTextField setStringValue:@"PM"]
|
||||
|
||||
@@ -353,7 +353,7 @@ var CPZeroKeyCode = 48,
|
||||
if (![self isEnabled])
|
||||
return;
|
||||
|
||||
if ([_datePicker _isEnglishFormat] && [_currentTextField dateType] == CPAMPMDateType && ([anEvent keyCode] == CPAKeyCode || [anEvent keyCode] == CPPKeyCode || [anEvent keyCode] == CPMajAKeyCode || [anEvent keyCode] == CPMajPKeyCode))
|
||||
if ([_datePicker _isAmericanFormat] && [_currentTextField dateType] == CPAMPMDateType && ([anEvent keyCode] == CPAKeyCode || [anEvent keyCode] == CPPKeyCode || [anEvent keyCode] == CPMajAKeyCode || [anEvent keyCode] == CPMajPKeyCode))
|
||||
{
|
||||
if ([anEvent keyCode] == CPAKeyCode || [anEvent keyCode] == CPMajAKeyCode)
|
||||
[_currentTextField setStringValue:@"AM"];
|
||||
@@ -725,7 +725,7 @@ var CPZeroKeyCode = 48,
|
||||
|
||||
if (hour != currentHour)
|
||||
{
|
||||
if (([_datePicker _isEnglishFormat] || [_datePicker _isAmericanFormat]))
|
||||
if ([_datePicker _isAmericanFormat])
|
||||
{
|
||||
if (![self _isAMHour])
|
||||
{
|
||||
@@ -1050,7 +1050,7 @@ var CPZeroKeyCode = 48,
|
||||
- (void)_updateHiddenTextFields
|
||||
{
|
||||
var datePickerElements = [_datePicker datePickerElements],
|
||||
isEnglishFormat = [_datePicker _isEnglishFormat];
|
||||
isAmericanFormat = [_datePicker _isAmericanFormat];
|
||||
|
||||
if (datePickerElements & CPYearMonthDatePickerElementFlag)
|
||||
{
|
||||
@@ -1083,7 +1083,7 @@ var CPZeroKeyCode = 48,
|
||||
[_textFieldSeparatorThree setHidden:NO];
|
||||
[_textFieldSeparatorFour setHidden:YES];
|
||||
|
||||
if (isEnglishFormat)
|
||||
if (isAmericanFormat)
|
||||
[_textFieldPMAM setHidden:NO];
|
||||
else
|
||||
[_textFieldPMAM setHidden:YES];
|
||||
@@ -1115,9 +1115,9 @@ var CPZeroKeyCode = 48,
|
||||
verticalInset = contentInset.top - contentInset.bottom,
|
||||
firstTexField = _textFieldMonth,
|
||||
secondTextField = _textFieldDay,
|
||||
isEnglishFormat = [_datePicker _isEnglishFormat];
|
||||
isAmericanFormat = [_datePicker _isAmericanFormat];
|
||||
|
||||
if (!isEnglishFormat)
|
||||
if (!isAmericanFormat)
|
||||
{
|
||||
firstTexField = _textFieldDay;
|
||||
secondTextField = _textFieldMonth;
|
||||
@@ -1131,7 +1131,7 @@ var CPZeroKeyCode = 48,
|
||||
else
|
||||
[secondTextField setFrameOrigin:CGPointMake(CGRectGetMaxX([_textFieldSeparatorOne frame]) + separatorContentInset.right, verticalInset)];
|
||||
|
||||
if (isEnglishFormat && [secondTextField isHidden])
|
||||
if (isAmericanFormat && [secondTextField isHidden])
|
||||
[_textFieldSeparatorTwo setFrameOrigin:CGPointMake(CGRectGetMaxX([firstTexField frame]) + separatorContentInset.left, verticalInset)];
|
||||
else
|
||||
[_textFieldSeparatorTwo setFrameOrigin:CGPointMake(CGRectGetMaxX([secondTextField frame]) + separatorContentInset.left, verticalInset)];
|
||||
@@ -1206,7 +1206,7 @@ var CPZeroKeyCode = 48,
|
||||
{
|
||||
var datePickerElements = [_datePicker datePickerElements];
|
||||
|
||||
if ([_datePicker _isEnglishFormat])
|
||||
if ([_datePicker _isAmericanFormat])
|
||||
{
|
||||
if (datePickerElements & CPYearMonthDayDatePickerElementFlag || datePickerElements & CPYearMonthDatePickerElementFlag)
|
||||
[[self superview] setFirstTextField:_textFieldMonth];
|
||||
@@ -1249,9 +1249,9 @@ var CPZeroKeyCode = 48,
|
||||
var datePickerElements = [_datePicker datePickerElements],
|
||||
firstTexField = _textFieldMonth,
|
||||
secondTextField = _textFieldDay,
|
||||
isEnglishFormat = [_datePicker _isEnglishFormat];
|
||||
isAmericanFormat = [_datePicker _isAmericanFormat];
|
||||
|
||||
if (!isEnglishFormat)
|
||||
if (!isAmericanFormat)
|
||||
{
|
||||
firstTexField = _textFieldDay;
|
||||
secondTextField = _textFieldMonth;
|
||||
@@ -1266,7 +1266,7 @@ var CPZeroKeyCode = 48,
|
||||
|
||||
if (datePickerElements & CPHourMinuteSecondDatePickerElementFlag || datePickerElements & CPHourMinuteDatePickerElementFlag)
|
||||
[_textFieldYear setNextTextField:_textFieldHour];
|
||||
else if (isEnglishFormat || (datePickerElements & CPYearMonthDayDatePickerElementFlag) == CPYearMonthDayDatePickerElementFlag)
|
||||
else if (isAmericanFormat || (datePickerElements & CPYearMonthDayDatePickerElementFlag) == CPYearMonthDayDatePickerElementFlag)
|
||||
[_textFieldYear setNextTextField:firstTexField];
|
||||
else
|
||||
[_textFieldYear setNextTextField:secondTextField];
|
||||
@@ -1275,7 +1275,7 @@ var CPZeroKeyCode = 48,
|
||||
|
||||
if ((datePickerElements & CPHourMinuteSecondDatePickerElementFlag) == CPHourMinuteSecondDatePickerElementFlag)
|
||||
[_textFieldMinute setNextTextField:_textFieldSecond];
|
||||
else if (isEnglishFormat)
|
||||
else if (isAmericanFormat)
|
||||
[_textFieldMinute setNextTextField:_textFieldPMAM];
|
||||
else if ((datePickerElements & CPYearMonthDayDatePickerElementFlag) == CPYearMonthDayDatePickerElementFlag)
|
||||
[_textFieldMinute setNextTextField:firstTexField];
|
||||
@@ -1284,7 +1284,7 @@ var CPZeroKeyCode = 48,
|
||||
else
|
||||
[_textFieldMinute setNextTextField:_textFieldHour];
|
||||
|
||||
if (isEnglishFormat)
|
||||
if (isAmericanFormat)
|
||||
[_textFieldSecond setNextTextField:_textFieldPMAM];
|
||||
else if ((datePickerElements & CPYearMonthDayDatePickerElementFlag) == CPYearMonthDayDatePickerElementFlag)
|
||||
[_textFieldSecond setNextTextField:firstTexField];
|
||||
@@ -1304,9 +1304,9 @@ var CPZeroKeyCode = 48,
|
||||
var datePickerElements = [_datePicker datePickerElements],
|
||||
firstTexField = _textFieldMonth,
|
||||
secondTextField = _textFieldDay,
|
||||
isEnglishFormat = [_datePicker _isEnglishFormat];
|
||||
isAmericanFormat = [_datePicker _isAmericanFormat];
|
||||
|
||||
if (!isEnglishFormat)
|
||||
if (!isAmericanFormat)
|
||||
{
|
||||
firstTexField = _textFieldDay;
|
||||
secondTextField = _textFieldMonth;
|
||||
@@ -1322,14 +1322,14 @@ var CPZeroKeyCode = 48,
|
||||
|
||||
if (datePickerElements & CPYearMonthDatePickerElementFlag)
|
||||
[_textFieldHour setPreviousTextField:_textFieldYear];
|
||||
else if (isEnglishFormat)
|
||||
else if (isAmericanFormat)
|
||||
[_textFieldHour setPreviousTextField:_textFieldPMAM];
|
||||
else if ((datePickerElements & CPHourMinuteSecondDatePickerElementFlag) == CPHourMinuteSecondDatePickerElementFlag)
|
||||
[_textFieldHour setPreviousTextField:_textFieldSecond];
|
||||
else
|
||||
[_textFieldHour setPreviousTextField:_textFieldMinute];
|
||||
|
||||
if (!isEnglishFormat)
|
||||
if (!isAmericanFormat)
|
||||
[_textFieldYear setPreviousTextField:_textFieldMonth];
|
||||
else if ((datePickerElements & CPYearMonthDayDatePickerElementFlag) == CPYearMonthDayDatePickerElementFlag)
|
||||
[_textFieldYear setPreviousTextField:_textFieldDay];
|
||||
@@ -1338,7 +1338,7 @@ var CPZeroKeyCode = 48,
|
||||
|
||||
[secondTextField setPreviousTextField:firstTexField];
|
||||
|
||||
if (isEnglishFormat && datePickerElements & CPHourMinuteDatePickerElementFlag)
|
||||
if (isAmericanFormat && datePickerElements & CPHourMinuteDatePickerElementFlag)
|
||||
[firstTexField setPreviousTextField:_textFieldPMAM];
|
||||
else if ((datePickerElements & CPHourMinuteSecondDatePickerElementFlag) == CPHourMinuteSecondDatePickerElementFlag)
|
||||
[firstTexField setPreviousTextField:_textFieldSecond];
|
||||
@@ -1530,7 +1530,7 @@ var CPMonthDateType = 0,
|
||||
}
|
||||
}
|
||||
|
||||
if (parseInt(newValue) > [self _maxNumberWithMaxDate] || ([_datePicker _isEnglishFormat] && _dateType == CPHourDateType && parseInt(newValue) > 12))
|
||||
if (parseInt(newValue) > [self _maxNumberWithMaxDate] || ([_datePicker _isAmericanFormat] && _dateType == CPHourDateType && parseInt(newValue) > 12))
|
||||
return;
|
||||
|
||||
_firstEvent = NO;
|
||||
@@ -1549,7 +1549,7 @@ var CPMonthDateType = 0,
|
||||
|
||||
if ([stringValue length])
|
||||
{
|
||||
if ([_datePicker _isEnglishFormat] && [self dateType] == CPHourDateType)
|
||||
if ([_datePicker _isAmericanFormat] && [self dateType] == CPHourDateType)
|
||||
{
|
||||
var isAMHour = [[self superview] _isAMHour];
|
||||
|
||||
@@ -1593,7 +1593,7 @@ var CPMonthDateType = 0,
|
||||
if (![objectValue length])
|
||||
objectValue = [self objectValue];
|
||||
|
||||
if ([_datePicker _isEnglishFormat] && [self dateType] == CPHourDateType)
|
||||
if ([_datePicker _isAmericanFormat] && [self dateType] == CPHourDateType)
|
||||
{
|
||||
var isAMHour = [[self superview] _isAMHour];
|
||||
|
||||
@@ -1621,7 +1621,7 @@ var CPMonthDateType = 0,
|
||||
}
|
||||
else if (_dateType != CPAMPMDateType)
|
||||
{
|
||||
if (_dateType == CPHourDateType && [_datePicker _isEnglishFormat])
|
||||
if (_dateType == CPHourDateType && [_datePicker _isAmericanFormat])
|
||||
{
|
||||
var value = parseInt(aStringValue);
|
||||
|
||||
|
||||
+2
-2
@@ -26,6 +26,8 @@
|
||||
CPOKButton = 1;
|
||||
CPCancelButton = 0;
|
||||
|
||||
CPDocModalWindowMask = 1 << 6;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPPanel
|
||||
@@ -51,8 +53,6 @@ CPCancelButton = 0;
|
||||
@global
|
||||
@class CPWindow
|
||||
*/
|
||||
CPDocModalWindowMask = 1 << 6;
|
||||
|
||||
@implementation CPPanel : CPWindow
|
||||
{
|
||||
BOOL _becomesKeyOnlyIfNeeded;
|
||||
|
||||
@@ -86,6 +86,9 @@ var CPProgressIndicatorSpinningStyleColors = [];
|
||||
@"spinning-mini-gif": [CPNull null],
|
||||
@"spinning-small-gif": [CPNull null],
|
||||
@"spinning-regular-gif": [CPNull null],
|
||||
@"circular-border-color": [CPNull null],
|
||||
@"circular-border-size": 1,
|
||||
@"circular-color": [CPNull null]
|
||||
};
|
||||
}
|
||||
|
||||
@@ -368,6 +371,7 @@ var CPProgressIndicatorSpinningStyleColors = [];
|
||||
- (void)drawBar
|
||||
{
|
||||
[self setNeedsLayout];
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
- (CPView)createEphemeralSubviewNamed:(CPString)aName
|
||||
@@ -413,6 +417,9 @@ var CPProgressIndicatorSpinningStyleColors = [];
|
||||
{
|
||||
if (_style == CPProgressIndicatorSpinningStyle)
|
||||
{
|
||||
if (!_indeterminate)
|
||||
return;
|
||||
|
||||
// This will cause the bar view to go away due to having a nil rect when _style == CPProgressIndicatorSpinningStyle.
|
||||
[self layoutEphemeralSubviewNamed:"bar-view"
|
||||
positioned:CPWindowBelow
|
||||
@@ -438,6 +445,54 @@ var CPProgressIndicatorSpinningStyleColors = [];
|
||||
[self setBackgroundColor:nil];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
if (_style == CPProgressIndicatorSpinningStyle && !_indeterminate)
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
rect = CGRectMakeCopy(aRect),
|
||||
borderSize = [self currentValueForThemeAttribute:@"circular-border-size"];
|
||||
|
||||
rect.origin.x += borderSize;
|
||||
rect.origin.y += borderSize;
|
||||
rect.size.width = rect.size.width - borderSize * 2;
|
||||
rect.size.height = rect.size.height - borderSize * 2;
|
||||
|
||||
if ([self doubleValue] > [self minValue] && [self doubleValue] < [self maxValue])
|
||||
{
|
||||
var midX = CGRectGetMidX(rect),
|
||||
midY = CGRectGetMidY(rect),
|
||||
endAngle = Math.PI * 2 * (([self doubleValue] - [self minValue]) / ([self maxValue] - [self minValue])) - Math.PI / 2,
|
||||
radius = MIN(rect.size.width / 2, rect.size.height / 2)
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetLineWidth(context, borderSize);
|
||||
CGContextSetFillColor(context, [self currentValueForThemeAttribute:@"circular-color"])
|
||||
CGContextMoveToPoint(context, midX, midY);
|
||||
CGContextAddArc(context, midX, midY, radius, 3 * Math.PI / 2, endAngle, YES)
|
||||
CGContextAddLineToPoint(context, midX, midY);
|
||||
CGContextClosePath(context);
|
||||
CGContextFillPath(context);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
else if ([self doubleValue] == [self maxValue])
|
||||
{
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetFillColor(context, [self currentValueForThemeAttribute:@"circular-color"])
|
||||
CGContextAddEllipseInRect(context, rect);
|
||||
CGContextClosePath(context);
|
||||
CGContextFillPath(context);
|
||||
}
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextSetStrokeColor(context , [self currentValueForThemeAttribute:@"circular-border-color"]);
|
||||
CGContextSetLineWidth(context, borderSize);
|
||||
CGContextAddEllipseInRect(context, rect);
|
||||
CGContextClosePath(context);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -29,6 +29,7 @@
|
||||
|
||||
@global CPApp
|
||||
|
||||
CPRadioImageOffset = 4.0;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@@ -67,9 +68,6 @@
|
||||
option.
|
||||
|
||||
*/
|
||||
|
||||
CPRadioImageOffset = 4.0;
|
||||
|
||||
@implementation CPRadio : CPButton
|
||||
{
|
||||
CPRadioGroup _radioGroup;
|
||||
|
||||
@@ -86,15 +86,6 @@ var _isBrowserUsingOverlayScrollers = function()
|
||||
#endif
|
||||
};
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPScrollView
|
||||
|
||||
Used to display views that are too large for the viewing area. the CPScrollView
|
||||
places scroll bars on the side of the view to allow the user to scroll and see the entire
|
||||
contents of the view.
|
||||
*/
|
||||
|
||||
var TIMER_INTERVAL = 0.2,
|
||||
CPScrollViewDelegate_scrollViewWillScroll_ = 1 << 0,
|
||||
CPScrollViewDelegate_scrollViewDidScroll_ = 1 << 1,
|
||||
@@ -104,7 +95,14 @@ var TIMER_INTERVAL = 0.2,
|
||||
var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
CPScrollerStyleGlobalChangeNotification = @"CPScrollerStyleGlobalChangeNotification";
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPScrollView
|
||||
|
||||
Used to display views that are too large for the viewing area. the CPScrollView
|
||||
places scroll bars on the side of the view to allow the user to scroll and see the entire
|
||||
contents of the view.
|
||||
*/
|
||||
@implementation CPScrollView : CPView
|
||||
{
|
||||
CPClipView _contentView;
|
||||
|
||||
+5
-5
@@ -50,11 +50,6 @@ CPNoScrollerParts = 0;
|
||||
CPOnlyScrollerArrows = 1;
|
||||
CPAllScrollerParts = 2;
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPScroller
|
||||
*/
|
||||
|
||||
var PARTS_ARRANGEMENT = [CPScrollerKnobSlot, CPScrollerDecrementLine, CPScrollerIncrementLine, CPScrollerKnob],
|
||||
NAMES_FOR_PARTS = {},
|
||||
PARTS_FOR_NAMES = {};
|
||||
@@ -78,6 +73,11 @@ CPThemeStateScrollViewLegacy = CPThemeState("scroller-style-legacy");
|
||||
CPThemeStateScrollerKnobLight = CPThemeState("scroller-knob-light");
|
||||
CPThemeStateScrollerKnobDark = CPThemeState("scroller-knob-dark");
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
@class CPScroller
|
||||
*/
|
||||
|
||||
@implementation CPScroller : CPControl
|
||||
{
|
||||
CPUsableScrollerParts _usableParts;
|
||||
|
||||
@@ -3593,6 +3593,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
[self setNeedsDisplay:YES];
|
||||
}
|
||||
|
||||
if (!_isViewBased)
|
||||
[self _setEditingState:NO forView:dataView];
|
||||
|
||||
[self _sendDelegateWillDisplayView:dataView forTableColumn:tableColumn row:row];
|
||||
|
||||
return dataView;
|
||||
|
||||
+13
-1
@@ -38,4 +38,16 @@ CPLeftTextMovement = 19;
|
||||
CPRightTextMovement = 20;
|
||||
CPUpTextMovement = 21;
|
||||
CPDownTextMovement = 22;
|
||||
CPCancelTextMovement = 23;
|
||||
CPCancelTextMovement = 23;
|
||||
|
||||
@typedef CPWritingDirection
|
||||
CPWritingDirectionNatural = -1;
|
||||
CPWritingDirectionLeftToRight = 0;
|
||||
CPWritingDirectionRightToLeft = 1;
|
||||
|
||||
@typedef CPTextAlignment
|
||||
CPLeftTextAlignment = 0;
|
||||
CPRightTextAlignment = 1;
|
||||
CPCenterTextAlignment = 2;
|
||||
CPJustifiedTextAlignment = 3;
|
||||
CPNaturalTextAlignment = 4;
|
||||
@@ -376,7 +376,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
|
||||
_sendActionOn = CPKeyUpMask | CPKeyDownMask;
|
||||
|
||||
[self setValue:CPLeftTextAlignment forThemeAttribute:@"alignment"];
|
||||
[self setValue:CPNaturalTextAlignment forThemeAttribute:@"alignment"];
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -753,6 +753,10 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
|
||||
element.style.textAlign = "right";
|
||||
break;
|
||||
|
||||
case CPNaturalTextAlignment:
|
||||
element.style.textAlign = "";
|
||||
break;
|
||||
|
||||
default:
|
||||
element.style.textAlign = "left";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
require("../common.jake");
|
||||
|
||||
checkUlimit();
|
||||
|
||||
var framework = require("objective-j/jake").framework,
|
||||
BundleTask = require("objective-j/jake").BundleTask;
|
||||
|
||||
|
||||
@@ -2999,6 +2999,24 @@ var themedButtonValues = nil,
|
||||
return progressBar;
|
||||
}
|
||||
|
||||
+ (CPProgressIndicator)themedCircularProgressIndicator
|
||||
{
|
||||
var progressBar = [[CPProgressIndicator alloc] initWithFrame:CGRectMake(0, 0, 32, 32)];
|
||||
[progressBar setStyle:CPProgressIndicatorSpinningStyle];
|
||||
[progressBar setIndeterminate:NO];
|
||||
|
||||
var themeValues =
|
||||
[
|
||||
[@"circular-border-color", [CPColor colorWithHexString:@"C7C7C7"]],
|
||||
[@"circular-border-size", 1],
|
||||
[@"circular-color", [CPColor colorWithHexString:@"89B5CD"]]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themeValues forView:progressBar];
|
||||
|
||||
return progressBar;
|
||||
}
|
||||
|
||||
+ (CPBox)themedBox
|
||||
{
|
||||
var box = [[CPBox alloc] initWithFrame:CGRectMake(0,0,100,100)],
|
||||
|
||||
@@ -688,7 +688,8 @@ var themedButtonValues = nil,
|
||||
[@"text-color", [CPColor blackColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateEditable, CPThemeStateFirstResponder, CPThemeStateKeyWindow]],
|
||||
[@"content-inset", CGInsetMake(7.0, 7.0, 5.0, 10.0), [CPThemeStateTableDataView, CPThemeStateEditable]],
|
||||
[@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize], [CPThemeStateTableDataView, CPThemeStateEditing]],
|
||||
[@"bezel-inset", CGInsetMake(-2.0, -2.0, -2.0, -2.0), [CPThemeStateTableDataView, CPThemeStateEditing]],
|
||||
[@"bezel-inset", CGInsetMake(-2.0, -2.0, -2.0, -2.0), [CPThemeStateTableDataView, CPThemeStateEditable, CPThemeStateEditing]],
|
||||
[@"bezel-inset", CGInsetMake(1.0, 1.0, 1.0, 1.0), [CPThemeStateTableDataView, CPThemeStateEditable]],
|
||||
|
||||
[@"text-color", [CPColor colorWithCalibratedWhite:125.0 / 255.0 alpha:1.0], [CPThemeStateTableDataView, CPThemeStateGroupRow]],
|
||||
[@"text-color", [CPColor whiteColor], [CPThemeStateTableDataView, CPThemeStateGroupRow, CPThemeStateSelectedDataView, CPThemeStateFirstResponder, CPThemeStateKeyWindow]],
|
||||
@@ -2499,6 +2500,24 @@ var themedButtonValues = nil,
|
||||
return progressBar;
|
||||
}
|
||||
|
||||
+ (CPProgressIndicator)themedCircularProgressIndicator
|
||||
{
|
||||
var progressBar = [[CPProgressIndicator alloc] initWithFrame:CGRectMake(0, 0, 32, 32)];
|
||||
[progressBar setStyle:CPProgressIndicatorSpinningStyle];
|
||||
[progressBar setIndeterminate:NO];
|
||||
|
||||
var themeValues =
|
||||
[
|
||||
[@"circular-border-color", [CPColor colorWithHexString:@"A0A0A0"]],
|
||||
[@"circular-border-size", 1],
|
||||
[@"circular-color", [CPColor colorWithHexString:@"5982DA"]]
|
||||
];
|
||||
|
||||
[self registerThemeValues:themeValues forView:progressBar];
|
||||
|
||||
return progressBar;
|
||||
}
|
||||
|
||||
+ (CPBox)themedBox
|
||||
{
|
||||
var box = [[CPBox alloc] initWithFrame:CGRectMake(0, 0, 100, 100)],
|
||||
|
||||
+25
-10
@@ -366,23 +366,38 @@ function pressEnvironment(rootPath, outputFiles, environment, options) {
|
||||
return {executable:includedBytes, data:dataBytes, mhtml:mhtmlBytes};
|
||||
}
|
||||
|
||||
function pngcrushDirectory(directory) {
|
||||
var directoryPath = FILE.path(directory);
|
||||
var pngs = directoryPath.glob("**/*.png");
|
||||
function pngcrushDirectory(directory)
|
||||
{
|
||||
var directoryPath = FILE.path(directory),
|
||||
pngs = directoryPath.glob("**/*.png");
|
||||
|
||||
system.stderr.print("Running pngcrush on " + pngs.length + " pngs:");
|
||||
pngs.forEach(function(dstPath) {
|
||||
pngs.forEach(function(dstPath)
|
||||
{
|
||||
var tmpPath = FILE.path(dstPath+".tmp");
|
||||
|
||||
var p = OS.popen(["pngcrush", "-rem", "alla", "-reduce", /*"-brute",*/ dstPath, tmpPath]);
|
||||
if (p.wait()) {
|
||||
CPLog.warn("pngcrush failed. Ensure it's installed and on your PATH.");
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["pngcrush", "-rem", "alla", "-reduce", /*"-brute",*/ dstPath, tmpPath]);
|
||||
|
||||
if (p.wait())
|
||||
{
|
||||
CPLog.warn("pngcrush failed. Ensure it's installed and on your PATH.");
|
||||
}
|
||||
else
|
||||
{
|
||||
FILE.move(tmpPath, dstPath);
|
||||
system.stderr.write(".").flush();
|
||||
}
|
||||
}
|
||||
else {
|
||||
FILE.move(tmpPath, dstPath);
|
||||
system.stderr.write(".").flush();
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
});
|
||||
|
||||
system.stderr.print("");
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,20 @@ var OS = require("os");
|
||||
|
||||
exports.fontinfo = function(name, size)
|
||||
{
|
||||
var p = OS.popen(["fontinfo", "-n", name, size || 12]);
|
||||
var result;
|
||||
|
||||
if (p.wait() === 0)
|
||||
return JSON.parse(p.stdout.read());
|
||||
else
|
||||
return null;
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["fontinfo", "-n", name, size || 12]);
|
||||
if (p.wait() === 0)
|
||||
result = p.stdout.read();
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
return result ? JSON.parse(result) : null;
|
||||
};
|
||||
|
||||
@@ -3,10 +3,20 @@ var OS = require("os");
|
||||
|
||||
exports.imagesize = function(path)
|
||||
{
|
||||
var p = OS.popen(["imagesize", "-n", path]);
|
||||
var result;
|
||||
|
||||
if (p.wait() === 0)
|
||||
return JSON.parse(p.stdout.read());
|
||||
else
|
||||
return null;
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["imagesize", "-n", path]);
|
||||
if (p.wait() === 0)
|
||||
result = p.stdout.read();
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
return result ? JSON.parse(result) : null;
|
||||
};
|
||||
|
||||
@@ -128,12 +128,21 @@ function generateDocs(/* boolean */ noFrame)
|
||||
// If the Doxygen application is installed on Mac OS X, use that
|
||||
if (!doxygen && executableExists("mdfind"))
|
||||
{
|
||||
var p = OS.popen(["mdfind", "kMDItemContentType == 'com.apple.application-bundle' && kMDItemCFBundleIdentifier == 'org.doxygen'"]);
|
||||
if (p.wait() === 0)
|
||||
try
|
||||
{
|
||||
var doxygenApps = p.stdout.read().split("\n");
|
||||
if (doxygenApps[0])
|
||||
doxygen = FILE.join(doxygenApps[0], "Contents/Resources/doxygen");
|
||||
var p = OS.popen(["mdfind", "kMDItemContentType == 'com.apple.application-bundle' && kMDItemCFBundleIdentifier == 'org.doxygen'"]);
|
||||
if (p.wait() === 0)
|
||||
{
|
||||
var doxygenApps = p.stdout.read().split("\n");
|
||||
if (doxygenApps[0])
|
||||
doxygen = FILE.join(doxygenApps[0], "Contents/Resources/doxygen");
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -277,12 +277,12 @@ CFHTTPRequest.prototype.removeEventListener = function(/*String*/ anEventName, /
|
||||
this._eventDispatcher.removeEventListener(anEventName, anEventListener);
|
||||
};
|
||||
|
||||
CFHTTPRequest.prototype.setWithCredentials = function(/*Boolean*/ willSendWithCredentials)
|
||||
CFHTTPRequest.prototype.setWithCredentials = function(/*Boolean*/ willSendWithCredentials)
|
||||
{
|
||||
this._nativeRequest.withCredentials = willSendWithCredentials;
|
||||
};
|
||||
|
||||
CFHTTPRequest.prototype.withCredentials = function()
|
||||
CFHTTPRequest.prototype.withCredentials = function()
|
||||
{
|
||||
return this._nativeRequest.withCredentials;
|
||||
};
|
||||
@@ -323,12 +323,21 @@ function FileRequest(/*CFURL*/ aURL, onsuccess, onfailure, onprogress)
|
||||
var aFilePath = aURL.toString().substring(5),
|
||||
OS = require("os"),
|
||||
gccFlags = require("objective-j").currentCompilerFlags(),
|
||||
gcc = OS.popen("gcc -E -x c -P " + (gccFlags ? gccFlags : "") + " " + OS.enquote(aFilePath), { charset:"UTF-8" }),
|
||||
chunk,
|
||||
fileContents = "";
|
||||
|
||||
while (chunk = gcc.stdout.read())
|
||||
fileContents += chunk;
|
||||
try
|
||||
{
|
||||
var gcc = OS.popen("gcc -E -x c -P " + (gccFlags ? gccFlags : "") + " " + OS.enquote(aFilePath), { charset:"UTF-8" });
|
||||
while (chunk = gcc.stdout.read())
|
||||
fileContents += chunk;
|
||||
}
|
||||
finally
|
||||
{
|
||||
gcc.stdin.close();
|
||||
gcc.stdout.close();
|
||||
gcc.stderr.close();
|
||||
}
|
||||
|
||||
if (fileContents.length > 0)
|
||||
{
|
||||
|
||||
@@ -94,6 +94,7 @@ exports.run = function(args)
|
||||
print(" -I, --objj-include-paths include a specific framework paths")
|
||||
print(" -h, --help print this help");
|
||||
print(" -m, --multifiles launch objj on several files")
|
||||
print(" -x, --xml specify the output format in xml.")
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -101,45 +102,57 @@ exports.run = function(args)
|
||||
{
|
||||
switch (argv[0])
|
||||
{
|
||||
case "--objj-include-paths":
|
||||
case "-I":
|
||||
argv.shift();
|
||||
OBJJ_INCLUDE_PATHS.unshift.apply(OBJJ_INCLUDE_PATHS, argv.shift().split(":"));
|
||||
break;
|
||||
|
||||
case "--multifiles":
|
||||
case "-m":
|
||||
argv.shift();
|
||||
multipleFiles = true;
|
||||
break
|
||||
|
||||
case "-x":
|
||||
case "--xml":
|
||||
argv.shift();
|
||||
exports.outputFormatInXML = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (argv && argv.length > 0)
|
||||
{
|
||||
var endCommand = false;
|
||||
var endCommand = false,
|
||||
errors = [];
|
||||
|
||||
while (argv.length > 0)
|
||||
{
|
||||
var arg0 = argv.shift();
|
||||
var mainFilePath = FILE.canonical(arg0);
|
||||
var arg0 = argv.shift(),
|
||||
mainFilePath = FILE.canonical(arg0);
|
||||
|
||||
if (multipleFiles)
|
||||
{
|
||||
// This is needed to process every files passed in args
|
||||
// Otherwise it would stop when an error is raised or we would like to objj the other given files
|
||||
try
|
||||
{
|
||||
exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
print("\n" + e);
|
||||
}
|
||||
}
|
||||
else
|
||||
try
|
||||
{
|
||||
exports.make_narwhal_factory(mainFilePath)(require, { }, module, system, print);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
if (exports.outputFormatInXML)
|
||||
{
|
||||
var dict = new CFMutableDictionary();
|
||||
dict.addValueForKey('line', e.line ? e.line : 0);
|
||||
dict.addValueForKey('sourcePath', e.path ? e.path : mainFilePath);
|
||||
dict.addValueForKey('message', e.message);
|
||||
|
||||
errors.push(dict);
|
||||
}
|
||||
else
|
||||
{
|
||||
errors.push("\n" + e);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof main === "function")
|
||||
{
|
||||
@@ -157,6 +170,14 @@ exports.run = function(args)
|
||||
ObjectiveJ.FileExecutable.resetFileExecutables();
|
||||
objj_resetRegisterClasses();
|
||||
}
|
||||
|
||||
if (errors.length)
|
||||
{
|
||||
if (exports.outputFormatInXML)
|
||||
throw CFPropertyListCreateXMLData(errors, kCFPropertyListXMLFormat_v1_0).rawString();
|
||||
else
|
||||
throw errors;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -229,6 +250,7 @@ function getPackage() {
|
||||
exports.version = function() { return getPackage()["version"]; }
|
||||
exports.revision = function() { return getPackage()["cappuccino-revision"]; }
|
||||
exports.timestamp = function() { return new Date(getPackage()["cappuccino-timestamp"]); }
|
||||
exports.outputFormatInXML = false;
|
||||
|
||||
exports.fullVersionString = function() {
|
||||
return sprintf("objective-j %s (%04d-%02d-%02d %s)",
|
||||
|
||||
@@ -46,18 +46,39 @@ function compileWithResolvedFlags(aFilePath, objjcFlags, gccFlags, asPlainJavasc
|
||||
|
||||
if (!shouldObjjPreprocess)
|
||||
{
|
||||
if (OS.popen("which gcc").stdout.read().length === 0)
|
||||
fileContents = FILE.read(aFilePath, { charset:"UTF-8" });
|
||||
else
|
||||
try
|
||||
{
|
||||
// GCC preprocess the file.
|
||||
var gcc = OS.popen("gcc -E -x c -P " + (gccFlags ? gccFlags.join(" ") : "") + " " + OS.enquote(aFilePath), { charset:"UTF-8" }),
|
||||
chunk = "";
|
||||
var p = OS.popen("which gcc");
|
||||
|
||||
while (chunk = gcc.stdout.read())
|
||||
fileContents += chunk;
|
||||
if (p.stdout.read().length === 0)
|
||||
{
|
||||
fileContents = FILE.read(aFilePath, { charset:"UTF-8" });
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
var gcc = OS.popen("gcc -E -x c -P " + (gccFlags ? gccFlags.join(" ") : "") + " " + OS.enquote(aFilePath), { charset:"UTF-8" }),
|
||||
chunk = "";
|
||||
|
||||
while (chunk = gcc.stdout.read())
|
||||
fileContents += chunk;
|
||||
}
|
||||
finally
|
||||
{
|
||||
gcc.stdin.close();
|
||||
gcc.stdout.close();
|
||||
gcc.stderr.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
return fileContents;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
|
||||
var FILE = require("file");
|
||||
|
||||
|
||||
var BUNDLE_TASK = require("objective-j/jake/bundletask");
|
||||
|
||||
exports.BundleTask = BUNDLE_TASK.BundleTask;
|
||||
|
||||
+15
-6
@@ -40,8 +40,8 @@ $BROWSER_FILES = new FileList($BROWSER_FILE).include($OBJECTIVEJ_FILES);
|
||||
|
||||
filedir($BUILD_BROWSER_FILE, $BROWSER_FILES, function(aTask)
|
||||
{
|
||||
gcc($BROWSER_FILE,
|
||||
$BUILD_BROWSER_FILE,
|
||||
gcc($BROWSER_FILE,
|
||||
$BUILD_BROWSER_FILE,
|
||||
environmentFlags("Browser", "ObjJ").concat($INCLUDE_FLAGS, $DEBUG_FLAGS), $CONFIGURATION !== "Debug");
|
||||
});
|
||||
|
||||
@@ -119,11 +119,20 @@ function gcc(inputFilePath, outputFilePath, flags, compress)
|
||||
stream.print("Building... \0green(" + outputFilePath +"\0)");
|
||||
|
||||
// GCC preprocess the file.
|
||||
var cmd = ["gcc", "-E", "-x", "c", "-P"].concat(flags, inputFilePath).join(" ");
|
||||
var gcc = OS.popen(cmd, { charset:"UTF-8" });
|
||||
var cmd = ["gcc", "-E", "-x", "c", "-P"].concat(flags, inputFilePath).join(" "),
|
||||
contents = FILE.read("header.txt", { charset : "UTF-8" });
|
||||
|
||||
var contents = FILE.read("header.txt", { charset : "UTF-8" });
|
||||
contents += gcc.stdout.read();
|
||||
try
|
||||
{
|
||||
var gcc = OS.popen(cmd, { charset:"UTF-8" });
|
||||
contents += gcc.stdout.read();
|
||||
}
|
||||
finally
|
||||
{
|
||||
gcc.stdin.close();
|
||||
gcc.stdout.close();
|
||||
gcc.stderr.close();
|
||||
}
|
||||
|
||||
if (FILE.extension(inputFilePath) === ".js" && compress)
|
||||
contents = compressor(contents);
|
||||
|
||||
@@ -394,9 +394,22 @@ var ObjJAcornCompiler = function(/*String*/ aString, /*CFURL*/ aURL, /*unsigned*
|
||||
#ifdef BROWSER
|
||||
console.log(message);
|
||||
#else
|
||||
print(message);
|
||||
if (exports.outputFormatInXML)
|
||||
{
|
||||
var dict = new CFMutableDictionary();
|
||||
dict.addValueForKey('line', e.line);
|
||||
dict.addValueForKey('sourcePath', this.URL.path());
|
||||
dict.addValueForKey('message', message);
|
||||
|
||||
print(CFPropertyListCreateXMLData([dict], kCFPropertyListXMLFormat_v1_0).rawString());
|
||||
}
|
||||
else
|
||||
{
|
||||
print(message);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
throw e;
|
||||
}
|
||||
|
||||
@@ -434,6 +447,8 @@ exports.ObjJAcornCompiler.compileFileDependencies = function(/*String*/ aString,
|
||||
|
||||
ObjJAcornCompiler.prototype.compilePass2 = function()
|
||||
{
|
||||
var warnings = [];
|
||||
|
||||
ObjJAcornCompiler.currentCompileFile = this.URL;
|
||||
this.pass = 2;
|
||||
this.jsBuffer = new StringBuffer();
|
||||
@@ -442,14 +457,32 @@ ObjJAcornCompiler.prototype.compilePass2 = function()
|
||||
compile(this.tokens, new Scope(null ,{ compiler: this }), pass2);
|
||||
for (var i = 0; i < this.warnings.length; i++)
|
||||
{
|
||||
var message = this.prettifyMessage(this.warnings[i], "WARNING");
|
||||
var warning = this.warnings[i],
|
||||
type = "WARNING";
|
||||
|
||||
var message = this.prettifyMessage(warning, type);
|
||||
#ifdef BROWSER
|
||||
console.log(message);
|
||||
#else
|
||||
print(message);
|
||||
if (exports.outputFormatInXML)
|
||||
{
|
||||
var dict = new CFMutableDictionary();
|
||||
dict.addValueForKey('line', warning.line)
|
||||
dict.addValueForKey('sourcePath', this.URL.path())
|
||||
dict.addValueForKey('message', message)
|
||||
|
||||
warnings.push(dict);
|
||||
}
|
||||
else
|
||||
{
|
||||
print(message);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (warnings.length && exports.outputFormatInXML)
|
||||
print(CFPropertyListCreateXMLData(warnings, kCFPropertyListXMLFormat_v1_0).rawString());
|
||||
|
||||
//print(this.URL + ": " + this.jsBuffer.toString());
|
||||
return this.jsBuffer.toString();
|
||||
}
|
||||
@@ -660,9 +693,13 @@ ObjJAcornCompiler.prototype.prettifyMessage = function(/* Message */ aMessage, /
|
||||
ObjJAcornCompiler.prototype.error_message = function(errorMessage, node)
|
||||
{
|
||||
var pos = exports.acorn.getLineInfo(this.source, node.start),
|
||||
syntaxError = {message: errorMessage, line: pos.line, column: pos.column, lineStart: pos.lineStart, lineEnd: pos.lineEnd};
|
||||
syntaxErrorData = {message: errorMessage, line: pos.line, column: pos.column, lineStart: pos.lineStart, lineEnd: pos.lineEnd},
|
||||
syntaxError = new SyntaxError(this.prettifyMessage(syntaxErrorData, "ERROR"));
|
||||
|
||||
return new SyntaxError(this.prettifyMessage(syntaxError, "ERROR"));
|
||||
syntaxError.line = pos.line;
|
||||
syntaxError.path = this.URL.path();
|
||||
|
||||
return syntaxError;
|
||||
}
|
||||
|
||||
ObjJAcornCompiler.prototype.pushImport = function(url)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[](https://travis-ci.org/cappuccino/cappuccino)
|
||||
|
||||
Welcome to Cappuccino!
|
||||
======================
|
||||
|
||||
|
||||
@@ -334,11 +334,49 @@
|
||||
[self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:scrollView] equals:[] message:@"Notications registered for the scrollView in the notification center are wrong"];
|
||||
}
|
||||
|
||||
- (void)testDocumentVisibleRect
|
||||
{
|
||||
var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0)
|
||||
styleMask:CPWindowNotSizable],
|
||||
windowView = [theWindow contentView],
|
||||
aScrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)],
|
||||
aDocumentView = [[CPView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
|
||||
|
||||
[CPScrollView setGlobalScrollerStyle:CPScrollerStyleOverlay];
|
||||
|
||||
[aScrollView setDocumentView:aDocumentView];
|
||||
[windowView addSubview:aScrollView];
|
||||
|
||||
[self assertRect:CGRectMake(0, 0, 100, 100) equals:[aScrollView documentVisibleRect] message:@"documentVisibleRect is wrong in CPScrollView"];
|
||||
|
||||
[aDocumentView setScaleSize:CGSizeMake(0.5, 0.5)];
|
||||
[self assertRect:CGRectMake(0, 0, 200, 200) equals:[aScrollView documentVisibleRect] message:@"documentVisibleRect is wrong in CPScrollView after scaling"];
|
||||
|
||||
[aDocumentView setScaleSize:CGSizeMake(1, 1)];
|
||||
[aDocumentView scrollRectToVisible:CGRectMake(120, 120, 20, 20)];
|
||||
[self assertRect:CGRectMake(40, 40, 100, 100) equals:[aScrollView documentVisibleRect] message:@"documentVisibleRect is wrong in CPScrollView"];
|
||||
|
||||
[aDocumentView setScaleSize:CGSizeMake(0.5, 0.5)];
|
||||
[self assertRect:CGRectMake(80, 80, 200, 200) equals:[aScrollView documentVisibleRect] message:@"documentVisibleRect is wrong in CPScrollView"];
|
||||
}
|
||||
|
||||
- (void)assertPoint:(CGPoint)expected equals:(CGPoint)actual message:(CPString)message
|
||||
{
|
||||
[self assert:expected.x equals:actual.x message:@"X: " + message];
|
||||
[self assert:expected.y equals:actual.y message:@"Y: " + message];
|
||||
}
|
||||
|
||||
- (void)assertSize:(CGSize)expected equals:(CGSize)actual message:(CPString)message
|
||||
{
|
||||
[self assert:expected.width equals:actual.width message:@"Width: " + message];
|
||||
[self assert:expected.height equals:actual.height message:@"Height: " + message];
|
||||
}
|
||||
|
||||
- (void)assertRect:(CGRect)expected equals:(CGRect)actual message:(CPString)message
|
||||
{
|
||||
[self assertPoint:expected.origin equals:actual.origin message:message]
|
||||
[self assertSize:expected.size equals:actual.size message:message]
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -7,13 +7,18 @@
|
||||
*/
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
|
||||
@import <AppKit/CPProgressIndicator.j>
|
||||
@import <AppKit/CPWindow.j>
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
|
||||
@outlet CPProgressIndicator fiftyPercentBar @accessors;
|
||||
@outlet CPProgressIndicator hundredPercentBar @accessors;
|
||||
|
||||
@outlet CPProgressIndicator twentyPercentCircular @accessors;
|
||||
@outlet CPProgressIndicator fiftyPercentCircular @accessors;
|
||||
@outlet CPProgressIndicator hundredPercentCircular @accessors;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
@@ -31,6 +36,13 @@
|
||||
[fiftyPercentBar setDoubleValue:50];
|
||||
[hundredPercentBar setDoubleValue:100];
|
||||
|
||||
[twentyPercentCircular setMaxValue:200];
|
||||
[twentyPercentCircular setMinValue:50];
|
||||
[twentyPercentCircular setDoubleValue:80];
|
||||
|
||||
[fiftyPercentCircular setDoubleValue:50];
|
||||
[hundredPercentCircular setDoubleValue:100];
|
||||
|
||||
[theWindow center];
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,34 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">11D50</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.32</string>
|
||||
<string key="IBDocument.HIToolboxVersion">568.00</string>
|
||||
<string key="IBDocument.SystemVersion">14E17e</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">7702</string>
|
||||
<string key="IBDocument.AppKitVersion">1348.11</string>
|
||||
<string key="IBDocument.HIToolboxVersion">758.70</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">2182</string>
|
||||
<string key="NS.object.0">7702</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>NSCustomObject</string>
|
||||
<string>NSProgressIndicator</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
<string>NSView</string>
|
||||
<string>NSProgressIndicator</string>
|
||||
<string>NSCustomObject</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSWindowTemplate</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<object class="NSCustomObject" id="1021">
|
||||
<string key="NSClassName">NSApplication</string>
|
||||
</object>
|
||||
@@ -41,7 +38,7 @@
|
||||
<object class="NSWindowTemplate" id="972006081">
|
||||
<int key="NSWindowStyleMask">7</int>
|
||||
<int key="NSWindowBacking">2</int>
|
||||
<string key="NSWindowRect">{{335, 390}, {266, 190}}</string>
|
||||
<string key="NSWindowRect">{{335, 390}, {268, 311}}</string>
|
||||
<int key="NSWTFlags">1946157056</int>
|
||||
<string key="NSWindowTitle">CPProgressIndicator</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
@@ -50,12 +47,11 @@
|
||||
<object class="NSView" key="NSWindowView" id="439893737">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="NSProgressIndicator" id="685095827">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{152, 151}, {96, 20}}</string>
|
||||
<string key="NSFrame">{{152, 272}, {96, 20}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="272394105"/>
|
||||
@@ -67,7 +63,7 @@
|
||||
<object class="NSProgressIndicator" id="11973700">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{152, 127}, {96, 20}}</string>
|
||||
<string key="NSFrame">{{152, 248}, {96, 20}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="617255042"/>
|
||||
@@ -79,7 +75,7 @@
|
||||
<object class="NSProgressIndicator" id="623175648">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{152, 79}, {96, 20}}</string>
|
||||
<string key="NSFrame">{{152, 200}, {96, 20}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="266460629"/>
|
||||
@@ -90,9 +86,8 @@
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="257414374">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">1292</int>
|
||||
<object class="NSPSMatrix" key="NSDrawMatrix"/>
|
||||
<string key="NSFrame">{{154, 43}, {32, 32}}</string>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 164}, {32, 32}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="382264783"/>
|
||||
@@ -103,7 +98,7 @@
|
||||
<object class="NSProgressIndicator" id="582226310">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{152, 103}, {96, 20}}</string>
|
||||
<string key="NSFrame">{{152, 224}, {96, 20}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="125720689"/>
|
||||
@@ -115,18 +110,18 @@
|
||||
<object class="NSTextField" id="728836983">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 154}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 275}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="685095827"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="306424160">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Empty progress bar:</string>
|
||||
<object class="NSFont" key="NSSupport" id="187808035">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<bool key="IBIsSystemFont">YES</bool>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
@@ -151,18 +146,20 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSTextField" id="272394105">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 131}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 252}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="11973700"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="835598184">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">50% progress bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
@@ -171,18 +168,20 @@
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSTextField" id="617255042">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 106}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 227}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="582226310"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="2122616">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">100% progress bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
@@ -191,18 +190,20 @@
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSTextField" id="125720689">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 83}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 204}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="623175648"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="968461958">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Indeterminate bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
@@ -211,18 +212,20 @@
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSTextField" id="266460629">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 59}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 180}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="257414374"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="345370421">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Regular spinner:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
@@ -231,18 +234,20 @@
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSTextField" id="382264783">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 20}, {132, 17}}</string>
|
||||
<string key="NSFrame">{{17, 141}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="392821092"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="317438590">
|
||||
<int key="NSCellFlags">68288064</int>
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Small spinner:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
@@ -251,36 +256,167 @@
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="392821092">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">1292</int>
|
||||
<object class="NSPSMatrix" key="NSDrawMatrix"/>
|
||||
<string key="NSFrame">{{154, 20}, {16, 16}}</string>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 141}, {16, 16}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="NSNextKeyView" ref="888609621"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:926</string>
|
||||
<int key="NSpiFlags">20746</int>
|
||||
<double key="NSMaxValue">100</double>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{266, 190}</string>
|
||||
<object class="NSTextField" id="888609621">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 109}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="827717613"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="454134065">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">Empty circular bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
<string key="NSCellIdentifier">_NS:1505</string>
|
||||
<reference key="NSControlView" ref="888609621"/>
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="827717613">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 110}, {16, 16}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="347448547"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:926</string>
|
||||
<int key="NSpiFlags">20744</int>
|
||||
<double key="NSMaxValue">100</double>
|
||||
</object>
|
||||
<object class="NSTextField" id="347448547">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 85}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="592615220"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="670125388">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">50% circular bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
<string key="NSCellIdentifier">_NS:1505</string>
|
||||
<reference key="NSControlView" ref="347448547"/>
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="592615220">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 86}, {16, 16}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="586922990"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:926</string>
|
||||
<int key="NSpiFlags">20744</int>
|
||||
<double key="NSMaxValue">100</double>
|
||||
</object>
|
||||
<object class="NSTextField" id="586922990">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 60}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="985857252"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="618059430">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">100% circular bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
<string key="NSCellIdentifier">_NS:1505</string>
|
||||
<reference key="NSControlView" ref="586922990"/>
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="985857252">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 61}, {16, 16}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:926</string>
|
||||
<int key="NSpiFlags">20744</int>
|
||||
<double key="NSMaxValue">100</double>
|
||||
</object>
|
||||
<object class="NSTextField" id="887736759">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{17, 28}, {132, 17}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="618313244"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:1505</string>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="97896333">
|
||||
<int key="NSCellFlags">68157504</int>
|
||||
<int key="NSCellFlags2">71304192</int>
|
||||
<string key="NSContents">20% circular bar:</string>
|
||||
<reference key="NSSupport" ref="187808035"/>
|
||||
<string key="NSCellIdentifier">_NS:1505</string>
|
||||
<reference key="NSControlView" ref="887736759"/>
|
||||
<reference key="NSBackgroundColor" ref="437744893"/>
|
||||
<reference key="NSTextColor" ref="446913689"/>
|
||||
</object>
|
||||
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
|
||||
<int key="NSTextFieldAlignmentRectInsetsVersion">1</int>
|
||||
</object>
|
||||
<object class="NSProgressIndicator" id="618313244">
|
||||
<reference key="NSNextResponder" ref="439893737"/>
|
||||
<int key="NSvFlags">268</int>
|
||||
<string key="NSFrame">{{154, 20}, {32, 32}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:926</string>
|
||||
<int key="NSpiFlags">20488</int>
|
||||
<double key="NSMaxValue">100</double>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{268, 311}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="728836983"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
|
||||
<string key="NSScreenRect">{{0, 0}, {1440, 877}}</string>
|
||||
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
|
||||
<bool key="NSWindowIsRestorable">YES</bool>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="635946545">
|
||||
<string key="NSClassName">AppController</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
@@ -313,15 +449,36 @@
|
||||
</object>
|
||||
<int key="connectionID">476</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">hundredPercentCircular</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="985857252"/>
|
||||
</object>
|
||||
<int key="connectionID">493</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">fiftyPercentCircular</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="592615220"/>
|
||||
</object>
|
||||
<int key="connectionID">494</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBOutletConnection" key="connection">
|
||||
<string key="label">twentyPercentCircular</string>
|
||||
<reference key="source" ref="635946545"/>
|
||||
<reference key="destination" ref="618313244"/>
|
||||
</object>
|
||||
<int key="connectionID">495</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<object class="NSArray" key="orderedObjects">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1048"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
@@ -346,17 +503,15 @@
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">371</int>
|
||||
<reference key="object" ref="972006081"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="439893737"/>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">372</int>
|
||||
<reference key="object" ref="439893737"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="728836983"/>
|
||||
<reference ref="685095827"/>
|
||||
<reference ref="11973700"/>
|
||||
@@ -369,7 +524,15 @@
|
||||
<reference ref="257414374"/>
|
||||
<reference ref="392821092"/>
|
||||
<reference ref="382264783"/>
|
||||
</object>
|
||||
<reference ref="888609621"/>
|
||||
<reference ref="827717613"/>
|
||||
<reference ref="347448547"/>
|
||||
<reference ref="592615220"/>
|
||||
<reference ref="586922990"/>
|
||||
<reference ref="985857252"/>
|
||||
<reference ref="618313244"/>
|
||||
<reference ref="887736759"/>
|
||||
</array>
|
||||
<reference key="parent" ref="972006081"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
@@ -378,107 +541,34 @@
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">460</int>
|
||||
<reference key="object" ref="685095827"/>
|
||||
<int key="objectID">486</int>
|
||||
<reference key="object" ref="586922990"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="618059430"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">461</int>
|
||||
<reference key="object" ref="11973700"/>
|
||||
<int key="objectID">487</int>
|
||||
<reference key="object" ref="985857252"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">462</int>
|
||||
<reference key="object" ref="623175648"/>
|
||||
<int key="objectID">488</int>
|
||||
<reference key="object" ref="618059430"/>
|
||||
<reference key="parent" ref="586922990"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">481</int>
|
||||
<reference key="object" ref="827717613"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">463</int>
|
||||
<reference key="object" ref="257414374"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">464</int>
|
||||
<reference key="object" ref="582226310"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">465</int>
|
||||
<reference key="object" ref="728836983"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="306424160"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">466</int>
|
||||
<reference key="object" ref="306424160"/>
|
||||
<reference key="parent" ref="728836983"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">467</int>
|
||||
<reference key="object" ref="272394105"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="835598184"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">468</int>
|
||||
<reference key="object" ref="835598184"/>
|
||||
<reference key="parent" ref="272394105"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">469</int>
|
||||
<reference key="object" ref="617255042"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="2122616"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">470</int>
|
||||
<reference key="object" ref="2122616"/>
|
||||
<reference key="parent" ref="617255042"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">471</int>
|
||||
<reference key="object" ref="125720689"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="968461958"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">472</int>
|
||||
<reference key="object" ref="968461958"/>
|
||||
<reference key="parent" ref="125720689"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">473</int>
|
||||
<reference key="object" ref="266460629"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="345370421"/>
|
||||
</object>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">474</int>
|
||||
<reference key="object" ref="345370421"/>
|
||||
<reference key="parent" ref="266460629"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">477</int>
|
||||
<reference key="object" ref="382264783"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="317438590"/>
|
||||
</object>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
@@ -486,142 +576,251 @@
|
||||
<reference key="object" ref="317438590"/>
|
||||
<reference key="parent" ref="382264783"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">469</int>
|
||||
<reference key="object" ref="617255042"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="2122616"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">470</int>
|
||||
<reference key="object" ref="2122616"/>
|
||||
<reference key="parent" ref="617255042"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">464</int>
|
||||
<reference key="object" ref="582226310"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">483</int>
|
||||
<reference key="object" ref="347448547"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="670125388"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">485</int>
|
||||
<reference key="object" ref="670125388"/>
|
||||
<reference key="parent" ref="347448547"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">461</int>
|
||||
<reference key="object" ref="11973700"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">467</int>
|
||||
<reference key="object" ref="272394105"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="835598184"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">468</int>
|
||||
<reference key="object" ref="835598184"/>
|
||||
<reference key="parent" ref="272394105"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">460</int>
|
||||
<reference key="object" ref="685095827"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">465</int>
|
||||
<reference key="object" ref="728836983"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="306424160"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">466</int>
|
||||
<reference key="object" ref="306424160"/>
|
||||
<reference key="parent" ref="728836983"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">463</int>
|
||||
<reference key="object" ref="257414374"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">484</int>
|
||||
<reference key="object" ref="592615220"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">462</int>
|
||||
<reference key="object" ref="623175648"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">473</int>
|
||||
<reference key="object" ref="266460629"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="345370421"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">474</int>
|
||||
<reference key="object" ref="345370421"/>
|
||||
<reference key="parent" ref="266460629"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">479</int>
|
||||
<reference key="object" ref="392821092"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
<string>-3.IBPluginDependency</string>
|
||||
<string>371.IBPluginDependency</string>
|
||||
<string>371.IBWindowTemplateEditedContentRect</string>
|
||||
<string>371.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>372.IBPluginDependency</string>
|
||||
<string>450.IBPluginDependency</string>
|
||||
<string>460.IBPluginDependency</string>
|
||||
<string>461.IBPluginDependency</string>
|
||||
<string>462.IBPluginDependency</string>
|
||||
<string>463.IBPluginDependency</string>
|
||||
<string>464.IBPluginDependency</string>
|
||||
<string>465.IBPluginDependency</string>
|
||||
<string>466.IBPluginDependency</string>
|
||||
<string>467.IBPluginDependency</string>
|
||||
<string>468.IBPluginDependency</string>
|
||||
<string>469.IBPluginDependency</string>
|
||||
<string>470.IBPluginDependency</string>
|
||||
<string>471.IBPluginDependency</string>
|
||||
<string>472.IBPluginDependency</string>
|
||||
<string>473.IBPluginDependency</string>
|
||||
<string>474.IBPluginDependency</string>
|
||||
<string>477.IBPluginDependency</string>
|
||||
<string>478.IBPluginDependency</string>
|
||||
<string>479.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{303, 221}, {480, 360}}</string>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">480</int>
|
||||
<reference key="object" ref="888609621"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="454134065"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">482</int>
|
||||
<reference key="object" ref="454134065"/>
|
||||
<reference key="parent" ref="888609621"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">471</int>
|
||||
<reference key="object" ref="125720689"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="968461958"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">472</int>
|
||||
<reference key="object" ref="968461958"/>
|
||||
<reference key="parent" ref="125720689"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">490</int>
|
||||
<reference key="object" ref="887736759"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="97896333"/>
|
||||
</array>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">491</int>
|
||||
<reference key="object" ref="618313244"/>
|
||||
<reference key="parent" ref="439893737"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">492</int>
|
||||
<reference key="object" ref="97896333"/>
|
||||
<reference key="parent" ref="887736759"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBPersistedLastKnownCanvasPosition">{235, 366.5}</string>
|
||||
<string key="371.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="371.IBWindowTemplateEditedContentRect">{{303, 221}, {480, 360}}</string>
|
||||
<integer value="1" key="371.NSWindowTemplate.visibleAtLaunch"/>
|
||||
<reference key="372.IBNSViewMetadataGestureRecognizers" ref="0"/>
|
||||
<string key="372.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="450.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="460.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="461.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="462.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="463.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="464.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="465.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="466.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="467.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="468.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="469.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="470.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="471.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="472.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="473.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="474.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="477.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="478.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="479.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="480.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="481.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="482.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="483.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="484.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="485.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="486.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="487.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="488.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="490.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="491.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="492.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">479</int>
|
||||
<int key="maxID">495</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">AppController</string>
|
||||
<string key="superclassName">NSObject</string>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>fiftyPercentBar</string>
|
||||
<string>hundredPercentBar</string>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="fiftyPercentBar">NSProgressIndicator</string>
|
||||
<string key="fiftyPercentCircular">NSProgressIndicator</string>
|
||||
<string key="hundredPercentBar">NSProgressIndicator</string>
|
||||
<string key="hundredPercentCircular">NSProgressIndicator</string>
|
||||
<string key="twentyPercentCircular">NSProgressIndicator</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="fiftyPercentBar">
|
||||
<string key="name">fiftyPercentBar</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSProgressIndicator</string>
|
||||
<string>NSProgressIndicator</string>
|
||||
<object class="IBToOneOutletInfo" key="fiftyPercentCircular">
|
||||
<string key="name">fiftyPercentCircular</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>fiftyPercentBar</string>
|
||||
<string>hundredPercentBar</string>
|
||||
<object class="IBToOneOutletInfo" key="hundredPercentBar">
|
||||
<string key="name">hundredPercentBar</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
<object class="NSArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">fiftyPercentBar</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">hundredPercentBar</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="hundredPercentCircular">
|
||||
<string key="name">hundredPercentCircular</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="twentyPercentCircular">
|
||||
<string key="name">twentyPercentCircular</string>
|
||||
<string key="candidateClassName">NSProgressIndicator</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/AppController.h</string>
|
||||
<string key="minorKey">../.XcodeSupport/AppController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">NO</bool>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
|
||||
<integer value="1050" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
<integer value="4600" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
{
|
||||
@outlet CPWindow theWindow;
|
||||
@outlet CPTextField textField;
|
||||
@outlet CPTextField rightLeftTextField;
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13D65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14E7f" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
|
||||
<dependencies>
|
||||
<deployment version="1050" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
@@ -11,7 +11,7 @@
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<menu title="AMainMenu" systemMenu="main" id="29" userLabel="MainMenu">
|
||||
<items>
|
||||
<menuItem title="NewApplication" id="56">
|
||||
@@ -306,11 +306,21 @@
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField verticalHuggingPriority="750" id="t11-Aw-yUQ">
|
||||
<rect key="frame" x="136" y="204" width="208" height="22"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" baseWritingDirection="rightToLeft" title="Right to Left" drawsBackground="YES" id="hx8-nM-rpo">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
</view>
|
||||
</window>
|
||||
<customObject id="450" customClass="AppController">
|
||||
<connections>
|
||||
<outlet property="rightLeftTextField" destination="t11-Aw-yUQ" id="8mI-II-72j"/>
|
||||
<outlet property="textField" destination="gsd-gc-6za" id="idA-qn-CEc"/>
|
||||
<outlet property="theWindow" destination="371" id="459"/>
|
||||
</connections>
|
||||
|
||||
+43
-5
@@ -6,6 +6,11 @@ function cleanup() {
|
||||
if (FILE.isDirectory(dir))
|
||||
FILE.rmtree(dir);
|
||||
});
|
||||
|
||||
["objj2objcskeletonTestFile.h", "objj2objcskeletonTestFile.m", "objj2objcskeletonTestFile.j", "objjWarningTestFile.j", "objjErrorTestFile.j"].forEach(function(file) {
|
||||
if (FILE.isFile(file))
|
||||
FILE.remove(file);
|
||||
});
|
||||
}
|
||||
|
||||
@implementation ToolsTest : OJTestCase
|
||||
@@ -13,13 +18,22 @@ function cleanup() {
|
||||
}
|
||||
|
||||
- (void)setUp
|
||||
{
|
||||
cleanup();
|
||||
FILE.write("objj2objcskeletonTestFile.j", "@import <Foundation/CPObject.j>\n@import <AppKit/AppKit.j>\n\n\n@implementation AppController : CPObject\n{\n @outlet CPSplitView splitViewA;\n @outlet CPSplitView splitViewB;\n @outlet CPSplitView splitViewC;\n}\n\n@end");
|
||||
FILE.write("objjWarningTestFile.j", "@import <Foundation/Foundation.j>@implementation AppController : CPObject{CPWindow theWindow;}@end");
|
||||
FILE.write("objjErrorTestFile.j", "@implementation AppController : CPObject{}@end");
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
- (void)testTools
|
||||
{
|
||||
var status;
|
||||
var status,
|
||||
rootDirectory = FILE.cwd();
|
||||
|
||||
status = OS.system(["capp", "gen", "ToolsTestApp"].map(OS.enquote).join(" ") + " > /dev/null");
|
||||
[self assert:0 equals:status message:"capp gen failed"];
|
||||
@@ -33,16 +47,40 @@ function cleanup() {
|
||||
status = OS.system(["objj", "ToolsTestApp/AppController.j"]);
|
||||
[self assert:0 equals:status message:"objj failed"];
|
||||
|
||||
status = OS.system(["objj", "-x", "ToolsTestApp/AppController.j"]);
|
||||
[self assert:0 equals:status message:"objj failed"];
|
||||
|
||||
var p = OS.popen(["objj", "--xml", "objjErrorTestFile.j"]);
|
||||
[self assert:1 equals:p.wait() message:"objj failed"];
|
||||
[self assert:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version = \"1.0\"><array><dict><key>line</key><integer>1</integer><key>sourcePath</key><string>" + rootDirectory + "/objjErrorTestFile.j</string><key>message</key><string>\
|
||||
\n@implementation AppController : CPObject{}@end\
|
||||
\n ^\
|
||||
\nERROR line 1 in file:" + rootDirectory + "/objjErrorTestFile.j: Can't find superclass CPObject</string></dict></array></plist>\n" equals:p.stdout.read() message:"objj failed"];
|
||||
|
||||
var p = OS.popen(["objj", "-x", "objjWarningTestFile.j"]);
|
||||
[self assert:0 equals:p.wait() message:"objj failed"];
|
||||
[self assert:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"><plist version = \"1.0\"><array><dict><key>line</key><integer>1</integer><key>sourcePath</key><string>" + rootDirectory + "/objjWarningTestFile.j</string><key>message</key><string>\n@import <Foundation/Foundation.j>@implementation AppController : CPObject{CPWindow theWindow;}@end\
|
||||
\n ^\
|
||||
\nWARNING line 1 in file:" + rootDirectory + "/objjWarningTestFile.j: Unknown type 'CPWindow' for ivar 'theWindow'</string></dict></array></plist>\n" equals:p.stdout.read() message:"objj failed"];
|
||||
|
||||
status = OS.system(["objj", "-m", "ToolsTestApp/AppController.j", "ToolsTestApp/AppController.j"]);
|
||||
[self assert:0 equals:status message:"objj failed with several files"];
|
||||
|
||||
status = OS.system(["objj", "-I", "ToolsTestApp/Frameworks", "ToolsTestApp/AppController.j"]);
|
||||
[self assert:0 equals:status message:"objj failed with options -I"];
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
cleanup();
|
||||
status = OS.system(["objj2objcskeleton", "objj2objcskeletonTestFile.j", "."]);
|
||||
[self assert:0 equals:status message:"objj2objcskeleton failed"];
|
||||
|
||||
var contentHeader = FILE.read("objj2objcskeletonTestFile.h"),
|
||||
expectedHeaderResult = "#import <Cocoa/Cocoa.h>\n#import \"xcc_general_include.h\"\n\n@interface AppController : NSObject\n\n@property (assign) IBOutlet NSSplitView* splitViewA;\n@property (assign) IBOutlet NSSplitView* splitViewB;\n@property (assign) IBOutlet NSSplitView* splitViewC;\n\n@end\n";
|
||||
|
||||
[self assert:contentHeader equals:expectedHeaderResult message:@"Header generated by objj2objcskeleton is wrong"];
|
||||
|
||||
var contentMFile = FILE.read("objj2objcskeletonTestFile.m"),
|
||||
expectedMResult = "#import \"objj2objcskeletonTestFile.h\"\n\n@implementation AppController\n@end\n";
|
||||
|
||||
[self assert:contentMFile equals:expectedMResult message:@"File generated by objj2objcskeleton is wrong"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
require("../common.jake");
|
||||
|
||||
// nib2cib uses fontinfo and imagesize and capp uses nib2cib
|
||||
subtasks(["fontinfo", "imagesize", "nib2cib", "capp", "capp_lint", "dump_theme", "XcodeCapp"], ["build", /*"clean", "clobber"*/]);
|
||||
subtasks(["fontinfo", "imagesize", "nib2cib", "objj2objcskeleton", "capp", "capp_lint", "dump_theme", "XcodeCapp"], ["build", /*"clean", "clobber"*/]);
|
||||
|
||||
subtasks(["fontinfo", "imagesize"], ["clean", "clobber"]);
|
||||
|
||||
+22
-10
@@ -13,22 +13,34 @@ task ("build", function()
|
||||
OS.exit(0);
|
||||
|
||||
// No building on 10.6
|
||||
var p = OS.popen(["sw_vers", "-productVersion"]);
|
||||
|
||||
if (p.wait() === 0)
|
||||
try
|
||||
{
|
||||
var versions = p.stdout.read().split("."),
|
||||
majorVersion = parseInt(versions[0], 10),
|
||||
minorVersion = parseInt(versions[1], 10),
|
||||
buildVersion = parseInt(versions[2], 10);
|
||||
var p = OS.popen(["sw_vers", "-productVersion"]);
|
||||
|
||||
if (majorVersion < 10 || minorVersion < 7)
|
||||
if (p.wait() === 0)
|
||||
{
|
||||
colorPrint("XcodeCapp can only be built on Mac OS X 10.7+. You can download the binary here: https://www.dropbox.com/sh/gxdgm356gyb9tqc/rFNyl8hcVG", "red");
|
||||
var versions = p.stdout.read().split("."),
|
||||
majorVersion = parseInt(versions[0], 10),
|
||||
minorVersion = parseInt(versions[1], 10),
|
||||
buildVersion = parseInt(versions[2], 10);
|
||||
|
||||
OS.exit(0);
|
||||
if (majorVersion < 10 || minorVersion < 7)
|
||||
{
|
||||
colorPrint("XcodeCapp can only be built on Mac OS X 10.7+. You can download the binary here: https://www.dropbox.com/sh/gxdgm356gyb9tqc/rFNyl8hcVG", "red");
|
||||
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
OS.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
if (executableExists("xcodebuild"))
|
||||
{
|
||||
|
||||
@@ -119,8 +119,19 @@ ConverterConversionException = @"ConverterConversionException";
|
||||
// Compile xib or nib to make sure we have a non-new format 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];
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["/usr/bin/ibtool", aFilePath, "--compile", temporaryNibFilePath]);
|
||||
if (p.wait() === 1)
|
||||
[CPException raise:ConverterConversionException reason:@"Could not compile file: " + aFilePath];
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -130,8 +141,18 @@ ConverterConversionException = @"ConverterConversionException";
|
||||
// Convert from binary plist to XML 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];
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["/usr/bin/plutil", "-convert", "xml1", temporaryNibFilePath, "-o", temporaryPlistFilePath]);
|
||||
if (p.wait() === 1)
|
||||
[CPException raise:ConverterConversionException reason:@"Could not convert to xml plist for file: " + aFilePath];
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
if (!FILE.isReadable(temporaryPlistFilePath))
|
||||
[CPException raise:ConverterConversionException reason:@"Unable to convert nib file."];
|
||||
|
||||
+23
-21
@@ -31,27 +31,28 @@
|
||||
|
||||
@implementation NSCell : CPObject
|
||||
{
|
||||
int _state @accessors(readonly, getter=state);
|
||||
BOOL _isHighlighted @accessors(readonly, getter=isHighlighted);
|
||||
BOOL _isEnabled @accessors(readonly, getter=isEnabled);
|
||||
BOOL _isEditable @accessors(readonly, getter=isEditable);
|
||||
BOOL _isBordered @accessors(readonly, getter=isBordered);
|
||||
BOOL _isBezeled @accessors(readonly, getter=isBezeled);
|
||||
BOOL _isSelectable @accessors(readonly, getter=isSelectable);
|
||||
BOOL _isScrollable @accessors(readonly, getter=isScrollable);
|
||||
BOOL _isContinuous @accessors(readonly, getter=isContinuous);
|
||||
BOOL _scrolls @accessors(readonly, getter=scrolls);
|
||||
BOOL _wraps @accessors(readonly, getter=wraps);
|
||||
BOOL _truncates @accessors(readonly, getter=truncates);
|
||||
BOOL _sendsActionOnEndEditing @accessors(readonly, getter=sendsActionOnEndEditing);
|
||||
CPTextAlignment _alignment @accessors(readonly, getter=alignment);
|
||||
CPControlSize _controlSize @accessors(readonly, getter=controlSize);
|
||||
id _objectValue @accessors(readonly, getter=objectValue);
|
||||
CPFont _font @accessors(readonly, getter=font);
|
||||
int _lineBreakMode @accessors(readonly, getter=lineBreakMode);
|
||||
CPFormatter _formatter @accessors(readonly, getter=formatter);
|
||||
int _tag @accessors(readonly, getter=tag);
|
||||
BOOL _usesSingleLineMode @accessors(readonly, getter=usesSingleLineMode);
|
||||
int _state @accessors(readonly, getter=state);
|
||||
BOOL _isHighlighted @accessors(readonly, getter=isHighlighted);
|
||||
BOOL _isEnabled @accessors(readonly, getter=isEnabled);
|
||||
BOOL _isEditable @accessors(readonly, getter=isEditable);
|
||||
BOOL _isBordered @accessors(readonly, getter=isBordered);
|
||||
BOOL _isBezeled @accessors(readonly, getter=isBezeled);
|
||||
BOOL _isSelectable @accessors(readonly, getter=isSelectable);
|
||||
BOOL _isScrollable @accessors(readonly, getter=isScrollable);
|
||||
BOOL _isContinuous @accessors(readonly, getter=isContinuous);
|
||||
BOOL _scrolls @accessors(readonly, getter=scrolls);
|
||||
BOOL _wraps @accessors(readonly, getter=wraps);
|
||||
BOOL _truncates @accessors(readonly, getter=truncates);
|
||||
BOOL _sendsActionOnEndEditing @accessors(readonly, getter=sendsActionOnEndEditing);
|
||||
CPTextAlignment _alignment @accessors(readonly, getter=alignment);
|
||||
CPWritingDirection _baseWritingDirection @accessors(readonly, getter=baseWritingDirection);
|
||||
CPControlSize _controlSize @accessors(readonly, getter=controlSize);
|
||||
id _objectValue @accessors(readonly, getter=objectValue);
|
||||
CPFont _font @accessors(readonly, getter=font);
|
||||
int _lineBreakMode @accessors(readonly, getter=lineBreakMode);
|
||||
CPFormatter _formatter @accessors(readonly, getter=formatter);
|
||||
int _tag @accessors(readonly, getter=tag);
|
||||
BOOL _usesSingleLineMode @accessors(readonly, getter=usesSingleLineMode);
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
@@ -76,6 +77,7 @@
|
||||
_wraps = !(flags & 0x00100000) && !(flags & 0x00000040) ? YES : NO;
|
||||
_truncates = (flags & 0x00100000) && !(flags & 0x00000040) ? YES : NO;
|
||||
_alignment = (flags2 & 0x1c000000) >> 26;
|
||||
_baseWritingDirection = ((flags2 & 0x6000) >> 13) - 1;
|
||||
_lineBreakMode = (flags2 & 0x0E00) >> 9;
|
||||
_controlSize = (flags2 & 0xE0000) >> 17;
|
||||
_sendsActionOnEndEditing = (flags2 & 0x00400000) ? YES : NO;
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
[self setObjectValue:[cell objectValue]];
|
||||
[self setFont:[cell font]];
|
||||
[self setAlignment:[cell alignment]];
|
||||
[self setBaseWritingDirection:[cell baseWritingDirection]];
|
||||
[self setContinuous:[cell isContinuous]];
|
||||
[self setLineBreakMode:[cell lineBreakMode]];
|
||||
[self setFormatter:[cell formatter]];
|
||||
|
||||
@@ -28,27 +28,7 @@ var OS = require("os"),
|
||||
|
||||
function main(args)
|
||||
{
|
||||
checkUlimit();
|
||||
|
||||
var nib2cib = [[Nib2Cib alloc] initWithArgs:args];
|
||||
|
||||
[nib2cib run];
|
||||
}
|
||||
|
||||
function checkUlimit()
|
||||
{
|
||||
var minUlimit = 1024,
|
||||
p = OS.popen(["ulimit", "-n"]);
|
||||
|
||||
if (p.wait() === 0)
|
||||
{
|
||||
var limit = p.stdout.read().split("\n")[0];
|
||||
|
||||
if (Number(limit) < minUlimit)
|
||||
{
|
||||
stream.print("\0red(\0bold(WARNING:\0)\0) nib2cib may need to open more files than this terminal session currently allows (" + limit + "). Add the following line to your login configuration file (.bash_profile, .bashrc, etc.), start a new terminal session, then try again:\n");
|
||||
stream.print("ulimit -n " + minUlimit);
|
||||
OS.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
require ("../../common.jake");
|
||||
|
||||
var FILE = require("file"),
|
||||
SYSTEM = require("system"),
|
||||
path = FILE.Path(FILE.join(SYSTEM.prefix, "bin", "objj2objcskeleton"));
|
||||
|
||||
sudo(["cp", "-f", "objj2objcskeleton", path]);
|
||||
sudo(["chmod", "755", path]);
|
||||
@@ -0,0 +1,608 @@
|
||||
#!/usr/bin/env objj
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
var FILE = require("file"),
|
||||
OS = require("os"),
|
||||
stream = require("narwhal/term").stream;
|
||||
|
||||
function main(args)
|
||||
{
|
||||
args.shift();
|
||||
|
||||
if (args.length < 1)
|
||||
return printUsage();
|
||||
|
||||
parser(args);
|
||||
}
|
||||
|
||||
function printUsage()
|
||||
{
|
||||
print("objj2objskeleton [FILE] [DESTINATION]");
|
||||
print("Convert a objective-j file to an objective-c files skeleton (.h and .m)")
|
||||
}
|
||||
|
||||
// Debug function to print some JS objects
|
||||
function dump(obj)
|
||||
{
|
||||
print(JSON.stringify(obj));
|
||||
}
|
||||
|
||||
function raise(pos, message)
|
||||
{
|
||||
var syntaxError = new SyntaxError(message);
|
||||
syntaxError.line = pos.line;
|
||||
|
||||
throw syntaxError;
|
||||
}
|
||||
|
||||
var errors = [],
|
||||
xcc = ObjectiveJ.acorn.walk.make(
|
||||
{
|
||||
ClassDeclarationStatement: function(node, st, c)
|
||||
{
|
||||
var className = node.classname.name,
|
||||
superclassname = node.superclassname ? node.superclassname.name : "",
|
||||
declaredOutletsName = [],
|
||||
classInfo = {
|
||||
"name": className,
|
||||
"category": node.categoryname ? node.categoryname.name : "",
|
||||
"superClass": superclassname,
|
||||
"outlets": [],
|
||||
"actions": [],
|
||||
"actionNames": []
|
||||
};
|
||||
|
||||
if (node.ivardeclarations)
|
||||
{
|
||||
for (var i = 0; i < node.ivardeclarations.length; ++i)
|
||||
{
|
||||
var ivarDecl = node.ivardeclarations[i],
|
||||
ivarType = ivarDecl.ivartype ? ivarDecl.ivartype.name : null,
|
||||
ivarName = ivarDecl.id.name,
|
||||
ivarHasOutlet = ivarDecl.outlet ? "@outlet" : null;
|
||||
|
||||
if (ivarHasOutlet)
|
||||
{
|
||||
if (declaredOutletsName.indexOf(ivarName) !== -1)
|
||||
raise(ivarDecl.loc.start, "Outlet '" + ivarName + "' declared more than once");
|
||||
|
||||
declaredOutletsName.push(ivarName);
|
||||
classInfo.outlets.push({"type": ivarType, "name": ivarName});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
st.push(classInfo)
|
||||
|
||||
for (var i = 0; i < node.body.length; ++i)
|
||||
c(node.body[i], classInfo, "Statement");
|
||||
},
|
||||
|
||||
MethodDeclarationStatement: function(node, st, c)
|
||||
{
|
||||
var selectors = node.selectors,
|
||||
arguments = node.arguments,
|
||||
methodReturnType = [node.returntype ? node.returntype.name : "id"],
|
||||
methodHasAction = node.action ? "IBAction" : null,
|
||||
selector = selectors[0].name,
|
||||
actionInfo = {"name": selector, "arguments":[]};
|
||||
|
||||
if (methodHasAction)
|
||||
{
|
||||
if (arguments.length == 1)
|
||||
{
|
||||
if (st.actionNames.indexOf(selector) !== -1)
|
||||
raise(node.loc.start, "Action '" + selector + "' declared more than once");
|
||||
|
||||
st.actionNames.push(selector);
|
||||
|
||||
for (var i = 0; i < arguments.length; i++)
|
||||
{
|
||||
var argument = arguments[i],
|
||||
argumentName = argument.identifier.name,
|
||||
argumentType = argument.type ? argument.type.name : null;
|
||||
|
||||
actionInfo.arguments.push({"type": argumentType, "name": argumentName});
|
||||
}
|
||||
|
||||
st.actions.push(actionInfo)
|
||||
}
|
||||
else
|
||||
raise(node.loc.start, "Action methods must have exactly one parameter");
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
function compile(node, state, visitor)
|
||||
{
|
||||
function c(node, st, override)
|
||||
{
|
||||
visitor[override || node.type](node, st, c);
|
||||
}
|
||||
|
||||
c(node, state);
|
||||
};
|
||||
|
||||
function removeLastSlashIfNecessary(path)
|
||||
{
|
||||
if (path[path.length - 1] == "/")
|
||||
return path.substring(0, path.length - 1);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/*
|
||||
$1 Full project source path
|
||||
$2 Destination
|
||||
$-n name of the cocoa files
|
||||
*/
|
||||
function parser(args)
|
||||
{
|
||||
try
|
||||
{
|
||||
var sourcePath = args.shift(),
|
||||
projectBasePath = removeLastSlashIfNecessary(args.shift()),
|
||||
outputDirectory = projectBasePath,
|
||||
baseFilename = [sourcePath lastPathComponent],
|
||||
baseFilenameWithNoExtension = args.shift() == "-n" ? args.shift() : baseFilename.substring(0, baseFilename.length - 2),
|
||||
outputHeaderURL = new CFURL([outputDirectory stringByAppendingPathComponent:baseFilenameWithNoExtension + ".h"]),
|
||||
outputImplementationURL = new CFURL([outputDirectory stringByAppendingPathComponent:baseFilenameWithNoExtension + ".m"]),
|
||||
source = FILE.read(sourcePath, { charset: "UTF-8" }),
|
||||
flags = ObjectiveJ.Preprocessor.Flags.IncludeDebugSymbols | ObjectiveJ.Preprocessor.Flags.IncludeTypeSignatures,
|
||||
tokens = ObjectiveJ.acorn.parse(source, { locations:true, sourceFile:sourcePath }),
|
||||
classesInformation = [],
|
||||
ObjectiveCSource = "",
|
||||
ObjectiveCHeader = "",
|
||||
hasErrors = NO;
|
||||
|
||||
compile(tokens, classesInformation, xcc);
|
||||
|
||||
// dump(classesInformation)
|
||||
|
||||
ObjectiveCHeader +=
|
||||
"#import <Cocoa/Cocoa.h>\n" +
|
||||
'#import "xcc_general_include.h"\n';
|
||||
|
||||
ObjectiveCSource += "#import \"" + outputHeaderURL.lastPathComponent() + "\"\n";
|
||||
|
||||
// Traverse each found classes
|
||||
classesInformation.forEach(function(aClass)
|
||||
{
|
||||
// add new class definition
|
||||
if (aClass.superClass)
|
||||
ObjectiveCHeader += [CPString stringWithFormat:@"\n@interface %@ : %@", aClass.name, NSCompatibleClassName(aClass.superClass)];
|
||||
else
|
||||
ObjectiveCHeader += [CPString stringWithFormat:@"\n@interface %@ (%@)", NSCompatibleClassName(aClass.name, NO), aClass.category];
|
||||
|
||||
// add each outlet in header
|
||||
if (aClass.outlets.length > 0)
|
||||
ObjectiveCHeader += "\n";
|
||||
|
||||
aClass.outlets.forEach(function(anOutlet)
|
||||
{
|
||||
ObjectiveCHeader += [CPString stringWithFormat:@"\n@property (assign) IBOutlet %@ %@;", NSCompatibleClassName(anOutlet.type, YES), anOutlet.name];
|
||||
});
|
||||
|
||||
if (aClass.actions.length > 0)
|
||||
ObjectiveCHeader += "\n";
|
||||
|
||||
// add each action in header
|
||||
aClass.actions.forEach(function(anAction)
|
||||
{
|
||||
ObjectiveCHeader += [CPString stringWithFormat:@"\n- (IBAction)%@:(%@)%@;", anAction.name, anAction.arguments[0].type, anAction.arguments[0].name];
|
||||
});
|
||||
|
||||
if (aClass.outlets.length > 0 || aClass.actions.length > 0)
|
||||
ObjectiveCHeader += "\n";
|
||||
|
||||
ObjectiveCHeader += "\n@end\n";
|
||||
|
||||
// fill up the implementation file
|
||||
ObjectiveCSource += "\n@implementation " + NSCompatibleClassName(aClass.name, NO) + "\n@end\n";
|
||||
});
|
||||
|
||||
if (ObjectiveCSource.length)
|
||||
FILE.write(outputImplementationURL, ObjectiveCSource, { charset:"UTF-8" });
|
||||
|
||||
if (ObjectiveCHeader.length)
|
||||
FILE.write(outputHeaderURL, ObjectiveCHeader, { charset:"UTF-8" });
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
[errors addObject:@{
|
||||
@"message": e.message,
|
||||
@"sourcePath": sourcePath,
|
||||
@"line": e.line
|
||||
}];
|
||||
|
||||
hasErrors = YES;
|
||||
}
|
||||
|
||||
if ([errors count])
|
||||
{
|
||||
var plist = [CPPropertyListSerialization dataFromPropertyList:errors format:CPPropertyListXMLFormat_v1_0];
|
||||
|
||||
stream.printError([plist rawString]);
|
||||
|
||||
// If there were category warnings, hasErrors is NO, so return a warning status
|
||||
OS.exit(hasErrors ? 1 : 2);
|
||||
}
|
||||
}
|
||||
|
||||
function NSCompatibleClassName(aClassName, asPointer)
|
||||
{
|
||||
if (aClassName === "var" || aClassName === "id")
|
||||
return "id";
|
||||
|
||||
var prefix = aClassName.substr(0, 2),
|
||||
asterisk = asPointer ? "*" : "";
|
||||
|
||||
if (prefix !== "CP")
|
||||
return aClassName + asterisk;
|
||||
|
||||
var NSClassName = "NS" + aClassName.substr(2);
|
||||
|
||||
if (NSClasses[NSClassName])
|
||||
return NSClassName + asterisk;
|
||||
|
||||
if (ReplacementClasses[aClassName])
|
||||
return ReplacementClasses[aClassName] + asterisk;
|
||||
|
||||
return aClassName + asterisk;
|
||||
}
|
||||
|
||||
var ReplacementClasses = {
|
||||
"CPWebView": "WebView",
|
||||
"CPRadio": "NSButtonCell",
|
||||
"CPRadioGroup": "NSMatrix"
|
||||
};
|
||||
|
||||
var NSClasses = {
|
||||
"NSAffineTransform" : YES,
|
||||
"NSAppleEventDescriptor" : YES,
|
||||
"NSAppleEventManager" : YES,
|
||||
"NSAppleScript" : YES,
|
||||
"NSArchiver" : YES,
|
||||
"NSArray" : YES,
|
||||
"NSAssertionHandler" : YES,
|
||||
"NSAttributedString" : YES,
|
||||
"NSAutoreleasePool" : YES,
|
||||
"NSBlockOperation" : YES,
|
||||
"NSBundle" : YES,
|
||||
"NSCache" : YES,
|
||||
"NSCachedURLResponse" : YES,
|
||||
"NSCalendar" : YES,
|
||||
"NSCharacterSet" : YES,
|
||||
"NSClassDescription" : YES,
|
||||
"NSCloneCommand" : YES,
|
||||
"NSCloseCommand" : YES,
|
||||
"NSCoder" : YES,
|
||||
"NSComparisonPredicate" : YES,
|
||||
"NSCompoundPredicate" : YES,
|
||||
"NSCondition" : YES,
|
||||
"NSConditionLock" : YES,
|
||||
"NSConnection" : YES,
|
||||
"NSCountCommand" : YES,
|
||||
"NSCountedSet" : YES,
|
||||
"NSCreateCommand" : YES,
|
||||
"NSData" : YES,
|
||||
"NSDate" : YES,
|
||||
"NSDateComponents" : YES,
|
||||
"NSDateFormatter" : YES,
|
||||
"NSDecimalNumber" : YES,
|
||||
"NSDecimalNumberHandler" : YES,
|
||||
"NSDeleteCommand" : YES,
|
||||
"NSDeserializer" : YES,
|
||||
"NSDictionary" : YES,
|
||||
"NSDirectoryEnumerator" : YES,
|
||||
"NSDistantObject" : YES,
|
||||
"NSDistantObjectRequest" : YES,
|
||||
"NSDistributedLock" : YES,
|
||||
"NSDistributedNotificationCenter" : YES,
|
||||
"NSEnumerator" : YES,
|
||||
"NSError" : YES,
|
||||
"NSException" : YES,
|
||||
"NSExistsCommand" : YES,
|
||||
"NSExpression" : YES,
|
||||
"NSFileHandle" : YES,
|
||||
"NSFileManager" : YES,
|
||||
"NSFileWrapper" : YES,
|
||||
"NSFormatter" : YES,
|
||||
"NSGarbageCollector" : YES,
|
||||
"NSGetCommand" : YES,
|
||||
"NSHashTable" : YES,
|
||||
"NSHost" : YES,
|
||||
"NSHTTPCookie" : YES,
|
||||
"NSHTTPCookieStorage" : YES,
|
||||
"NSHTTPURLResponse" : YES,
|
||||
"NSIndexPath" : YES,
|
||||
"NSIndexSet" : YES,
|
||||
"NSIndexSpecifier" : YES,
|
||||
"NSInputStream" : YES,
|
||||
"NSInvocation" : YES,
|
||||
"NSInvocationOperation" : YES,
|
||||
"NSKeyedArchiver" : YES,
|
||||
"NSKeyedUnarchiver" : YES,
|
||||
"NSLocale" : YES,
|
||||
"NSLock" : YES,
|
||||
"NSLogicalTest" : YES,
|
||||
"NSMachBootstrapServer" : YES,
|
||||
"NSMachPort" : YES,
|
||||
"NSMapTable" : YES,
|
||||
"NSMessagePort" : YES,
|
||||
"NSMessagePortNameServer" : YES,
|
||||
"NSMetadataItem" : YES,
|
||||
"NSMetadataQuery" : YES,
|
||||
"NSMetadataQueryAttributeValueTuple" : YES,
|
||||
"NSMetadataQueryResultGroup" : YES,
|
||||
"NSMethodSignature" : YES,
|
||||
"NSMiddleSpecifier" : YES,
|
||||
"NSMoveCommand" : YES,
|
||||
"NSMutableArray" : YES,
|
||||
"NSMutableAttributedString" : YES,
|
||||
"NSMutableCharacterSet" : YES,
|
||||
"NSMutableData" : YES,
|
||||
"NSMutableDictionary" : YES,
|
||||
"NSMutableIndexSet" : YES,
|
||||
"NSMutableSet" : YES,
|
||||
"NSMutableString" : YES,
|
||||
"NSMutableURLRequest" : YES,
|
||||
"NSNameSpecifier" : YES,
|
||||
"NSNetService" : YES,
|
||||
"NSNetServiceBrowser" : YES,
|
||||
"NSNotification" : YES,
|
||||
"NSNotificationCenter" : YES,
|
||||
"NSNotificationQueue" : YES,
|
||||
"NSNull" : YES,
|
||||
"NSNumber" : YES,
|
||||
"NSNumberFormatter" : YES,
|
||||
"NSObject" : YES,
|
||||
"NSOperation" : YES,
|
||||
"NSOperationQueue" : YES,
|
||||
"NSOrthography" : YES,
|
||||
"NSOutputStream" : YES,
|
||||
"NSPipe" : YES,
|
||||
"NSPointerArray" : YES,
|
||||
"NSPointerFunctions" : YES,
|
||||
"NSPort" : YES,
|
||||
"NSPortCoder" : YES,
|
||||
"NSPortMessage" : YES,
|
||||
"NSPortNameServer" : YES,
|
||||
"NSPositionalSpecifier" : YES,
|
||||
"NSPredicate" : YES,
|
||||
"NSProcessInfo" : YES,
|
||||
"NSPropertyListSerialization" : YES,
|
||||
"NSPropertySpecifier" : YES,
|
||||
"NSProtocolChecker" : YES,
|
||||
"NSProxy" : YES,
|
||||
"NSPurgeableData" : YES,
|
||||
"NSQuitCommand" : YES,
|
||||
"NSRandomSpecifier" : YES,
|
||||
"NSRangeSpecifier" : YES,
|
||||
"NSRecursiveLock" : YES,
|
||||
"NSRelativeSpecifier" : YES,
|
||||
"NSRunLoop" : YES,
|
||||
"NSScanner" : YES,
|
||||
"NSScriptClassDescription" : YES,
|
||||
"NSScriptCoercionHandler" : YES,
|
||||
"NSScriptCommand" : YES,
|
||||
"NSScriptCommandDescription" : YES,
|
||||
"NSScriptExecutionContext" : YES,
|
||||
"NSScriptObjectSpecifier" : YES,
|
||||
"NSScriptSuiteRegistry" : YES,
|
||||
"NSScriptWhoseTest" : YES,
|
||||
"NSSerializer" : YES,
|
||||
"NSSet" : YES,
|
||||
"NSSetCommand" : YES,
|
||||
"NSSocketPort" : YES,
|
||||
"NSSocketPortNameServer" : YES,
|
||||
"NSSortDescriptor" : YES,
|
||||
"NSSpecifierTest" : YES,
|
||||
"NSSpellServer" : YES,
|
||||
"NSStream" : YES,
|
||||
"NSString" : YES,
|
||||
"NSTask" : YES,
|
||||
"NSTextCheckingResult" : YES,
|
||||
"NSThread" : YES,
|
||||
"NSTimer" : YES,
|
||||
"NSTimeZone" : YES,
|
||||
"NSUnarchiver" : YES,
|
||||
"NSUndoManager" : YES,
|
||||
"NSUniqueIDSpecifier" : YES,
|
||||
"NSURL" : YES,
|
||||
"NSURLAuthenticationChallenge" : YES,
|
||||
"NSURLCache" : YES,
|
||||
"NSURLConnection" : YES,
|
||||
"NSURLCredential" : YES,
|
||||
"NSURLCredentialStorage" : YES,
|
||||
"NSURLDownload" : YES,
|
||||
"NSURLHandle" : YES,
|
||||
"NSURLProtectionSpace" : YES,
|
||||
"NSURLProtocol" : YES,
|
||||
"NSURLRequest" : YES,
|
||||
"NSURLResponse" : YES,
|
||||
"NSUserDefaults" : YES,
|
||||
"NSValue" : YES,
|
||||
"NSValueTransformer" : YES,
|
||||
"NSWhoseSpecifier" : YES,
|
||||
"NSXMLDocument" : YES,
|
||||
"NSXMLDTD" : YES,
|
||||
"NSXMLDTDNode" : YES,
|
||||
"NSXMLElement" : YES,
|
||||
"NSXMLNode" : YES,
|
||||
"NSXMLParser" : YES,
|
||||
"NSActionCell" : YES,
|
||||
"NSAffineTransform Additions" : YES,
|
||||
"NSAlert" : YES,
|
||||
"NSAnimation" : YES,
|
||||
"NSAnimationContext" : YES,
|
||||
"NSAppleScript Additions" : YES,
|
||||
"NSApplication" : YES,
|
||||
"NSArrayController" : YES,
|
||||
"NSATSTypesetter" : YES,
|
||||
"NSAttributedString Application Kit Additions" : YES,
|
||||
"NSBezierPath" : YES,
|
||||
"NSBitmapImageRep" : YES,
|
||||
"NSBox" : YES,
|
||||
"NSBrowser" : YES,
|
||||
"NSBrowserCell" : YES,
|
||||
"NSBundle Additions" : YES,
|
||||
"NSButton" : YES,
|
||||
"NSButtonCell" : YES,
|
||||
"NSCachedImageRep" : YES,
|
||||
"NSCell" : YES,
|
||||
"NSCIImageRep" : YES,
|
||||
"NSClipView" : YES,
|
||||
"NSCoder Application Kit Additions" : YES,
|
||||
"NSCollectionView" : YES,
|
||||
"NSCollectionViewItem" : YES,
|
||||
"NSColor" : YES,
|
||||
"NSColorList" : YES,
|
||||
"NSColorPanel" : YES,
|
||||
"NSColorPicker" : YES,
|
||||
"NSColorSpace" : YES,
|
||||
"NSColorWell" : YES,
|
||||
"NSComboBox" : YES,
|
||||
"NSComboBoxCell" : YES,
|
||||
"NSControl" : YES,
|
||||
"NSController" : YES,
|
||||
"NSCursor" : YES,
|
||||
"NSCustomImageRep" : YES,
|
||||
"NSDatePicker" : YES,
|
||||
"NSDatePickerCell" : YES,
|
||||
"NSDictionaryController" : YES,
|
||||
"NSDockTile" : YES,
|
||||
"NSDocument" : YES,
|
||||
"NSDocumentController" : YES,
|
||||
"NSDrawer" : YES,
|
||||
"NSEPSImageRep" : YES,
|
||||
"NSEvent" : YES,
|
||||
"NSFileWrapper" : YES,
|
||||
"NSFont" : YES,
|
||||
"NSFontDescriptor" : YES,
|
||||
"NSFontManager" : YES,
|
||||
"NSFontPanel" : YES,
|
||||
"NSForm" : YES,
|
||||
"NSFormCell" : YES,
|
||||
"NSGlyphGenerator" : YES,
|
||||
"NSGlyphInfo" : YES,
|
||||
"NSGradient" : YES,
|
||||
"NSGraphicsContext" : YES,
|
||||
"NSHelpManager" : YES,
|
||||
"NSImage" : YES,
|
||||
"NSImageCell" : YES,
|
||||
"NSImageRep" : YES,
|
||||
"NSImageView" : YES,
|
||||
"NSLayoutManager" : YES,
|
||||
"NSLevelIndicator" : YES,
|
||||
"NSLevelIndicatorCell" : YES,
|
||||
"NSMatrix" : YES,
|
||||
"NSMenu" : YES,
|
||||
"NSMenuItem" : YES,
|
||||
"NSMenuItemCell" : YES,
|
||||
"NSMenuView" : YES,
|
||||
"NSMutableAttributedString Additions" : YES,
|
||||
"NSMutableParagraphStyle" : YES,
|
||||
"NSNib" : YES,
|
||||
"NSNibConnector" : YES,
|
||||
"NSNibControlConnector" : YES,
|
||||
"NSNibOutletConnector" : YES,
|
||||
"NSObjectController" : YES,
|
||||
"NSOpenGLContext" : YES,
|
||||
"NSOpenGLLayer" : YES,
|
||||
"NSOpenGLPixelBuffer" : YES,
|
||||
"NSOpenGLPixelFormat" : YES,
|
||||
"NSOpenGLView" : YES,
|
||||
"NSOpenPanel" : YES,
|
||||
"NSOutlineView" : YES,
|
||||
"NSPageLayout" : YES,
|
||||
"NSPanel" : YES,
|
||||
"NSParagraphStyle" : YES,
|
||||
"NSPasteboard" : YES,
|
||||
"NSPasteboardItem" : YES,
|
||||
"NSPathCell" : YES,
|
||||
"NSPathComponentCell" : YES,
|
||||
"NSPathControl" : YES,
|
||||
"NSPDFImageRep" : YES,
|
||||
"NSPersistentDocument" : YES,
|
||||
"NSPICTImageRep" : YES,
|
||||
"NSPopUpButton" : YES,
|
||||
"NSPopUpButtonCell" : YES,
|
||||
"NSPredicateEditor" : YES,
|
||||
"NSPredicateEditorRowTemplate" : YES,
|
||||
"NSPrinter" : YES,
|
||||
"NSPrintInfo" : YES,
|
||||
"NSPrintOperation" : YES,
|
||||
"NSPrintPanel" : YES,
|
||||
"NSProgressIndicator" : YES,
|
||||
"NSResponder" : YES,
|
||||
"NSRuleEditor" : YES,
|
||||
"NSRulerMarker" : YES,
|
||||
"NSRulerView" : YES,
|
||||
"NSRunningApplication" : YES,
|
||||
"NSSavePanel" : YES,
|
||||
"NSScreen" : YES,
|
||||
"NSScroller" : YES,
|
||||
"NSScrollView" : YES,
|
||||
"NSSearchField" : YES,
|
||||
"NSSearchFieldCell" : YES,
|
||||
"NSSecureTextField" : YES,
|
||||
"NSSecureTextFieldCell" : YES,
|
||||
"NSSegmentedCell" : YES,
|
||||
"NSSegmentedControl" : YES,
|
||||
"NSShadow" : YES,
|
||||
"NSSlider" : YES,
|
||||
"NSSliderCell" : YES,
|
||||
"NSSound" : YES,
|
||||
"NSSpeechRecognizer" : YES,
|
||||
"NSSpeechSynthesizer" : YES,
|
||||
"NSSpellChecker" : YES,
|
||||
"NSSplitView" : YES,
|
||||
"NSStatusBar" : YES,
|
||||
"NSStatusItem" : YES,
|
||||
"NSStepper" : YES,
|
||||
"NSStepperCell" : YES,
|
||||
"NSString Application Kit Additions" : YES,
|
||||
"NSTableCellView" : YES,
|
||||
"NSTableColumn" : YES,
|
||||
"NSTableHeaderCell" : YES,
|
||||
"NSTableHeaderView" : YES,
|
||||
"NSTableView" : YES,
|
||||
"NSTabView" : YES,
|
||||
"NSTabViewItem" : YES,
|
||||
"NSText" : YES,
|
||||
"NSTextAttachment" : YES,
|
||||
"NSTextAttachmentCell" : YES,
|
||||
"NSTextBlock" : YES,
|
||||
"NSTextContainer" : YES,
|
||||
"NSTextField" : YES,
|
||||
"NSTextFieldCell" : YES,
|
||||
"NSTextInputContext" : YES,
|
||||
"NSTextList" : YES,
|
||||
"NSTextStorage" : YES,
|
||||
"NSTextTab" : YES,
|
||||
"NSTextTable" : YES,
|
||||
"NSTextTableBlock" : YES,
|
||||
"NSTextView" : YES,
|
||||
"NSTokenField" : YES,
|
||||
"NSTokenFieldCell" : YES,
|
||||
"NSToolbar" : YES,
|
||||
"NSToolbarItem" : YES,
|
||||
"NSToolbarItemGroup" : YES,
|
||||
"NSTouch" : YES,
|
||||
"NSTrackingArea" : YES,
|
||||
"NSTreeController" : YES,
|
||||
"NSTreeNode" : YES,
|
||||
"NSTypesetter" : YES,
|
||||
"NSURL Additions" : YES,
|
||||
"NSUserDefaultsController" : YES,
|
||||
"NSView" : YES,
|
||||
"NSViewAnimation" : YES,
|
||||
"NSViewController" : YES,
|
||||
"NSWindow" : YES,
|
||||
"NSWindowController" : YES,
|
||||
"NSWorkspace" : YES,
|
||||
"NSPopover": YES
|
||||
};
|
||||
+14
-30
@@ -378,11 +378,20 @@ global.setPackageMetadata = function(packagePath)
|
||||
{
|
||||
var pkg = JSON.parse(FILE.read(packagePath, { charset : "UTF-8" }));
|
||||
|
||||
var p = OS.popen(["git", "rev-parse", "--verify", "HEAD"]);
|
||||
if (p.wait() === 0) {
|
||||
var sha = p.stdout.read().split("\n")[0];
|
||||
if (sha.length === 40)
|
||||
pkg["cappuccino-revision"] = sha;
|
||||
try
|
||||
{
|
||||
var p = OS.popen(["git", "rev-parse", "--verify", "HEAD"]);
|
||||
if (p.wait() === 0) {
|
||||
var sha = p.stdout.read().split("\n")[0];
|
||||
if (sha.length === 40)
|
||||
pkg["cappuccino-revision"] = sha;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
p.stdin.close();
|
||||
p.stdout.close();
|
||||
p.stderr.close();
|
||||
}
|
||||
|
||||
pkg["cappuccino-timestamp"] = new Date().getTime();
|
||||
@@ -577,31 +586,6 @@ global.colorPrint = function(/* String */ message, /* String */ color)
|
||||
stream.print(colorize(message, color));
|
||||
};
|
||||
|
||||
var minUlimit = 1024;
|
||||
|
||||
global.checkUlimit = function()
|
||||
{
|
||||
var ulimitPath = executableExists("ulimit");
|
||||
|
||||
if (!ulimitPath)
|
||||
return;
|
||||
|
||||
var p = OS.popen([ulimitPath, "-n"]);
|
||||
|
||||
if (p.wait() === 0)
|
||||
{
|
||||
var limit = p.stdout.read().split("\n")[0];
|
||||
|
||||
if (Number(limit) < minUlimit)
|
||||
{
|
||||
stream.print("\0red(\0bold(ERROR:\0)\0) Cappuccino may need to open more files than this terminal session currently allows (" + limit + "). Add the following line to your login configuration file (.bash_profile, .bashrc, etc.), start a new terminal session, then try again:\n");
|
||||
stream.print("ulimit -n " + minUlimit);
|
||||
OS.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// built in tasks
|
||||
|
||||
task ("build");
|
||||
|
||||
Reference in New Issue
Block a user