Merge remote-tracking branch 'cappuccino/master'

This commit is contained in:
daboe01 committed 2016-09-17 17:07:44 +02:00
commit 4187fe7261
40 files changed
+1895 -1665

No files matched your search

+13 -5
View File
@@ -83,7 +83,7 @@ var _CPEventPeriodicEventPeriod = 0,
BOOL _suppressCappuccinoCut;
BOOL _suppressCappuccinoPaste;
#endif
CPTrackingArea _trackingArea;
}
@@ -146,7 +146,7 @@ var _CPEventPeriodicEventPeriod = 0,
/*!
Creates a new mouse tracking event.
@param anEventType the event type
@param aPoint the location of the cursor in the window specified by \c aWindowNumber
@param modifierFlags a bitwise combination of the modifiers specified in the CPEvent globals
@@ -232,7 +232,7 @@ var _CPEventPeriodicEventPeriod = 0,
{
if ((anEventType != CPMouseEntered) && (anEventType != CPMouseExited) && (anEventType != CPCursorUpdate))
[CPException raise:CPInternalInconsistencyException reason:"Invalid event type"];
if (self = [self _initWithType:anEventType])
{
_location = CGPointCreateCopy(aPoint);
@@ -243,7 +243,7 @@ var _CPEventPeriodicEventPeriod = 0,
_trackingArea = aTrackingArea;
_window = [CPApp windowWithWindowNumber:aWindowNumber];
}
return self;
}
@@ -336,6 +336,14 @@ var _CPEventPeriodicEventPeriod = 0,
return _type;
}
/*!
Returns the subtype of the event.
*/
- (CPEventType)subtype
{
return _subtype;
}
/*!
Returns the event's associated window.
*/
@@ -633,7 +641,7 @@ var _CPEventPeriodicEventPeriod = 0,
{
if ((_type !== CPMouseEntered) && (_type !== CPMouseExited) && (_type !== CPCursorUpdate))
[CPException raise:CPInternalInconsistencyException format:@"You can't call trackingArea for events of type %#x", _type]
return _trackingArea;
}
+1 -69
View File
@@ -51,8 +51,7 @@ UTF8PboardType = @"public.utf8-plain-text";
CPImagePboardType = @"CPImagePboardType";
var CPPasteboards = nil,
supportsNativePasteboard = NO;
var CPPasteboards = nil;
/*!
@ingroup appkit
@@ -68,8 +67,6 @@ var CPPasteboards = nil,
unsigned _changeCount;
CPString _stateUID;
CPWebScriptObject _nativePasteboard;
}
/*
@@ -83,9 +80,6 @@ var CPPasteboards = nil,
[self setVersion:1.0];
CPPasteboards = @{};
if (typeof window.cpPasteboardWithName !== "undefined")
supportsNativePasteboard = YES;
}
/*!
@@ -128,12 +122,6 @@ var CPPasteboards = nil,
_provided = @{};
_changeCount = 0;
if (supportsNativePasteboard)
{
_nativePasteboard = window.cpPasteboardWithName(aName);
[self _synchronizePasteboard];
}
}
return self;
@@ -163,15 +151,6 @@ var CPPasteboards = nil,
[_owners setObject:anOwner forKey:type];
}
if (_nativePasteboard)
{
var nativeTypes = [types copy];
if ([types containsObject:CPStringPboardType])
nativeTypes.push(UTF8PboardType);
_nativePasteboard.addTypes_(nativeTypes);
}
return ++_changeCount;
}
@@ -182,12 +161,6 @@ var CPPasteboards = nil,
@return the pasteboard's change count
*/
- (unsigned)declareTypes:(CPArray)types owner:(id)anOwner
{
[self _declareTypes:types owner:anOwner updateNativePasteboard:YES];
}
/*! @ignore */
- (unsigned)_declareTypes:(CPArray)types owner:(id)anOwner updateNativePasteboard:(BOOL)shouldUpdate
{
[_types setArray:types];
@@ -201,16 +174,6 @@ var CPPasteboards = nil,
[_owners setObject:anOwner forKey:_types[count]];
}
if (_nativePasteboard && shouldUpdate)
{
var nativeTypes = [types copy];
if ([types containsObject:CPStringPboardType])
nativeTypes.push(UTF8PboardType);
_nativePasteboard.declareTypes_(nativeTypes);
_changeCount = _nativePasteboard.changeCount();
}
return ++_changeCount;
}
@@ -273,7 +236,6 @@ var CPPasteboards = nil,
*/
- (CPArray)types
{
[self _synchronizePasteboard];
return _types;
}
@@ -312,36 +274,6 @@ var CPPasteboards = nil,
return nil;
}
- (void)_synchronizePasteboard
{
if (_nativePasteboard && _nativePasteboard.changeCount() > _changeCount)
{
var nativeTypes = [_nativePasteboard.types() copy];
if ([nativeTypes containsObject:UTF8PboardType])
nativeTypes.push(CPStringPboardType);
[self _declareTypes:nativeTypes owner:self updateNativePasteboard:NO];
_changeCount = _nativePasteboard.changeCount();
}
}
/*! @ignore
method provided for integration with native pasteboard
*/
- (void)pasteboard:(CPPasteboard)aPasteboard provideDataForType:(CPString)aType
{
if (aType === CPStringPboardType)
{
var string = _nativePasteboard.stringForType_(UTF8PboardType);
[self setString:string forType:CPStringPboardType];
[self setString:string forType:UTF8PboardType];
}
else
[self setString:_nativePasteboard.stringForType_(aType) forType:aType];
}
/*!
Returns the property list for the specified data type
@param aType the requested data type
+13 -17
View File
@@ -5097,14 +5097,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
}
}
else if (!_isViewBased && [aView isKindOfClass:[CPControl class]] && ![aView isKindOfClass:[CPTextField class]])
{
[self getColumn:@ref(column) row:@ref(row) forView:aView];
_editingColumn = column;
_editingRow = row;
[aView addObserver:self forKeyPath:@"objectValue" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:"editing"];
}
return aView;
}
@@ -5236,7 +5229,7 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (!_isViewBased)
{
[self _setEditingState:NO forView:textField];
[self _commitDataViewObjectValue:textField];
[self _commitDataViewObjectValue:textField forColumn:_editingColumn andRow:_editingRow];
}
else
[textField setBezeled:NO];
@@ -5286,19 +5279,19 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
The action for any dataview that supports editing. This will only be called when the value was changed.
The table view becomes the first responder after user is done editing a dataview.
*/
- (void)_commitDataViewObjectValue:(id)aDataView
- (void)_commitDataViewObjectValue:(id)aDataView forColumn:(CPInteger)column andRow:(CPInteger)row
{
var editingTableColumn = _tableColumns[_editingColumn];
var editingTableColumn = _tableColumns[column];
if (_implementedDataSourceMethods & CPTableViewDataSource_tableView_setObjectValue_forTableColumn_row_)
[_dataSource tableView:self setObjectValue:[aDataView objectValue] forTableColumn:editingTableColumn row:_editingRow];
[_dataSource tableView:self setObjectValue:[aDataView objectValue] forTableColumn:editingTableColumn row:row];
// Allow the column binding to do a reverse set. Note that we do this even if the data source method above
// is implemented.
[editingTableColumn _reverseSetDataView:aDataView forRow:_editingRow];
[editingTableColumn _reverseSetDataView:aDataView forRow:row];
if (_editingRow !== CPNotFound && _editingColumn !== CPNotFound)
[self reloadDataForRowIndexes:[CPIndexSet indexSetWithIndex:_editingRow] columnIndexes:[CPIndexSet indexSetWithIndex:_editingColumn]];
if (row !== CPNotFound && column !== CPNotFound)
[self _reloadDataForRowIndexes:[CPIndexSet indexSetWithIndex:row] columnIndexes:[CPIndexSet indexSetWithIndex:column]];
}
- (void)_setEditingState:(BOOL)editingState forView:(CPView)aView
@@ -5348,9 +5341,12 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
if (context === "editing" && [object superview] === self)
{
[object removeObserver:self forKeyPath:keyPath];
[self _commitDataViewObjectValue:object];
_editingRow = CPNotFound;
_editingColumn = CPNotFound;
var row,
column;
[self getColumn:@ref(column) row:@ref(row) forView:object];
[self _commitDataViewObjectValue:object forColumn:column andRow:row];
}
}
+10 -20
View File
@@ -77,26 +77,16 @@ function CPTextFieldBlurFunction(anEvent, owner, domElement, inputElement, resig
var ownerWindow = [owner window];
if (!resigning && [ownerWindow isKeyWindow])
if (!resigning && [ownerWindow isKeyWindow] && [ownerWindow firstResponder] === owner)
{
/*
Browsers blur text fields when a click occurs anywhere outside the text field. That is normal for browsers, but in Cocoa the key view retains focus unless the click target accepts first responder. So if we lost focus but were not told to resign and our window is still key, restore focus,
but only if the text field is completely within the browser window. If we restore focus when it
is off screen, the entire body scrolls out of our control.
Previously we had code here which would force the input to regain focus if the input lost focus without the CPTextField having actually lost first responder status. This typically happened because the user clicked away from the input in the browser, without clicking on something that could become the first responder. In the browser, clicking outside of an input blurs it, but in Cocoa and Cappuccino it does not (unless you actually click something that will become the first responder).
That refocusing code has now been removed because we simply prevent the default action on clicks in the browser instead, which combined with the fix in 58d5d7d7, successfully prevents unintentional focus loss in (at least) Safari 9.1.1, Chrome 51 and Safari for iOS 9.3 when you click outside of a text field.
Now we can still lose focus unexpectedly: this is when the 'done' button is tapped on the virtual keyboard of a mobile device. In this case we actually do want to resign first responder status, because that is what the done button should do (and if we did not the keyboard would go away and then immediately come back which looks dumb and isn't what the user wanted).
*/
if ([owner _isWithinUsablePlatformRect])
{
[[CPRunLoop mainRunLoop] performBlock:function()
{
// This will prevent to jump to the focused element
var previousScrollingOrigin = [owner _scrollToVisibleRectAndReturnPreviousOrigin];
inputElement.focus();
[owner _restorePreviousScrollingOrigin:previousScrollingOrigin];
}
argument:nil order:0 modes:[CPDefaultRunLoopMode]];
}
[ownerWindow makeFirstResponder:nil];
}
CPTextFieldHandleBlur(anEvent, @ref(owner));
@@ -403,7 +393,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
else
[self unsetThemeState:CPThemeStateEditable];
// We only allow first responder status if the field is enable, and editable or selectable.
// We only allow first responder status if the field is enabled, and editable or selectable.
if (!(shouldBeEditable && ![self isSelectable]) && [[self window] firstResponder] === self)
[[self window] makeFirstResponder:nil];
@@ -845,7 +835,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
[self _resignFirstKeyResponder];
_isEditing = NO;
if ([self isEditable])
{
[self textDidEndEditing:[CPNotification notificationWithName:CPControlTextDidEndEditingNotification object:self userInfo:@{"CPTextMovement": [self _currentTextMovement]}]];
@@ -1997,7 +1987,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
frame.origin = [wind convertBaseToGlobal:frame.origin];
// Here we restore the the previous scrolling posiition
// Here we restore the previous scrolling posiition
[self _restorePreviousScrollingOrigin:previousScrollingOrigin];
return (CGRectGetMinX(frame) >= CGRectGetMinX(usableRect) &&
+36 -3
View File
@@ -112,6 +112,11 @@ CPViewHeightSizable = 16;
*/
CPViewMaxYMargin = 32;
_CPViewWillAppearNotification = @"CPViewWillAppearNotification";
_CPViewDidAppearNotification = @"CPViewDidAppearNotification";
_CPViewWillDisappearNotification = @"CPViewWillDisappearNotification";
_CPViewDidDisappearNotification = @"CPViewDidDisappearNotification";
CPViewBoundsDidChangeNotification = @"CPViewBoundsDidChangeNotification";
CPViewFrameDidChangeNotification = @"CPViewFrameDidChangeNotification";
@@ -404,7 +409,6 @@ var CPViewHighDPIDrawingEnabled = YES;
return self;
}
/*!
Sets the tooltip for the receiver.
@@ -599,6 +603,7 @@ var CPViewHighDPIDrawingEnabled = YES;
// Remove the view from its previous superview.
[aSubview _removeFromSuperview];
[aSubview _postViewWillAppearNotification];
// Set ourselves as the superview.
[aSubview _setSuperview:self];
}
@@ -685,6 +690,7 @@ var CPViewHighDPIDrawingEnabled = YES;
[[self window] _dirtyKeyViewLoop];
[_superview willRemoveSubview:self];
[self _postViewWillDisappearNotification];
[_superview._subviews removeObjectIdenticalTo:self];
@@ -1614,18 +1620,40 @@ var CPViewHighDPIDrawingEnabled = YES;
while (view = [view superview]);
}
[self _postViewWillDisappearNotification];
[self _recursiveGainedHiddenAncestor];
}
else
{
[self setNeedsDisplay:YES];
[self _postViewWillAppearNotification];
[self _recursiveLostHiddenAncestor];
}
_isHidden = aFlag;
}
- (void)_postViewWillAppearNotification
{
[[CPNotificationCenter defaultCenter] postNotificationName:_CPViewWillAppearNotification object:self userInfo:nil];
}
- (void)_postViewDidAppearNotification
{
[[CPNotificationCenter defaultCenter] postNotificationName:_CPViewDidAppearNotification object:self userInfo:nil];
}
- (void)_postViewWillDisappearNotification
{
[[CPNotificationCenter defaultCenter] postNotificationName:_CPViewWillDisappearNotification object:self userInfo:nil];
}
- (void)_postViewDidDisappearNotification
{
[[CPNotificationCenter defaultCenter] postNotificationName:_CPViewDidDisappearNotification object:self userInfo:nil];
}
- (void)_setSuperview:(CPView)aSuperview
{
var hasOldSuperview = (_superview !== nil),
@@ -1634,12 +1662,18 @@ var CPViewHighDPIDrawingEnabled = YES;
newSuperviewIsHidden = hasNewSuperview && [aSuperview isHiddenOrHasHiddenAncestor];
if (!newSuperviewIsHidden && oldSuperviewIsHidden)
[self _recursiveLostHiddenAncestor];
[self _recursiveLostHiddenAncestor];
if (newSuperviewIsHidden && !oldSuperviewIsHidden)
[self _recursiveGainedHiddenAncestor];
_superview = aSuperview;
if (hasOldSuperview)
[self _postViewDidDisappearNotification];
if (hasNewSuperview)
[self _postViewDidAppearNotification];
}
- (void)_recursiveLostHiddenAncestor
@@ -3667,7 +3701,6 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
_window = [aCoder decodeObjectForKey:CPViewWindowKey];
_superview = [aCoder decodeObjectForKey:CPViewSuperviewKey];
// We have to manually add the subviews so that they will receive
// viewWillMoveToSuperview: and viewDidMoveToSuperview:
_subviews = [];
+110 -7
View File
@@ -178,10 +178,10 @@ var CPViewControllerCachedCibs;
}
/*!
Loads asynchronously the cib and creates the view that the controller manages.
Asynchronously load the cib and create the view that the controller manages.
@param aHandler A function passing the loaded view as the first argument
and a network error or nil as the second argument: function(view, error).
@param aHandler a function which will be passed the loaded view as the first
argument and a network error or nil as the second argument: function(view, error).
@note If the view has already been loaded, the completion handler is run immediatly
and the process is synchronous.
@@ -213,7 +213,7 @@ var CPViewControllerCachedCibs;
if (anError == nil)
{
var data = [CPData dataWithRawString:aData],
aCib = [[CPCib alloc] _initWithData:data bundle:_cibBundle cibName:_cibName];
aCib = [[CPCib alloc] _initWithData:data bundle:_cibBundle cibName:_cibName];
[CPViewControllerCachedCibs setObject:aCib forKey:_cibName];
[aCib instantiateCibWithExternalNameTable:_cibExternalNameTable];
@@ -286,13 +286,16 @@ var CPViewControllerCachedCibs;
- (void)_viewDidLoad
{
[self _viewDidLoadWithCompletionHandler:function() {
[self viewDidLoad];
}];
[self willChangeValueForKey:"isViewLoaded"];
[self viewDidLoad];
_isViewLoaded = YES;
[self didChangeValueForKey:"isViewLoaded"];
}
- (void)_viewDidLoadWithCompletionHandler:(Function)aHandler
{
[self _registerOrUnregister:YES notificationsForView:_view];
[self willChangeValueForKey:"isViewLoaded"];
aHandler(_view, nil);
_isViewLoaded = YES;
@@ -312,6 +315,79 @@ var CPViewControllerCachedCibs;
}
/*!
Called after the view controller’s view has been loaded into memory is about to be added to the
view hierarchy in the window.
@discussion You can override this method to perform tasks prior to a view controller’s view
getting added to view hierarchy, such as setting the view’s highlight color. This method is called when:
• The view is about to be added to the view hierarchy of the view controller
If you override this method, call this method on super at some point in your implementation in case
a superclass also overrides this method.
The default implementation of this method does nothing.
*/
- (void)viewWillAppear
{
}
/*!
Called when the view controller’s view is fully transitioned onto the screen.
@discussion This method is called after the completion of any drawing and animations
involved in the initial appearance of the view. You can override this method to
perform tasks appropriate for that time, such as work that should not interfere
with the presentation animation, or starting an animation that you want to begin
after the view appears.
If you override this method, call this method on super at some point in your
implementation in case a superclass also overrides this method.
The default implementation of this method does nothing.
*/
- (void)viewDidAppear
{
}
/*!
Called when the view controller’s view is about to be removed from the view hierarchy in the window.
@discussion You can override this method to perform tasks that are to precede the disappearance
of the view controller’s view, such as stopping a continuous animation that you
started in response to the viewDidAppear method call. This method is called when:
• The view is about to be removed from the view hierarchy of the window
If you override this method, call this method on super at some point in your
implementation in case a superclass also overrides this method.
The default implementation of this method does nothing.
*/
- (void)viewWillDisappear
{
}
/*!
Called after the view controller’s view is removed from the view hierarchy in a window.
@discussion You can override this method to perform tasks associated with removing the view
controller’s view from the window’s view hierarchy, such as releasing resources
not needed when the view is not visible or no longer part of the window.
If you override this method, call this method on super at some point in your
implementation in case a superclass also overrides this method.
The default implementation of this method does nothing.
*/
- (void)viewDidDisappear
{
}
/*!
Manually sets the view that the controller manages.
@@ -325,6 +401,9 @@ var CPViewControllerCachedCibs;
{
var willChangeIsViewLoaded = (_isViewLoaded == NO && aView != nil) || (_isViewLoaded == YES && aView == nil);
[self _registerOrUnregister:NO notificationsForView:_view];
[self _registerOrUnregister:YES notificationsForView:aView];
if (willChangeIsViewLoaded)
[self willChangeValueForKey:"isViewLoaded"];
@@ -340,6 +419,30 @@ var CPViewControllerCachedCibs;
return NO;
}
- (void)_registerOrUnregister:(BOOL)shouldRegister notificationsForView:(CPView)aView
{
if (aView === nil)
return;
var center = [CPNotificationCenter defaultCenter],
notifs_to_sel = @{_CPViewWillAppearNotification : @"viewWillAppear",
_CPViewDidAppearNotification : @"viewDidAppear",
_CPViewWillDisappearNotification : @"viewWillDisappear",
_CPViewDidDisappearNotification : @"viewDidDisappear"};
[notifs_to_sel enumerateKeysAndObjectsUsingBlock:function(notif, selString, stop)
{
var selector = CPSelectorFromString(selString);
if ([self implementsSelector:selector])
{
if (shouldRegister)
[center addObserver:self selector:selector name:notif object:aView];
else
[center removeObserver:self name:notif object:aView];
}
}];
}
@end
+2 -3
View File
@@ -4201,12 +4201,11 @@ var interpolate = function(fromValue, toValue, progress)
{
// This will put a tracking event in the _queuedTrackingEvents queue.
//
// We optimize this queue with this policy :
// We optimize this queue with this policy:
// - if mouseEntered, search if queue contains a previous mouseExited for the same tracking area. If so, discard both.
// - if mouseExited, search if queue contains a previous mouseEntered for the same tracking area. If so, discard both.
//
// This is not Cocoa way of doing as it would send every event.
// But final result should be the same.
// This is not the Cocoa way of doing as it would send every event, but the final result should be the same.
var eventType = [anEvent type],
trackingArea = [anEvent trackingArea];
+1
View File
@@ -24,6 +24,7 @@
@import "CPCompatibility.j"
@import "CGGeometry.j"
@import "CGPath.j"
@import "CGContextText.j"
@typedef CGContext
+86
View File
@@ -0,0 +1,86 @@
/*
* CGContextText.j
* CoreText
*
* Created by Nicholas Small.
* Copyright 2011, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
kCGTextFill = 0;
kCGTextStroke = 1;
kCGTextFillStroke = 2;
kCGTextInvisible = 3;
function CGContextGetTextMatrix(/* CGContext */ aContext)
{
return aContext._textMatrix;
}
function CGContextSetTextMatrix(/* CGContext */ aContext, /* CGAffineTransform */ aTransform)
{
aContext._textMatrix = aTransform;
}
function CGContextGetTextPosition(/* CGContext */ aContext)
{
return aContext._textPosition || _CGPointMakeZero();
}
function CGContextSetTextPosition(/* CGContext */ aContext, /* float */ x, /* float */ y)
{
aContext._textPosition = CGPointMake(x, y);
}
function CGContextGetFont(/* CGContext */ aContext)
{
return aContext._CPFont;
}
function CGContextSelectFont(/* CGContext */ aContext, /* CPFont */ aFont)
{
aContext.font = [aFont cssString];
aContext._CPFont = aFont;
}
function CGContextSetTextDrawingMode(/* CGContext */ aContext, /* CGTextDrawingMode */ aMode)
{
aContext._textDrawingMode = aMode;
}
function CGContextShowText(/* CGContext */ aContext, /* CPString */ aString)
{
CGContextShowTextAtPoint(aContext, aContext._textPosition.x, aContext._textPosition.y, aString);
}
function CGContextShowTextAtPoint(/* CGContext */ aContext, /* float */ x, /* float */ y, /* CPString */ aString)
{
aContext.textBaseline = @"middle";
aContext.textAlign = @"left";
var mode = aContext._textDrawingMode;
if (!mode && mode !== 0)
mode = kCGTextFill;
var width = aContext.measureText(aString).width;
if (mode === kCGTextFill || mode === kCGTextFillStroke)
aContext.fillText(aString, x, y);
if (mode === kCGTextStroke || mode === kCGTextFillStroke)
aContext.strokeText(aString, x, y);
aContext._textPosition = CGPointMake(x + width, y);
}
+10 -6
View File
@@ -952,8 +952,8 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
timestamp:timestamp windowNumber:windowNumber context:nil eventNumber:-1 clickCount:1 pressure:0];
event._DOMEvent = aDOMEvent;
// We lag 1 event behind without this timeout.
setTimeout(function()
// We lag 1 event behind without this approach
window.requestAnimationFrame(function()
{
if (aDOMEvent.deltaMode !== undefined && aDOMEvent.deltaMode !== 0)
{
@@ -992,10 +992,10 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
_DOMScrollingElement.scrollLeft = 150;
_DOMScrollingElement.scrollTop = 150;
// Is this needed?
//[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
// this is needed to prevent flickering during scrolling
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
}, 0);
});
// We hide the dom element after a little bit
// so that other DOM elements such as inputs
@@ -1171,7 +1171,11 @@ _CPPlatformWindowWillCloseNotification = @"_CPPlatformWindowWillCloseNotificatio
var touch = aDOMEvent.touches.length ? aDOMEvent.touches[0] : aDOMEvent.changedTouches[0];
newEvent.clientX = touch.clientX;
newEvent.clientY = touch.clientY;
/*
Normally the document can't scroll in Cappuccino: our body element has top:0 and bottom:0 with absolute positioning. So it should always be exactly the height of the viewport. The below handles a special case. iOS scrolls the document when the virtual keyboard is present and it needs to move a text input upwards visually to avoid covering the input with the keyboard. For most purposes we can ignore this, except here. In theory I think we could always apply this (scrollTop should always be 0 on every other device and situation) but let's be defensive and only apply it for touch events to minimise the risk of surprises.
*/
newEvent.clientY = _DOMWindow.document.body.scrollTop + touch.clientY;
newEvent.timestamp = [CPEvent currentTimestamp];
newEvent.target = aDOMEvent.target;
+4 -2
View File
@@ -550,14 +550,16 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
case CPLineBreakByCharWrapping:
case CPLineBreakByWordWrapping:
textStyle.wordWrap = "break-word";
try {
try
{
textStyle.whiteSpace = "pre";
textStyle.whiteSpace = "-o-pre-wrap";
textStyle.whiteSpace = "-pre-wrap";
textStyle.whiteSpace = "-moz-pre-wrap";
textStyle.whiteSpace = "pre-wrap";
}
catch (e) {
catch (e)
{
//internet explorer doesn't like these properties
textStyle.whiteSpace = "pre";
}
+5 -2
View File
@@ -19,8 +19,11 @@ For more information, see <http://cappuccino-project.org>. Follow [@cappuccino](
System Requirements
-------------------
To run Cappuccino applications, all you need is a web browser that understands
JavaScript.
To run Cappuccino applications, all you need is a HTML5 compliant web browser.
To develop Cappuccino applications, all you need is a simple text editor and the starter package.
However, Cappuccino's build system and the Xcode integration bring the eases of Cocoa development to web development.
To build Cappuccino itself, please read below. More information is available
here: [Getting and Building the Source](http://wiki.github.com/cappuccino/cappuccino/getting-and-building-the-source>).
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/env ruby
puts <<-eos
Building with rake is no longer supported, use "jake" instead.
The commands are all the same (e.g. rake install -> jake install).
If you do not have jake, you can run sudo ./bootstrap.sh to install jake and it's dependencies.
PLEASE remove your Build folder ($CAPP_BUILD if it's set) when switching from rake to jake.
eos
exit(1);
+10
View File
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>BundleTest</string>
</dict>
</plist>
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;18E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;19E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;20E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;18E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;21E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;22E;E;D;K;10;$classnameS;18;_CPCibClassSwapperK;8;$classesA;S;18;_CPCibClassSwapperS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;23E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;24E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;24E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;25E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;26E;K;14;CPViewScaleKeyD;K;6;CP$UIDd;2;27E;K;18;CPViewSizeScaleKeyD;K;6;CP$UIDd;2;27E;K;17;CPViewIsScaledKeyD;K;6;CP$UIDd;2;28E;K;19;CPViewAppearanceKeyD;K;6;CP$UIDd;1;0E;K;22;CPViewTrackingAreasKeyD;K;6;CP$UIDd;2;29E;K;30;_CPCibClassSwapperClassNameKeyD;K;6;CP$UIDd;2;30E;K;38;_CPCibClassSwapperOriginalClassNameKeyD;K;6;CP$UIDd;2;31E;E;S;16;CPViewControllerD;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;S;4;viewS;13;CPApplicationd;1;0S;20;{{0, 0}, {480, 272}}d;2;12S;6;normalS;6;{1, 1}F;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;S;6;NSViewS;6;CPViewE;K;9;$archiverS;15;CPKeyedArchiverK;8;$versionS;6;100000E;
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10116"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="CPViewController">
<connections>
<outlet property="view" destination="c22-O7-iKe" id="ABk-lK-Kp8"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="c22-O7-iKe">
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
</customView>
</objects>
</document>
+89
View File
@@ -0,0 +1,89 @@
@import <AppKit/CPViewController.j>
@import <AppKit/CPApplication.j>
var methodsCalled;
@implementation CPViewControllerTest : OJTestCase
{
CPBundle bundle;
}
- (void)setUp
{
bundle = [CPBundle bundleWithPath:@"Tests/AppKit/BundleTest"];
[bundle loadWithDelegate:self];
}
- (void)bundleDidFinishLoading:(CPBundle)aBundle
{
}
- (void)testViewControllerCallbacks
{
methodsCalled = @[];
var expectedResult = @[@"viewDidLoad",
@"viewWillAppear",
@"viewDidAppear",
@"viewWillDisappear",
@"viewDidDisappear"];
[self assertTrue:[bundle isLoaded]];
var viewController = [[ViewController alloc] initWithCibName:@"NSViewController.cib" bundle:bundle];
[self assertNotNull:viewController];
var superview = [[CPView alloc] initWithFrame:CGRectMakeZero()];
var view = [viewController view];
[superview addSubview:view];
[view removeFromSuperview];
[self assert:expectedResult equals:methodsCalled];
// Explicitely change the view.
methodsCalled = [];
expectedResult = @[@"viewWillAppear",
@"viewDidAppear",
@"viewWillDisappear",
@"viewDidDisappear"];
var newView = [[CPView alloc] initWithFrame:CGRectMake(0,0,100,100)];
[viewController setView:newView];
[superview addSubview:newView];
[newView removeFromSuperview];
// Checks that with receive notifs from the new view and not from the old view.
[self assert:expectedResult equals:methodsCalled];
}
@end
@implementation ViewController : CPViewController
{
}
- (void)viewDidLoad
{
[methodsCalled addObject:_cmd];
}
- (void)viewDidAppear
{
[methodsCalled addObject:_cmd];
}
- (void)viewWillAppear
{
[methodsCalled addObject:_cmd];
}
- (void)viewDidDisappear
{
[methodsCalled addObject:_cmd];
}
- (void)viewWillDisappear
{
[methodsCalled addObject:_cmd];
}
@end
+19 -2
View File
@@ -905,6 +905,21 @@ var updateTrackingAreasCalls,
[self assert:expectedResult equals:methodCalled];
}
- (void)testAddViewRemoveView
{
var expectedResult = [@"viewWillMoveToSuperview_view2",
@"viewDidMoveToSuperview_view2",
@"viewWillMoveToSuperview_view2",
@"viewDidMoveToSuperview_view2",
@"viewWillMoveToWindow_view2",
@"viewDidMoveToWindow_view2"];
[view1 addSubview:view2];
[view2 removeFromSuperview];
[self assert:expectedResult equals:methodCalled];
}
- (void)testViewGainedHiddenAncestor
{
var expectedResult = [@"viewDidHide_view1",
@@ -917,14 +932,16 @@ var updateTrackingAreasCalls,
[view1 setHidden:YES];
[view2 addSubview:view3];
CPLog.warn("will add view2");
[view1 addSubview:view2];
[self assert:expectedResult equals:methodCalled];
[self assertTrue: [view2 isHiddenOrHasHiddenAncestor] message:@"Expected isHiddenOrHasHiddenAncestor = YES"];
[self assertTrue: [view2 isHiddenOrHasHiddenAncestor] message:@"Expected " + [view2 identifier] + "isHiddenOrHasHiddenAncestor = YES"];
[self assertTrue: [view3 isHiddenOrHasHiddenAncestor] message:@"Expected isHiddenOrHasHiddenAncestor = YES"];
[self assertFalse:[view2 isHidden]];
[self assertFalse:[view3 isHidden]];
[self assert:expectedResult equals:methodCalled];
}
- (void)testRemoveViewsHiddenByAncestor
+5 -1
View File
@@ -50,6 +50,10 @@
var innerRect = CGRectInset(aRect, CGRectGetWidth(aRect)/2 - 10, CGRectGetHeight(aRect)/2 - 10);
CGContextStrokeRectWithWidth(context, innerRect, 4);
CGContextSetTextPosition(context, innerRect.origin.x + 10, innerRect.origin.x + 10);
CGContextSetFillColor(context, [CPColor blueColor]);
CGContextShowText(context, 'Hello World Canvas!');
[self unlockFocus];
}
@@ -67,7 +71,7 @@
var label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()];
[label setStringValue:@"Hello World!"];
[label setStringValue:@"Do you see the Hello World Canvas?"];
[label setFont:[CPFont boldSystemFontOfSize:24.0]];
[label sizeToFit];
@@ -118,6 +118,13 @@ CPLogRegister(CPLogConsole);
return;
}
- (IBAction)enable:(id)sender
{
var enable = [sender state];
[segmentedControl1 setEnabled:enable];
[segmentedControl2 setEnabled:enable];
}
- (BOOL)assertTrue:(BOOL)value
{
[passedLabel setStringValue:value?@"Passed":@"Failed"];
@@ -1 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;31E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;32E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;59E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;69E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;47E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;55E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;70E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;71E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;67E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;72E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;67E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;65E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;73E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;67E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;63E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;74E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;67E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;62E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;75E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;67E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;76E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$clLine truncated
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;32E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;62E;D;K;6;CP$UIDd;2;63E;D;K;6;CP$UIDd;2;64E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;70E;D;K;6;CP$UIDd;2;72E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;50E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;51E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;52E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;53E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;54E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;55E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;56E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;57E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;58E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;60E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;72E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;65E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;66E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;67E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;69E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;60E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;73E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;74E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;70E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;75E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;70E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;67E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;76E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;70E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;40E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;77E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;70E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;39E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;78E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;70E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;35E;KLine truncated
File diff suppressed because it is too large. Load diff
+61
View File
@@ -0,0 +1,61 @@
/*
* AppController.j
* MobileTest
*
* Created by You on August 18, 2016.
* Copyright 2016, Your Company All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "Test1Controller.j"
@import "Test2Controller.j"
@implementation AppController : CPObject
{
@outlet CPWindow theWindow;
@outlet CPButton nextButton;
@outlet CPView testView;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (@action)next:(id)sender
{
[self activateTest:[Test2Controller new]];
[sender setEnabled:NO];
}
- (void)activateTest:aController
{
var viewFrame = [testView frame],
resizingMask = [testView autoresizingMask];
[aController loadViewWithCompletionHandler:function(aView, error)
{
[aView setFrame:viewFrame];
[aView setAutoresizingMask:resizingMask];
[[theWindow contentView] replaceSubview:testView with:aView];
testView = aView;
[theWindow makeFirstResponder:[aView nextValidKeyView]];
}];
}
- (void)awakeFromCib
{
// This is called when the cib is done loading.
// You can implement this method on any object instantiated from a Cib.
// It's a useful hook for setting up current UI values, and other things.
// In this case, we want the window from Cib to become our full browser window
[theWindow setFullPlatformWindow:YES];
[self activateTest:[Test1Controller new]];
}
@end
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Main cib file base name</key>
<string>MainMenu.cib</string>
<key>CPBundleName</key>
<string>MobileTest</string>
<key>CPBundleVersion</key>
<string>1.0</string>
<key>CPHumanReadableCopyright</key>
<string>Copyright © 2016, Your Company All rights reserved.</string>
<key>CPTheme</key>
<string>Aristo2</string>
</dict>
</plist>
+172
View File
@@ -0,0 +1,172 @@
/*
* Jakefile
* MobileTest
*
* Created by You on August 18, 2016.
* Copyright 2016, Your Company All rights reserved.
*/
var ENV = require("system").env,
FILE = require("file"),
JAKE = require("jake"),
task = JAKE.task,
FileList = JAKE.FileList,
app = require("cappuccino/jake").app,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
OS = require("os"),
projectName = "MobileTest";
app (projectName, function(task)
{
ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks";
if (configuration === "Debug")
ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration);
task.setBuildIntermediatesPath(FILE.join("Build", "MobileTest.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("MobileTest");
task.setIdentifier("com.yourcompany.MobileTest");
task.setVersion("1.0");
task.setAuthor("Your Company");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("MobileTest");
task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O2");
});
task ("default", [projectName], function()
{
printResults(configuration);
});
task ("build", ["default"], function()
{
updateApplicationSize();
});
task ("debug", function()
{
configuration = ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
configuration = ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", projectName));
OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]);
printResults("Deployment")
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName));
print("----------------------------");
}
function updateApplicationSize()
{
print("Calculating application file sizes...");
var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }),
format = CFPropertyList.sniffedFormatOfString(contents),
plist = CFPropertyList.propertyListFromString(contents),
totalBytes = {executable:0, data:0, mhtml:0};
// Get the size of all framework executables and sprite data
var frameworksDir = "Frameworks";
if (configuration === "Debug")
frameworksDir = FILE.join(frameworksDir, "Debug");
var frameworks = FILE.list(frameworksDir);
frameworks.forEach(function(framework)
{
if (framework !== "Source")
addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes);
});
// Read in the default theme name, and attempt to get its size
var themeName = plist.valueForKey("CPDefaultTheme") || "Aristo2",
themePath = nil;
if (themeName === "Aristo" || themeName === "Aristo2")
themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend");
else
themePath = FILE.join("Frameworks", "Resources", themeName + ".blend");
if (FILE.isDirectory(themePath))
addBundleFileSizes(themePath, totalBytes);
// Add sizes for the app
addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes);
print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data));
var dict = new CFMutableDictionary();
dict.setValueForKey("executable", totalBytes.executable);
dict.setValueForKey("data", totalBytes.data);
dict.setValueForKey("mhtml", totalBytes.mhtml);
plist.setValueForKey("CPApplicationSize", dict);
FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" });
}
function addBundleFileSizes(bundlePath, totalBytes)
{
var bundleName = FILE.basename(bundlePath),
environment = bundleName === "Foundation" ? "Objj" : "Browser",
bundlePath = FILE.join(bundlePath, environment + ".environment");
if (FILE.isDirectory(bundlePath))
{
var filename = bundleName + ".sj",
filePath = new FILE.Path(FILE.join(bundlePath, filename));
if (filePath.exists())
totalBytes.executable += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt"));
if (filePath.exists())
totalBytes.data += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt"));
if (filePath.exists())
totalBytes.mhtml += filePath.size();
filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt"));
if (filePath.exists())
totalBytes.mhtml += filePath.size();
}
}
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;17E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;20E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;31E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;30E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;32E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;33E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;34E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;35E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;36E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;23E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;37E;E;D;K;10;$classnameS;21;CPCibControlConnectorK;8;$classesA;S;21;CPCibControlConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;19E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;30E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;38E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;32E;E;D;K;10;$classnameS;20;_CPCibWindowTemplateK;8;$classesA;S;20;_CPCibWindowTemplateS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;22E;K;30;_CPCibWindowTemplateMaxSizeKeyD;K;6;CP$UIDd;2;39E;K;32;_CPCibWindowTemplateViewClassKeyD;K;6;CP$UIDd;1;0E;K;34;_CPCibWindowTemplateWindowClassKeyD;K;6;CP$UIDd;2;40E;K;30;_CPCibWindowTemplateWTFlagsKeyD;K;6;CP$UIDd;2;41E;K;33;_CPCibWindowTemplateWindowRectKeyD;K;6;CP$UIDd;2;42E;K;33;_CPCibWindowTemplateScreenRectKeyD;K;6;CP$UIDd;2;43E;K;30;_CPCibWindowTempatStyleMaskKeyD;K;6;CP$UIDd;2;44E;K;34;_CPCibWindowTemplateWindowTitleKeyD;K;6;CP$UIDd;2;45E;K;33;_CPCibWindowTemplateWindowViewKeyD;K;6;CP$UIDd;2;25E;K;53;_CPCibWindowTemplateWindowAutorecalculatesKeyViewLoopD;K;6;CP$UIDd;2;46E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;48E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;48E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;49E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;50E;K;14;CPViewScaleKeyD;K;6;CP$UIDd;2;51E;K;18;CPViewSizeScaleKeyD;K;6;CP$UIDd;2;51E;K;17;CPViewIsScaledKeyD;K;6;CP$UIDd;2;52E;K;19;CPViewAppearanceKeyD;K;6;CP$UIDd;1;0E;K;22;CPViewTrackingAreasKeyD;K;6;CP$UIDd;2;53E;E;D;K;6;$classD;K;6;CP$UIDd;2;24E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;25E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;47E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;54E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;54E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;55E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;25E;K;22;CPViewAutoresizLine truncated
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
<connections>
<outlet property="delegate" destination="450" id="451"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="390" width="375" height="559"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="375" height="559"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view id="IVa-Dv-gag">
<rect key="frame" x="0.0" y="34" width="375" height="525"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="t8K-kL-NiZ">
<rect key="frame" x="131" y="254" width="112" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Loading..." id="Q4J-cY-xsT">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<button verticalHuggingPriority="750" id="SpI-xM-izr">
<rect key="frame" x="153" y="7" width="69" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Next" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Jek-go-tdA">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="next:" target="450" id="pla-lq-G0N"/>
</connections>
</button>
</subviews>
</view>
<point key="canvasLocation" x="294.5" y="387.5"/>
</window>
<customObject id="450" customClass="AppController">
<connections>
<outlet property="nextButton" destination="SpI-xM-izr" id="peR-nP-CFC"/>
<outlet property="testView" destination="IVa-Dv-gag" id="qa9-HB-DLI"/>
<outlet property="theWindow" destination="371" id="459"/>
</connections>
</customObject>
</objects>
</document>
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;30E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;28E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;31E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;32E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;22E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;33E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;22E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;26E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;34E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;26E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;35E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;36E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;37E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;39E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;25E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;30E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;40E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;41E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;37E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;42E;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;43E;E;D;K;10;$classnameS;6;CPViewK;8;$classesA;S;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;21E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;44E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;45E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;45E;K;17;CPViewSubviewsKeyD;K;6;CP$UIDd;2;46E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;47E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;1;0E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;48E;K;14;CPViewScaleKeyD;K;6;CP$UIDd;2;49E;K;18;CPViewSizeScaleKeyD;K;6;CP$UIDd;2;49E;K;17;CPViewIsScaledKeyD;K;6;CP$UIDd;2;50E;K;19;CPViewAppearanceKeyD;K;6;CP$UIDd;1;0E;K;22;CPViewTrackingAreasKeyD;K;6;CP$UIDd;2;51E;E;D;K;10;$classnameS;11;CPTextFieldK;8;$classesA;S;11;CPTextFieldS;9;CPControlS;6;CPViewS;11;CPResponderS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;23E;K;27;CPResponderNextResponderKeyD;K;6;CP$UIDd;2;22E;K;18;CPResponderMenuKeyD;K;6;CP$UIDd;1;0E;K;12;CPViewTagKeyD;K;6;CP$UIDd;2;44E;K;14;CPViewFrameKeyD;K;6;CP$UIDd;2;52E;K;15;CPViewBoundsKeyD;K;6;CP$UIDd;2;53E;K;18;CPViewSuperviewKeyD;K;6;CP$UIDd;2;22E;K;22;CPViewAutoresizingMaskD;K;6;CP$UIDd;2;54E;K;19;CPViewThemeClassKeyD;K;6;CP$UIDd;2;55E;K;19;CPViewThemeStateKeyD;K;6;CP$UIDd;2;56E;K;6;$afontD;K;6;CP$UIDd;2;58E;K;17;$aline-break-modeD;K;6;CP$UIDd;2;44E;K;11;$aalignmentD;K;6;CP$UIDd;2;59E;K;14;CPViewScaleKeyD;K;6;CP$UIDd;2;49E;K;18;CPViewSizeScaleKeyD;K;6;CP$UIDd;2;49E;K;17;CLine truncated
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSViewController">
<connections>
<outlet property="view" destination="1uw-bt-qdI" id="dzb-ew-bjQ"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="1uw-bt-qdI">
<rect key="frame" x="0.0" y="0.0" width="375" height="525"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="rCm-w1-9Vy">
<rect key="frame" x="18" y="488" width="339" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="1. The text field below should be the first responder." id="efl-hH-HgI">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="MVy-6a-bmn">
<rect key="frame" x="18" y="357" width="339" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="You typed:" id="gcI-MY-VpS">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="displayPatternValue1" keyPath="selection.field1" id="JO4-tI-gAH">
<dictionary key="options">
<string key="NSDisplayPattern">You typed: %{value1}@</string>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="QQB-7H-iNj">
<rect key="frame" x="20" y="458" width="335" 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" drawsBackground="YES" id="ZN8-1s-rtm">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="p4m-dy-IvJ">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="kvK-Y3-gbr">
<rect key="frame" x="18" y="382" width="339" height="68"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="ifs-XG-wJH">
<font key="font" metaFont="system"/>
<string key="title">2. Using the iOS virtual keyboard, type something and then tap "Done". The text field should resign first responder status. The virtual keyboard should dismiss.</string>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="MTj-IO-Hdd">
<rect key="frame" x="18" y="281" width="339" height="68"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="XEZ-92-TT2">
<font key="font" metaFont="system"/>
<string key="title">It should not be possible to unfocus the field by tapping outside of it. Neither should tab on a hardware keyboard or return on the virtual keyboard cause the field to lose focus.</string>
<color key="textColor" white="0.25" alpha="0.84999999999999998" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="nextKeyView" destination="QQB-7H-iNj" id="rhW-S2-aO8"/>
</connections>
<point key="canvasLocation" x="222.5" y="143"/>
</view>
<objectController automaticallyPreparesContent="YES" id="8b9-mi-3ry">
<declaredKeys>
<string>field1</string>
</declaredKeys>
</objectController>
</objects>
</document>
@@ -0,0 +1 @@
280NPLIST;1.0;D;K;4;$topD;K;18;CPCibObjectDataKeyD;K;6;CP$UIDd;1;2E;E;K;8;$objectsA;S;5;$nullD;K;10;$classnameS;16;_CPCibObjectDataK;8;$classesA;S;16;_CPCibObjectDataS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;1E;K;28;_CPCibObjectDataNamesKeysKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataNamesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataClassesKeysKeyD;K;6;CP$UIDd;1;0E;K;32;_CPCibObjectDataClassesValuesKeyD;K;6;CP$UIDd;1;0E;K;30;_CPCibObjectDataConnectionsKeyD;K;6;CP$UIDd;1;4E;K;28;_CPCibObjectDataFrameworkKeyD;K;6;CP$UIDd;1;0E;K;26;_CPCibObjectDataNextOidKeyD;K;6;CP$UIDd;1;5E;K;30;_CPCibObjectDataObjectsKeysKeyD;K;6;CP$UIDd;1;6E;K;32;_CPCibObjectDataObjectsValuesKeyD;K;6;CP$UIDd;1;7E;K;26;_CPCibObjectDataOidKeysKeyD;K;6;CP$UIDd;1;8E;K;28;_CPCibObjectDataOidValuesKeyD;K;6;CP$UIDd;1;9E;K;28;_CPCibObjectDataFileOwnerKeyD;K;6;CP$UIDd;2;11E;K;33;_CPCibObjectDataVisibleWindowsKeyD;K;6;CP$UIDd;2;13E;E;D;K;10;$classnameS;7;CPArrayK;8;$classesA;S;7;CPArrayS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;15E;D;K;6;CP$UIDd;2;16E;D;K;6;CP$UIDd;2;18E;D;K;6;CP$UIDd;2;19E;D;K;6;CP$UIDd;2;20E;D;K;6;CP$UIDd;2;21E;D;K;6;CP$UIDd;2;22E;D;K;6;CP$UIDd;2;23E;D;K;6;CP$UIDd;2;24E;D;K;6;CP$UIDd;2;25E;D;K;6;CP$UIDd;2;26E;D;K;6;CP$UIDd;2;27E;D;K;6;CP$UIDd;2;28E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;29E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;1;0E;D;K;6;CP$UIDd;2;51E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;11E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;33E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;34E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;35E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;36E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;37E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;38E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;39E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;40E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;41E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;42E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;43E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;44E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;45E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;46E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;48E;D;K;6;CP$UIDd;2;31E;D;K;6;CP$UIDd;2;49E;D;K;6;CP$UIDd;2;11E;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;6;$classD;K;6;CP$UIDd;1;3E;K;10;CP.objectsA;E;E;D;K;10;$classnameS;18;_CPCibCustomObjectK;8;$classesA;S;18;_CPCibCustomObjectS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;10E;K;27;_CPCibCustomObjectClassNameD;K;6;CP$UIDd;2;52E;E;D;K;10;$classnameS;5;CPSetK;8;$classesA;S;5;CPSetS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;12E;K;15;CPSetObjectsKeyD;K;6;CP$UIDd;2;53E;E;D;K;10;$classnameS;20;CPCibOutletConnectorK;8;$classesA;S;20;CPCibOutletConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;11E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;31E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;54E;E;D;K;6;$classD;K;6;CP$UIDd;2;14E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;31E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;34E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;55E;E;D;K;10;$classnameS;21;CPCibBindingConnectorK;8;$classesA;S;21;CPCibBindingConnectorS;14;CPCibConnectorS;8;CPObjectE;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;46E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;60E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;40E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;61E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;36E;K;29;_CPCibConnectorDestinationKeyD;K;6;CP$UIDd;2;51E;K;23;_CPCibConnectorLabelKeyD;K;6;CP$UIDd;2;56E;K;31;CPCibBindingConnectorBindingKeyD;K;6;CP$UIDd;2;57E;K;31;CPCibBindingConnectorKeyPathKeyD;K;6;CP$UIDd;2;58E;K;31;CPCibBindingConnectorOptionsKeyD;K;6;CP$UIDd;2;62E;E;D;K;6;$classD;K;6;CP$UIDd;2;17E;K;24;_CPCibConnectorSourceKeyD;K;6;CP$UIDd;2;38E;K;Line truncated
@@ -0,0 +1,251 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSViewController">
<connections>
<outlet property="view" destination="1uw-bt-qdI" id="dzb-ew-bjQ"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<view id="1uw-bt-qdI">
<rect key="frame" x="0.0" y="0.0" width="375" height="525"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="rCm-w1-9Vy">
<rect key="frame" x="18" y="488" width="339" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" selectable="YES" sendsActionOnEndEditing="YES" title="1. Using iOS, select the bottom text field." id="efl-hH-HgI">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="QQB-7H-iNj">
<rect key="frame" x="20" y="20" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="ZN8-1s-rtm">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="p4m-dy-IvJ">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="WHn-bp-YXb">
<rect key="frame" x="20" y="52" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="0o4-mu-lKf">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="Gfb-DD-fKx">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="ieC-jz-hFF">
<rect key="frame" x="20" y="84" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="HOR-W1-60I">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="k5D-Z5-mwy">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="2Z5-X6-GfO">
<rect key="frame" x="20" y="116" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="gOY-ut-suP">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="y6S-7u-G3m">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="Za1-xG-Gge">
<rect key="frame" x="20" y="148" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Whd-4q-Rij">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="ySP-Nl-D8a">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="YVP-ZC-pGO">
<rect key="frame" x="20" y="180" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="Fgs-u3-H2A">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="iyO-Wc-v8U">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="jR4-b9-wqI">
<rect key="frame" x="20" y="212" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="hj2-cr-R0C">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="RbR-Gf-CIt">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="1cZ-8Y-ZWv">
<rect key="frame" x="20" y="244" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="F2w-Ot-3JD">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="qFE-oq-Yqc">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" id="71B-ey-AJb">
<rect key="frame" x="20" y="276" width="168" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="qqS-DR-Adh">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="OVX-Dh-zhj">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="kvK-Y3-gbr">
<rect key="frame" x="18" y="446" width="339" height="34"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="2. Try to tap other fields while the virtual keyboard is selected. The right field should become selected." id="ifs-XG-wJH">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="4WG-1c-b2Z">
<rect key="frame" x="18" y="404" width="339" height="34"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="3. Tapping the &quot;Do Nothing&quot; button should not cause keyboard focus to be lost." id="iDO-ew-aej">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" id="MTj-IO-Hdd">
<rect key="frame" x="18" y="362" width="339" height="34"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" title="Cappuccino's hit test should not be confused by the presence of the virtual keyboard." id="XEZ-92-TT2">
<font key="font" metaFont="system"/>
<color key="textColor" white="0.25" alpha="0.84999999999999998" colorSpace="calibratedWhite"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="wQe-i8-b9b">
<rect key="frame" x="125" y="306" width="230" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" enabled="NO" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" placeholderString="Disabled" drawsBackground="YES" id="X9c-cC-iMx">
<font key="font" metaFont="system"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="value" keyPath="selection.field1" id="CMU-yu-TDf">
<dictionary key="options">
<bool key="NSContinuouslyUpdatesValue" value="YES"/>
</dictionary>
</binding>
</connections>
</textField>
<button verticalHuggingPriority="750" id="gwi-W0-EM0">
<rect key="frame" x="14" y="300" width="109" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Do Nothing" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="a7n-DE-CMc">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="MVy-6a-bmn">
<rect key="frame" x="18" y="337" width="339" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="You typed:" id="gcI-MY-VpS">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<connections>
<binding destination="8b9-mi-3ry" name="displayPatternValue1" keyPath="selection.field1" id="JO4-tI-gAH">
<dictionary key="options">
<string key="NSDisplayPattern">You typed: %{value1}@</string>
</dictionary>
</binding>
</connections>
</textField>
</subviews>
<connections>
<outlet property="nextKeyView" destination="QQB-7H-iNj" id="rhW-S2-aO8"/>
</connections>
<point key="canvasLocation" x="222.5" y="142.5"/>
</view>
<objectController automaticallyPreparesContent="YES" id="8b9-mi-3ry">
<declaredKeys>
<string>field1</string>
</declaredKeys>
</objectController>
</objects>
</document>
+19
View File
@@ -0,0 +1,19 @@
@import <AppKit/AppKit.j>
@import "Test1Controller.j"
@implementation Test1Controller : CPViewController
{
}
- (id)init
{
return [super initWithCibName:@"Test1View" bundle:nil];
}
- (void)viewDidLoad
{
CPLog("Loaded %@ view %@", self, [self view]);
}
@end
+19
View File
@@ -0,0 +1,19 @@
@import <AppKit/AppKit.j>
@import "Test1Controller.j"
@implementation Test2Controller : CPViewController
{
}
- (id)init
{
return [super initWithCibName:@"Test2View" bundle:nil];
}
- (void)viewDidLoad
{
CPLog("Loaded %@ view %@", self, [self view]);
}
@end
+204
View File
@@ -0,0 +1,204 @@
<!DOCTYPE html>
<html lang="en">
<!--
index-debug.html
MobileTest
Created by You on August 18, 2016.
Copyright 2016, Your Company All rights reserved.
-->
<head>
<meta charset="utf-8">
<!--[if lte IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
<![endif]-->
<!--[if gte IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<![endif]-->
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="Resources/icon.png">
<link rel="apple-touch-startup-image" href="Resources/default.png">
<title>MobileTest</title>
<!-- Custom javascript goes here -->
<!-- End custom javascript -->
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks"];
// The below will tell the compiler to generate debug symbols, type signatures and not inline objj_msgSend functions.
// This will affect only Objective-J code that is compiled when loading the application. It will not affect precompiled
// code like the Cappuccino frameworks.
//
// Debug symbols will give each Objective-J method a Javascript function name. Without a name it will be very hard to find
// the methods in the debugger.
// Type Signatures will give type information to the Objective-J runtime for instance variables and methods.
// Inline objj_msgSend will give a speed increase but decorators will not work. Check below on debug options for
// more information on decorators.
//
// Uncomment or comment on the line below to change the flags
OBJJ_COMPILER_FLAGS = ["IncludeDebugSymbols", "IncludeTypeSignatures"/*, "InlineMsgSend"*/];
var progressBar = null;
OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path)
{
percent = percent * 100;
if (!progressBar)
progressBar = document.getElementById("progress-bar");
if (progressBar)
progressBar.style.width = Math.min(percent, 100) + "%";
}
var loadingHTML =
'<div id="loading">' +
' <div id="loading-text">Loading...</div>' +
' <div id="progress-indicator">' +
' <span id="progress-bar" style="width:0%"></span>' +
' </div>' +
'</div>';
</script>
<script type="text/javascript" src="Frameworks/Debug/Objective-J/Objective-J.js" charset="UTF-8"></script>
<script type="text/javascript">
objj_msgSend_reset();
// DEBUG OPTIONS:
// Decorators will only work when the code is compiled without the compiler option 'InlineMsgSend'. Check above.
// Uncomment to enable printing of backtraces on exceptions:
//objj_msgSend_decorate(objj_backtrace_decorator);
// Uncomment to supress exceptions that take place inside a message
//objj_msgSend_decorate(objj_supress_exceptions_decorator)
// Uncomment to enable runtime type checking:
//objj_msgSend_decorate(objj_typecheck_decorator);
// Uncomment (along with both above) to print backtraces on type check errors:
//objj_typecheck_prints_backtrace = true;
// Uncomment to disable the default logger (CPLogConsole if window.console exists, CPLogPopup otherwise):
//CPLogUnregister(CPLogDefault);
// Uncomment to enable a specific logger:
//CPLogRegister(CPLogConsole);
//CPLogRegister(CPLogPopup);
// Tag view DOM elements with a "data-cappuccino-view" attribute that contains
// the class name of the view that created them. Comment this or set to false to disable.
appkit_tag_dom_elements = true;
</script>
<style type="text/css">
html, body, h1, p {
margin: 0;
padding: 0;
}
/* We need a body wrapper because Cappuccino is unhappy if we change the body element */
#cappuccino-body {
/* Position it absolutely so it will fill the height without content */
position: absolute;
top: 0;
bottom: 0;
width: 100%;
/* Put it at the bottom of the stack so it doesn't interfere with UI */
z-index: 0;
}
#cappuccino-body .container {
display: table;
margin: 0 auto;
height: 100%;
}
#cappuccino-body .content {
display: table-cell;
height: 100%;
vertical-align: top;
}
#loading {
position: relative;
top: 35%;
}
#loading-text {
height: 1.5em;
color: #555;
font: normal bold 36px/36px Arial, sans-serif;
}
#progress-indicator {
padding: 0px;
height: 16px;
border: 5px solid #555;
border-radius: 18px;
background-color: white;
}
#progress-bar {
position: relative;
top: -1px;
left: -1px;
display: block;
height: 18px;
/* Compensate for moving the bar left 1px to overlap the indicator border */
border-right: 1px solid #555;
background-color: #555;
}
#noscript {
position: relative;
top: 35%;
padding: 1em 1.5em;
border: 5px solid #555;
border-radius: 16px;
background-color: white;
color: #555;
text-align: center;
font: bold 24px Arial, sans-serif;
}
#noscript a {
color: #98c0ff;
text-decoration: none;
}
</style>
</head>
<body>
<div id="cappuccino-body">
<div class="container">
<div class="content">
<script type="text/javascript">
document.write(loadingHTML);
</script>
</div>
</div>
<noscript style="position:absolute; top:0; left:0; width:100%; height:100%">
<div class="container">
<div class="content">
<div id="noscript">
<p style="font-size:120%; margin-bottom:.75em">JavaScript is required for this site.</p>
<p><a href="http://www.enable-javascript.com" target="_blank">Enable JavaScript</a></p>
</div>
</div>
</div>
</noscript>
</div>
</body>
</html>
+166
View File
@@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="en">
<!--
index.html
MobileTest
Created by You on August 18, 2016.
Copyright 2016, Your Company All rights reserved.
-->
<head>
<meta charset="utf-8">
<!--[if lte IE 8]>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1">
<![endif]-->
<!--[if gte IE 9]>
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
<![endif]-->
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon" href="Resources/icon.png">
<link rel="apple-touch-startup-image" href="Resources/default.png">
<title>MobileTest</title>
<!-- Custom javascript goes here -->
<!-- End custom javascript -->
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
// The below will tell the compiler to not generate debug symbols but will generate type signatures and inline objj_msgSend functions.
// This will affect only Objective-J code that is compiled when loading the application. It will not affect precompiled
// code like the Cappuccino frameworks.
// Uncomment or comment on the line below to change the flags
OBJJ_COMPILER_FLAGS = [/*"IncludeDebugSymbols"*/, "IncludeTypeSignatures", "InlineMsgSend"];
var progressBar = null;
OBJJ_PROGRESS_CALLBACK = function(percent, appSize, path)
{
percent = percent * 100;
if (!progressBar)
progressBar = document.getElementById("progress-bar");
if (progressBar)
progressBar.style.width = Math.min(percent, 100) + "%";
}
var loadingHTML =
'<div id="loading">' +
' <div id="loading-text">Loading...</div>' +
' <div id="progress-indicator">' +
' <span id="progress-bar" style="width:0%"></span>' +
' </div>' +
'</div>';
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
html, body, h1, p {
margin: 0;
padding: 0;
}
/* We need a body wrapper because Cappuccino is unhappy if we change the body element */
#cappuccino-body {
/* Position it absolutely so it will fill the height without content */
position: absolute;
top: 0;
bottom: 0;
width: 100%;
/* Put it at the bottom of the stack so it doesn't interfere with UI */
z-index: 0;
}
#cappuccino-body .container {
display: table;
margin: 0 auto;
height: 100%;
}
#cappuccino-body .content {
display: table-cell;
height: 100%;
vertical-align: top;
}
#loading {
position: relative;
top: 35%;
}
#loading-text {
height: 1.5em;
color: #555;
font: normal bold 36px/36px Arial, sans-serif;
}
#progress-indicator {
padding: 0px;
height: 16px;
border: 5px solid #555;
border-radius: 18px;
background-color: white;
}
#progress-bar {
position: relative;
top: -1px;
left: -1px;
display: block;
height: 18px;
/* Compensate for moving the bar left 1px to overlap the indicator border */
border-right: 1px solid #555;
background-color: #555;
}
#noscript {
position: relative;
top: 35%;
padding: 1em 1.5em;
border: 5px solid #555;
border-radius: 16px;
background-color: white;
color: #555;
text-align: center;
font: bold 24px Arial, sans-serif;
}
#noscript a {
color: #98c0ff;
text-decoration: none;
}
</style>
</head>
<body>
<div id="cappuccino-body">
<div class="container">
<div class="content">
<script type="text/javascript">
document.write(loadingHTML);
</script>
</div>
</div>
<noscript style="position:absolute; top:0; left:0; width:100%; height:100%">
<div class="container">
<div class="content">
<div id="noscript">
<p style="font-size:120%; margin-bottom:.75em">JavaScript is required for this site.</p>
<p><a href="http://www.enable-javascript.com" target="_blank">Enable JavaScript</a></p>
</div>
</div>
</div>
</noscript>
</div>
</body>
</html>
+18
View File
@@ -0,0 +1,18 @@
/*
* AppController.j
* CPTextField
*
* Created by Alexander Ljungberg on August 2, 2010.
* Copyright 2010, WireLoad, LLC All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14F6a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="6300" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -55,6 +55,12 @@
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW">
<connections>
<action selector="openPreferences:" target="Voe-Tx-rLC" id="s5c-ub-L21"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aLw-oG-Lg7"/>
<menuItem title="Hide XcodeCapp" keyEquivalent="h" id="sRE-41-LaW">
<connections>
<action selector="hide:" target="-1" id="fqN-rY-k4W"/>
@@ -72,12 +78,6 @@
<action selector="unhideAllApplications:" target="-1" id="Zvz-1V-oYp"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aLw-oG-Lg7"/>
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW">
<connections>
<action selector="openPreferences:" target="Voe-Tx-rLC" id="s5c-ub-L21"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Quit XcodeCapp" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
@@ -380,7 +380,6 @@
<tableView appearanceType="vibrantLight" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="72" rowSizeStyle="automatic" viewBased="YES" id="Mss-Tu-7kR">
<rect key="frame" x="0.0" y="0.0" width="263" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
@@ -404,7 +403,6 @@
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" id="nss-wl-6TY">
<rect key="frame" x="17" y="49" width="223" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" title="Table View Cell" id="HCp-It-Jhp">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -417,16 +415,13 @@
<view key="contentView">
<rect key="frame" x="0.0" y="0.0" width="10" height="10"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
</view>
<animations/>
<color key="borderColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</box>
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="MsY-oY-iIn">
<rect key="frame" x="-12" y="-2" width="279" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
@@ -434,7 +429,6 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="PN4-Zx-XTz">
<rect key="frame" x="17" y="36" width="223" height="11"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" controlSize="mini" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" title="Label" id="gK0-ds-ocu">
<font key="font" metaFont="miniSystem"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
@@ -448,7 +442,6 @@
<button toolTip="Open In Xcode" verticalHuggingPriority="750" id="0Kk-a1-H2b">
<rect key="frame" x="144" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="open-in-xcode" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="21c-Zh-TSt">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -457,7 +450,6 @@
<button toolTip="Switch listening mode" verticalHuggingPriority="750" id="PoH-Du-Pas">
<rect key="frame" x="0.0" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="run" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="WLR-K6-Jof">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -466,7 +458,6 @@
<button toolTip="Reset the project" verticalHuggingPriority="750" id="7pJ-O0-Sk5">
<rect key="frame" x="180" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="resync" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="0lw-E5-col">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -475,7 +466,6 @@
<button toolTip="Open in Finder" verticalHuggingPriority="750" id="vsI-jy-i4m">
<rect key="frame" x="36" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="open-in-finder" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="wlx-b2-lHy">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -484,7 +474,6 @@
<button toolTip="Edit in Code Editor" verticalHuggingPriority="750" id="rTo-y9-fQU">
<rect key="frame" x="72" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="open-in-editor" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="VDo-2A-vaS">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
@@ -493,19 +482,16 @@
<button toolTip="Open Terminal in Project" verticalHuggingPriority="750" id="dz5-I3-w2h">
<rect key="frame" x="108" y="0.0" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" heightSizable="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="open-in-terminal" imagePosition="overlaps" alignment="center" controlSize="small" imageScaling="proportionallyDown" inset="2" id="Mwt-yg-Jeo">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="smallSystem"/>
</buttonCell>
</button>
</subviews>
<animations/>
</customView>
<customView id="kNu-ud-1j8" customClass="YRKSpinningProgressIndicator">
<rect key="frame" x="244" y="28" width="16" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<animations/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="maxValue">
<integer key="value" value="1"/>
@@ -513,7 +499,6 @@
</userDefinedRuntimeAttributes>
</customView>
</subviews>
<animations/>
<connections>
<outlet property="boxStatus" destination="kpw-qm-NQG" id="wgF-TG-b72"/>
<outlet property="buttonOpenInEditor" destination="rTo-y9-fQU" id="9Wd-NB-CiJ"/>
@@ -537,19 +522,15 @@
</connections>
</tableView>
</subviews>
<animations/>
<nil key="backgroundColor"/>
</clipView>
<animations/>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="GIE-ju-XbD">
<rect key="frame" x="1" y="119" width="223" height="15"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="pb5-AF-zGg">
<rect key="frame" x="224" y="17" width="15" height="102"/>
<autoresizingMask key="autoresizingMask"/>
<animations/>
</scroller>
</scrollView>
<box autoresizesSubviews="NO" transparent="YES" title="Box" boxType="custom" borderType="line" titlePosition="noTitle" id="atN-bp-ONR">
@@ -562,7 +543,6 @@
<button verticalHuggingPriority="750" id="7QO-xa-9rT">
<rect key="frame" x="0.0" y="-2" width="35" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSAddTemplate" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="ari-l9-Qyx">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -574,7 +554,6 @@
<button verticalHuggingPriority="750" id="5qE-h2-muz">
<rect key="frame" x="34" y="-2" width="35" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="NSRemoveTemplate" imagePosition="overlaps" alignment="center" imageScaling="proportionallyDown" inset="2" id="Wwg-4A-3Ad">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -589,14 +568,11 @@
</connections>
</button>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="1" green="1" blue="1" alpha="0.41999999999999998" colorSpace="calibratedRGB"/>
<color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</box>
</subviews>
<animations/>
</customView>
<customView id="87a-A4-dGN">
<rect key="frame" x="264" y="0.0" width="599" height="634"/>
@@ -616,7 +592,6 @@
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="QMT-Ui-fxI">
<rect key="frame" x="-1" y="-3" width="613" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
@@ -624,7 +599,6 @@
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" id="krM-95-waf">
<rect key="frame" x="14" y="24" width="580" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" focusRingType="none" title="Project Name" id="ylH-C3-MHM">
<font key="font" metaFont="system"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
@@ -637,7 +611,6 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="0c3-NS-t4n">
<rect key="frame" x="14" y="8" width="580" height="14"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" title="Project Path" id="NvI-dv-Vcf">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" red="0.76319916294850176" green="0.76061204714189667" blue="0.76578627875510685" alpha="1" colorSpace="calibratedRGB"/>
@@ -648,9 +621,7 @@
</connections>
</textField>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="0.96862745098039216" green="0.50588235294117645" blue="0.16470588235294117" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" red="0.34509803921568627" green="0.34509803921568627" blue="0.34509803921568627" alpha="1" colorSpace="calibratedRGB"/>
</box>
@@ -664,7 +635,6 @@
<button verticalHuggingPriority="750" id="sNm-EJ-c40">
<rect key="frame" x="18" y="2" width="147" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="square" title="Settings" bezelStyle="shadowlessSquare" alignment="center" refusesFirstResponder="YES" imageScaling="proportionallyDown" inset="2" id="Fel-8z-zmY">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -681,7 +651,6 @@
<button verticalHuggingPriority="750" id="E4i-Ez-bfl">
<rect key="frame" x="227" y="2" width="147" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="square" title="Errors &amp; Warnings" bezelStyle="shadowlessSquare" alignment="center" refusesFirstResponder="YES" imageScaling="proportionallyDown" inset="2" id="x1c-0h-XNs">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -698,7 +667,6 @@
<button verticalHuggingPriority="750" id="UCo-MK-pOT">
<rect key="frame" x="432" y="2" width="147" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="square" title="Operations" bezelStyle="shadowlessSquare" alignment="center" refusesFirstResponder="YES" imageScaling="proportionallyDown" inset="2" id="ZxW-hd-KKo">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -715,22 +683,18 @@
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="0Lp-Tm-YXi">
<rect key="frame" x="0.0" y="-2" width="599" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
</box>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.93725490196078431" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</box>
<tabView drawsBackground="NO" type="noTabsNoBorder" id="00d-fn-q41">
<rect key="frame" x="0.0" y="0.0" width="599" height="562"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<animations/>
<font key="font" metaFont="system"/>
<tabViewItems/>
<connections>
@@ -738,13 +702,10 @@
</connections>
</tabView>
</subviews>
<animations/>
</customView>
</subviews>
<animations/>
</customView>
</subviews>
<animations/>
<holdingPriorities>
<real value="250"/>
<real value="250"/>
@@ -754,7 +715,6 @@
</connections>
</splitView>
</subviews>
<animations/>
</view>
<connections>
<outlet property="initialFirstResponder" destination="Mss-Tu-7kR" id="fe9-ry-0ar"/>
@@ -772,7 +732,6 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="3j4-r5-Ybe">
<rect key="frame" x="74" y="64" width="149" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="XcodeCapp" id="qvL-bN-A9R">
<font key="font" metaFont="systemBold" size="15"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -782,7 +741,6 @@
<textField verticalHuggingPriority="750" id="vIx-Hh-v8Z">
<rect key="frame" x="117" y="42" width="63" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="left" title="Version 4.0" id="WUW-Ut-m7V">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
@@ -795,7 +753,6 @@
<textField verticalHuggingPriority="750" id="IH1-cn-Xc9">
<rect key="frame" x="18" y="20" width="260" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Copyright © 2012-2016 Cappuccino Project." id="8lT-Ky-ecV">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" white="0.5" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
@@ -805,11 +762,9 @@
<imageView id="Q2t-aL-TDg">
<rect key="frame" x="107" y="89" width="82" height="82"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="logo" id="zF2-py-kAi"/>
</imageView>
</subviews>
<animations/>
</view>
<point key="canvasLocation" x="-218" y="94.5"/>
</window>
@@ -826,7 +781,6 @@
<button toolTip="If this is checked, when a Cappuccino project is opened, the project’s Xcode support project will be opened automatically" id="QGE-Iy-i46">
<rect key="frame" x="18" y="96" width="321" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="check" title="Automatically open Projects in Xcode" bezelStyle="regularSquare" imagePosition="left" alignment="left" state="on" inset="2" id="VNE-DB-5fX">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -843,7 +797,6 @@
<textField verticalHuggingPriority="750" id="Llm-fD-60A">
<rect key="frame" x="18" y="70" width="186" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Maximum parallel operations:" id="feI-Ow-URM">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -853,7 +806,6 @@
<popUpButton verticalHuggingPriority="750" id="9up-BP-tRE">
<rect key="frame" x="229" y="65" width="111" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<popUpButtonCell key="cell" type="push" title="20" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="UjK-Ie-IaQ" id="niA-cT-acm">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
@@ -875,7 +827,6 @@
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="axH-wD-X4l">
<rect key="frame" x="18" y="20" width="321" height="42"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" id="NZb-FO-ea5">
<font key="font" metaFont="smallSystem"/>
<string key="title">This represents the number of operations XcodeCapp can do in parallel. Decrease the this value if you encounter slugginesh or over CPU usage.</string>
@@ -884,7 +835,6 @@
</textFieldCell>
</textField>
</subviews>
<animations/>
</view>
<point key="canvasLocation" x="-156.5" y="-126"/>
</window>
@@ -902,13 +852,11 @@
<imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" id="9iO-X5-hpo">
<rect key="frame" x="26" y="75" width="186" height="186"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="logo" id="1zG-V8-6bF"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="lpR-ul-R4k">
<rect key="frame" x="40" y="42" width="158" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="XcodeCapp" id="Oar-AW-2i5">
<font key="font" metaFont="system" size="18"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -918,7 +866,6 @@
<textField verticalHuggingPriority="750" id="fUL-eL-YkQ">
<rect key="frame" x="18" y="20" width="203" height="14"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Version 4.0" id="unR-NY-aap">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" white="0.31343064259999998" alpha="1" colorSpace="calibratedWhite"/>
@@ -929,12 +876,9 @@
</connections>
</textField>
</subviews>
<animations/>
</customView>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" red="0.98039221759999995" green="0.98039221759999995" blue="0.98039221759999995" alpha="1" colorSpace="deviceRGB"/>
<point key="canvasLocation" x="310.5" y="-302.5"/>
@@ -953,7 +897,6 @@
<box verticalHuggingPriority="750" title="Box" boxType="separator" titlePosition="noTitle" id="FVR-yM-GAZ">
<rect key="frame" x="40" y="116" width="354" height="5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<animations/>
<color key="borderColor" white="0.0" alpha="0.41999999999999998" colorSpace="calibratedWhite"/>
<color key="fillColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<font key="titleFont" metaFont="system"/>
@@ -968,7 +911,6 @@
<button focusRingType="none" id="wQo-c7-sD7">
<rect key="frame" x="14" y="15" width="27" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="NSAddTemplate" imagePosition="only" alignment="center" focusRingType="none" imageScaling="proportionallyDown" inset="2" id="o7j-4e-NNJ">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -978,21 +920,17 @@
</connections>
</button>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="0.97254901960784312" green="0.50196078431372548" blue="0.15686274509803921" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
</box>
<progressIndicator wantsLayer="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" id="vPH-Iq-Ray">
<rect key="frame" x="201" y="40" width="32" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<animations/>
</progressIndicator>
<button focusRingType="none" id="wdl-kS-DYD">
<rect key="frame" x="124" y="150" width="186" height="186"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<animations/>
<buttonCell key="cell" type="square" bezelStyle="shadowlessSquare" image="logo" imagePosition="only" alignment="center" focusRingType="none" imageScaling="proportionallyDown" inset="2" id="OC7-Ci-3pt">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -1002,12 +940,9 @@
</connections>
</button>
</subviews>
<animations/>
</customView>
</subviews>
<animations/>
</view>
<animations/>
<color key="borderColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<color key="fillColor" red="0.98039221759999995" green="0.98039221759999995" blue="0.98039221759999995" alpha="1" colorSpace="deviceRGB"/>
<connections>
@@ -43,7 +43,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
XCCCappuccinoProjectController *controller = (__bridge XCCCappuccinoProjectController *)userData;
NSArray *paths = (__bridge NSArray *)eventPaths;
[controller _handleFSEventsWithPaths:paths flags:eventFlags ids:eventIds];
}
@@ -64,11 +64,11 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
self.cappuccinoProject = [[XCCCappuccinoProject alloc] initWithPath:aPath];
self.mainXcodeCappController = aController;
self->sourceProcessingOperations = [@{} mutableCopy];
self->operationQueue = [[NSApp delegate] mainOperationQueue];
self->operationQueue = [((AppDelegate *)[NSApp delegate]) mainOperationQueue];
[self _reinitializeProjectController];
}
return self;
}
@@ -83,16 +83,16 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (void)_reinitializeTaskLauncher
{
NSArray *binaryPaths = @[];
if ([self.cappuccinoProject.binaryPaths count])
binaryPaths = [self.cappuccinoProject.binaryPaths valueForKeyPath:@"name"];
self->taskLauncher = [[XCCTaskLauncher alloc] initWithEnvironmentPaths:binaryPaths];
if (!self->taskLauncher.isValid)
{
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
NSRunAlertPanel(
self.cappuccinoProject.nickname,
@"XcodeCapp was unable to find all necessary executables in your environment:\n\n"
@@ -102,7 +102,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
nil,
nil,
[self->taskLauncher.executables componentsJoinedByString:@", "]);
[self _reinitializeProjectController];
}
}
@@ -183,7 +183,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
BOOL projectExists, projectIsDirectory;
projectExists = [fm fileExistsAtPath:self.cappuccinoProject.XcodeProjectPath isDirectory:&projectIsDirectory];
BOOL supportExists, supportIsDirectory;
supportExists = [fm fileExistsAtPath:self.cappuccinoProject.supportPath isDirectory:&supportIsDirectory];
@@ -197,43 +197,43 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (BOOL)_isXcodeSupportCompatible
{
double appCompatibilityVersion = [[[NSBundle mainBundle] objectForInfoDictionaryKey:XCCCompatibilityVersionKey] doubleValue];
NSNumber *projectCompatibilityVersion = @([self.cappuccinoProject.version intValue]);
if (projectCompatibilityVersion == nil)
{
NSLog(@"No compatibility version in project");
return NO;
}
NSLog(@"XcodeCapp/project compatibility version: %0.1f/%0.1f", projectCompatibilityVersion.doubleValue, appCompatibilityVersion);
return projectCompatibilityVersion.doubleValue >= appCompatibilityVersion;
}
- (void)_createXcodeProject
{
[self _removeXcodeProject];
NSFileManager *fm = [NSFileManager defaultManager];
[fm createDirectoryAtPath:self.cappuccinoProject.XcodeProjectPath withIntermediateDirectories:YES attributes:nil error:nil];
NSString *pbxPath = [self.cappuccinoProject.XcodeProjectPath stringByAppendingPathComponent:@"project.pbxproj"];
[fm copyItemAtPath:[[NSBundle mainBundle] pathForResource:@"project" ofType:@"pbxproj"] toPath:pbxPath error:nil];
NSMutableString *content = [NSMutableString stringWithContentsOfFile:pbxPath encoding:NSUTF8StringEncoding error:nil];
[content writeToFile:pbxPath atomically:YES encoding:NSUTF8StringEncoding error:nil];
NSLog(@"Xcode support project created at: %@", self.cappuccinoProject.XcodeProjectPath);
}
- (void)_removeXcodeProject
{
NSFileManager *fm = [NSFileManager defaultManager];
if ([fm fileExistsAtPath:self.cappuccinoProject.XcodeProjectPath])
[fm removeItemAtPath:self.cappuccinoProject.XcodeProjectPath error:nil];
}
@@ -241,20 +241,20 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (void)_createXcodeSupportDirectory
{
[self _removeXcodeSupportDirectory];
[[NSFileManager defaultManager] createDirectoryAtPath:self.cappuccinoProject.supportPath withIntermediateDirectories:YES attributes:nil error:nil];
[self.cappuccinoProject saveSettings];
NSLog(@".XcodeSupport directory created at: %@", self.cappuccinoProject.supportPath);
}
- (void)_removeXcodeSupportDirectory
{
[XcodeProjectCloser closeXcodeProjectForProject:self.cappuccinoProject.projectPath];
NSFileManager *fm = [NSFileManager defaultManager];
if ([fm fileExistsAtPath:self.cappuccinoProject.supportPath])
[fm removeItemAtPath:self.cappuccinoProject.supportPath error:nil];
}
@@ -272,13 +272,13 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
NSArray *subpaths = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:self.cappuccinoProject.supportPath error:nil];
NSMutableArray *orphanFiles = [@[] mutableCopy];
NSFileManager *fm = [NSFileManager defaultManager];
for (NSString *path in subpaths)
{
if ([XCCCappuccinoProject isHeaderFile:path] && ![path.lastPathComponent isEqualToString:@"xcc_general_include.h"])
{
NSString *sourcePath = [self.cappuccinoProject sourcePathForShadowPath:path];
if (![fm fileExistsAtPath:sourcePath])
[orphanFiles addObject:sourcePath];
}
@@ -291,15 +291,15 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
NSString *shadowBasePath = [self.cappuccinoProject shadowBasePathForProjectSourcePath:sourcePath];
NSString *shadowHeaderPath = [shadowBasePath stringByAppendingPathExtension:@"h"];
NSString *shadowImplementationPath = [shadowBasePath stringByAppendingPathExtension:@"m"];
[fm removeItemAtPath:shadowHeaderPath error:nil];
[fm removeItemAtPath:shadowImplementationPath error:nil];
[self removeOperationErrorsRelatedToSourcePath:sourcePath errorType:XCCDefaultOperationErrorType];
[pathsToRemove addObject:sourcePath];
}
[self.mainXcodeCappController.errorsViewController reload];
if (self->pendingPBXOperation)
@@ -329,14 +329,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (void)_updateXcodeSupportFilesWithRenamedDirectories:(NSArray *)directories
{
NSLog(@"Renamed directories: %@", directories);
NSFileManager *fm = [NSFileManager defaultManager];
for (NSString *directory in directories)
{
if ([directory isEqualToString:self.cappuccinoProject.projectPath])
continue;
if ([fm fileExistsAtPath:directory])
{
if ([directory hasPrefix:self.cappuccinoProject.projectPath])
@@ -549,7 +549,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
if (![self _doesNotificationBelongToCurrentProject:note])
return;
[self operationDidEnd:note.object type:note.name userInfo:note.userInfo];
}
@@ -560,17 +560,17 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
if (!operationError.fileName)
operationError.fileName = @"/No Filename";
[self willChangeValueForKey:@"errors"];
if (!self.errors[operationError.fileName])
self.errors[operationError.fileName] = [@[] mutableCopy];
[self.errors[operationError.fileName] addObject:operationError];
[self didChangeValueForKey:@"errors"];
self.numberOfErrors++;
[self _notifyUserWithOperationError:operationError];
}
@@ -578,14 +578,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
if (!operationError.fileName)
operationError.fileName = @"/No Filename";
[self willChangeValueForKey:@"errors"];
[self.errors[operationError.fileName] removeObject:operationError];
if (![self.errors[operationError.fileName] count])
[self.errors removeObjectForKey:operationError.fileName];
[self didChangeValueForKey:@"errors"];
self.numberOfErrors--;
}
@@ -601,11 +601,11 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (void)removeOperationErrorsRelatedToSourcePath:(NSString *)aPath errorType:(int)anErrorType
{
NSMutableArray *errorsToRemove = [@[] mutableCopy];
for (XCCOperationError *operationError in self.errors[aPath])
if ([operationError.fileName isEqualToString:aPath] && (operationError.errorType == anErrorType || anErrorType == XCCDefaultOperationErrorType))
[errorsToRemove addObject:operationError];
for (XCCOperationError *error in errorsToRemove)
[self removeOperationError:error];
}
@@ -619,11 +619,11 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
if (numberOfErrors == _numberOfErrors)
return;
[self willChangeValueForKey:@"numberOfErrors"];
_numberOfErrors = numberOfErrors;
[self didChangeValueForKey:@"numberOfErrors"];
if (!_numberOfErrors)
self.errorsCountString = @"";
else
@@ -882,9 +882,9 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
NSMutableArray *modifiedPaths = [@[] mutableCopy];
NSMutableArray *renamedDirectories = [@[] mutableCopy];
NSFileManager *fm = [NSFileManager defaultManager];
BOOL needUpdate = NO;
for (size_t i = 0; i < paths.count; ++i)
{
FSEventStreamEventFlags flags = eventFlags[i];
@@ -896,27 +896,27 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
if (rootChanged || needRescan)
{
NSLog(@"Watched path changed: %@", path);
[self _handleProjectPathChange:path];
return;
}
BOOL isHistoryDoneSentinalEvent = (flags & kFSEventStreamEventFlagHistoryDone) != 0;
if (isHistoryDoneSentinalEvent)
{
NSLog(@"History done sentinal event");
continue;
}
BOOL isMountEvent = (flags & kFSEventStreamEventFlagMount) || (flags & kFSEventStreamEventFlagUnmount);
if (isMountEvent)
{
NSLog(@"Volume %@: %@", (flags & kFSEventStreamEventFlagMount) ? @"mounted" : @"unmounted", path);
continue;
}
BOOL inodeMetaModified = (flags & kFSEventStreamEventFlagItemInodeMetaMod) != 0;
BOOL isFile = (flags & kFSEventStreamEventFlagItemIsFile) != 0;
@@ -926,21 +926,21 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
BOOL modified = (flags & kFSEventStreamEventFlagItemModified) != 0;
BOOL created = (flags & kFSEventStreamEventFlagItemCreated) != 0;
BOOL removed = (flags & kFSEventStreamEventFlagItemRemoved) != 0;
if (isDir)
{
if (created && [path isEqualToString:self.cappuccinoProject.projectPath.stringByResolvingSymlinksInPath])
return;
if ((renamed || created || removed) &&
![XCCCappuccinoProject shouldIgnoreDirectoryNamed:path.lastPathComponent] &&
![XCCCappuccinoProject pathMatchesIgnoredPaths:path cappuccinoProjectIgnoredPathPredicates:self.cappuccinoProject.ignoredPathPredicates])
{
NSLog(@"Renamed directory: %@", path);
[renamedDirectories addObject:path];
}
continue;
}
else if ((isFile || isSymlink) &&
@@ -957,27 +957,27 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
// If a xib is deleted, delete its cib. There is no need to update when a xib is deleted,
// it is inside a folder in Xcode, which updates automatically.
if (![fm fileExistsAtPath:path])
{
NSString *cibPath = [path.stringByDeletingPathExtension stringByAppendingPathExtension:@"cib"];
if ([fm fileExistsAtPath:cibPath])
[fm removeItemAtPath:cibPath error:nil];
continue;
}
}
needUpdate = YES;
}
else if ((isFile || isSymlink) && (renamed || removed) && !(modified || created) && [XCCCappuccinoProject isCibFile:path])
{
NSLog(@"FSEvent accepted: %@ (%@)", path, [XCCFSEventLogUtils dumpFSEventFlags:flags]);
// If a cib is deleted, mark its xib as needing update so the cib is regenerated
NSString *xibPath = [path.stringByDeletingPathExtension stringByAppendingPathExtension:@"xib"];
if ([fm fileExistsAtPath:xibPath])
{
[modifiedPaths addObject:xibPath];
@@ -993,7 +993,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
[self.cappuccinoProject reloadXcodeCappIgnoreFile];
}
}
// If directories were renamed, we take the easy way out and reset the project
if (renamedDirectories.count)
[self _updateXcodeSupportFilesWithRenamedDirectories:renamedDirectories];
@@ -1015,9 +1015,9 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
NSString *app, *type;
BOOL success = [workspace getInfoForFile:filePath application:&app type:&type];
return success ? app : nil;
}
@@ -1032,14 +1032,14 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
if (!applicationIdentifier)
return;
NSFileManager *fm = [NSFileManager defaultManager];
NSWorkspace *workspace = [NSWorkspace sharedWorkspace];
NSBundle *bundle = [NSBundle bundleWithPath:applicationIdentifier];
NSString *identifier = bundle.bundleIdentifier;
NSString *executablePath = nil;
XCCLineSpecifier lineSpecifier = kLineSpecifierNone;
if ([identifier hasPrefix:@"com.sublimetext."])
{
lineSpecifier = kLineSpecifierColon;
@@ -1086,34 +1086,34 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
{
executablePath = [[bundle bundlePath] stringByAppendingPathComponent:@"Contents/Developer/usr/bin/xed"];
}
if (!executablePath || ![fm isExecutableFileAtPath:executablePath])
{
[workspace openFile:path];
return;
}
NSArray *args;
switch (lineSpecifier)
{
case kLineSpecifierNone:
args = @[path];
break;
case kLineSpecifierColon:
args = @[[NSString stringWithFormat:@"%1$@:%2$ld", path, line]];
break;
case kLineSpecifierMinusL:
args = @[@"-l", [NSString stringWithFormat:@"%ld", line], path];
break;
case kLineSpecifierPlus:
args = @[[NSString stringWithFormat:@"+%ld", line], path];
break;
}
[self->taskLauncher runTaskWithCommand:executablePath arguments:args returnType:kTaskReturnTypeNone];
}
@@ -1128,7 +1128,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
note.actionButtonTitle = @"Show";
note.otherButtonTitle = @"Close";
note.userInfo = @{@"cappuccinoProjectPath" : self.cappuccinoProject.projectPath, @"sourcePath": anOperationError.fileName};
[[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification:note];
}
@@ -1138,7 +1138,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
- (void)reinitializeProjectFromSettings
{
NSLog(@"Saving Cappuccino configuration project %@", self.cappuccinoProject.projectPath);
[self _cancelAllProjectRelatedOperations];
[self.cappuccinoProject saveSettings];
@@ -1196,26 +1196,26 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
BOOL isOpened = YES;
NSFileManager *fm = [NSFileManager defaultManager];
BOOL exists = [fm fileExistsAtPath:self.cappuccinoProject.XcodeProjectPath isDirectory:&isDirectory];
if (exists && isDirectory)
{
NSLog(@"Opening Xcode project at: %@", self.cappuccinoProject.XcodeProjectPath);
isOpened = [[NSWorkspace sharedWorkspace] openFile:self.cappuccinoProject.XcodeProjectPath];
}
if (!exists || !isDirectory || !isOpened)
{
NSString *text;
if (!isOpened)
text = @"The project exists, but failed to open.";
else
text = [NSString stringWithFormat:@"%@ %@.", self.cappuccinoProject.XcodeProjectPath, !exists ? @"does not exist" : @"is not an Xcode project"];
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
NSInteger response = NSRunAlertPanel(@"The project could not be opened.", @"%@\n\nWould you like to regenerate the project?", @"Yes", @"No", nil, text);
if (response == NSAlertFirstButtonReturn)
[self resetProject:self];
}
@@ -1231,7 +1231,7 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
NSFileManager *fm = [NSFileManager defaultManager];
NSArray *contents = [fm contentsOfDirectoryAtPath:self.cappuccinoProject.projectPath error:nil];
NSString *firstObjjFile;
for (NSString *file in contents)
{
if ([[file pathExtension] isEqualToString:@"j"])
@@ -1240,15 +1240,15 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
break;
}
}
if (!firstObjjFile)
return;
NSString *applicationIdentifier = [self _managingApplicationIdenfierForFilePath:[self.cappuccinoProject.projectPath stringByAppendingPathComponent:firstObjjFile]];
if (!applicationIdentifier)
return;
[self launchEditorForPath:self.cappuccinoProject.projectPath line:0 applicationIdentifier:applicationIdentifier];
}
@@ -1268,5 +1268,3 @@ void fsevents_callback(ConstFSEventStreamRef streamRef, void *userData, size_t n
}
@end
@@ -90,10 +90,15 @@ NSString * const XCCNib2CibDidEndNotification = @"XCCNib2C
}
- (NSDictionary*)_launchTaskWithCommand:(NSString*)aCommand arguments:(NSArray*)arguments
{
return [self _launchTaskWithCommand:aCommand arguments:arguments currentDirectoryPath:nil];
}
- (NSDictionary*)_launchTaskWithCommand:(NSString*)aCommand arguments:(NSArray*)arguments currentDirectoryPath:(NSString *)aDirectory
{
NSLog(@"Running processing task: %@ on file: %@", aCommand, self.sourcePath);
self->task = [self->taskLauncher taskWithCommand:aCommand arguments:arguments];
self->task = [self->taskLauncher taskWithCommand:aCommand arguments:arguments currentDirectoryPath:aDirectory];
[self _updateOperationInformation];
@@ -125,7 +130,7 @@ NSString * const XCCNib2CibDidEndNotification = @"XCCNib2C
[self dispatchNotificationName:XCCNib2CibDidStartNotification];
NSArray *arguments = @[@"--no-colors", self.sourcePath];
NSDictionary *result = [self _launchTaskWithCommand:@"nib2cib" arguments:arguments];
NSDictionary *result = [self _launchTaskWithCommand:@"nib2cib" arguments:arguments currentDirectoryPath:self.cappuccinoProject.projectPath];
int code = [result[@"status"] intValue];
if (code != 0)
+6 -1
View File
@@ -204,7 +204,10 @@ var FILE = require("file"),
[self loadThemesFromList:themeList];
[self loadFrameworks:options.frameworks verbosity:options.verbosity];
[self loadNSClassesFromBundle:[CPBundle mainBundle]];
var mainBundle = [CPBundle mainBundle];
[mainBundle loadWithDelegate:nil];
[self loadNSClassesFromBundle:mainBundle];
var frameworkList = [];
@@ -230,6 +233,8 @@ var FILE = require("file"),
CPLog.info("Aux themes : " + themeList.slice(1).join(", "));
CPLog.info("Config file : " + (configInfo.path || ""));
CPLog.info("System Font : " + [CPFont systemFontSize] + "px " + [CPFont systemFontFace]);
CPLog.info("NSClasses : " + userNSClasses);
CPLog.info("-------------------------------------------------------------\n");
var converter = [[Converter alloc] initWithInputPath:inputPath outputPath:outputPath];