mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-15 23:21:28 +00:00
Merge branch '0.9.1' of github.com:280north/cappuccino into 0.9.1
This commit is contained in:
@@ -898,6 +898,21 @@ var CPCollectionViewMinItemSizeKey = @"CPCollectionViewMinItemSizeK
|
||||
|
||||
@implementation CPCollectionView (CPCoding)
|
||||
|
||||
- (void)awakeFromCib
|
||||
{
|
||||
[super awakeFromCib];
|
||||
|
||||
if (CGSizeEqualToSize(_minItemSize, CGSizeMakeZero()) || CGSizeEqualToSize(_maxItemSize, CGSizeMakeZero()))
|
||||
{
|
||||
var item = _itemPrototype;
|
||||
|
||||
if (CGSizeEqualToSize(_minItemSize, CGSizeMakeZero()))
|
||||
_minItemSize = [[item view] frameSize];
|
||||
else if (CGSizeEqualToSize(_maxItemSize, CGSizeMakeZero()))
|
||||
_maxItemSize = [[item view] frameSize];
|
||||
}
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super initWithCoder:aCoder];
|
||||
|
||||
+5
-1
@@ -2629,7 +2629,11 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
|
||||
_registeredDraggedTypes = [CPSet set];
|
||||
_registeredDraggedTypesArray = [];
|
||||
|
||||
_autoresizingMask = [aCoder decodeIntForKey:CPViewAutoresizingMaskKey] || CPViewNotSizable;
|
||||
// Other views (CPBox) might set an autoresizes mask on their subviews before it is actually decoded.
|
||||
// We make sure we don't override the value by checking if it was already set.
|
||||
if (_autoresizingMask === nil)
|
||||
_autoresizingMask = [aCoder decodeIntForKey:CPViewAutoresizingMaskKey] || CPViewNotSizable;
|
||||
|
||||
_autoresizesSubviews = ![aCoder containsValueForKey:CPViewAutoresizesSubviewsKey] || [aCoder decodeBoolForKey:CPViewAutoresizesSubviewsKey];
|
||||
|
||||
_hitTests = ![aCoder containsValueForKey:CPViewHitTestsKey] || [aCoder decodeObjectForKey:CPViewHitTestsKey];
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
@import "CPExpression.j"
|
||||
@import "CPFormatter.j"
|
||||
@import "CPIndexSet.j"
|
||||
@import "CPIndexPath.j"
|
||||
@import "CPInvocation.j"
|
||||
@import "CPJSONPConnection.j"
|
||||
@import "CPKeyedArchiver.j"
|
||||
|
||||
@@ -448,7 +448,8 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin
|
||||
ivar_count = 0,
|
||||
declaration = [],
|
||||
attributes,
|
||||
accessors = {};
|
||||
accessors = {},
|
||||
types = [];
|
||||
|
||||
while((token = tokens.skip_whitespace()) && token != TOKEN_CLOSE_BRACE)
|
||||
{
|
||||
@@ -457,8 +458,11 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin
|
||||
token = tokens.next();
|
||||
if (token === TOKEN_ACCESSORS)
|
||||
attributes = this.accessors(tokens);
|
||||
|
||||
else if (token !== TOKEN_OUTLET)
|
||||
throw new SyntaxError(this.error_message("*** Unexpected '@' token in ivar declaration ('@"+token+"')."));
|
||||
else
|
||||
types.push("@" + token);
|
||||
}
|
||||
else if (token == TOKEN_SEMICOLON)
|
||||
{
|
||||
@@ -469,10 +473,14 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin
|
||||
|
||||
var name = declaration[declaration.length - 1];
|
||||
|
||||
CONCAT(buffer, "new objj_ivar(\"" + name + "\")");
|
||||
if (this._flags & Preprocessor.Flags.IncludeTypeSignatures)
|
||||
CONCAT(buffer, "new objj_ivar(\"" + name + "\", \"" + types.slice(0, types.length - 1). join(" ") + "\")");
|
||||
else
|
||||
CONCAT(buffer, "new objj_ivar(\"" + name + "\")");
|
||||
|
||||
ivar_names[name] = 1;
|
||||
declaration = [];
|
||||
types = [];
|
||||
|
||||
if (attributes)
|
||||
{
|
||||
@@ -481,7 +489,10 @@ Preprocessor.prototype.implementation = function(tokens, /*StringBuffer*/ aStrin
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
declaration.push(token);
|
||||
types.push(token);
|
||||
}
|
||||
}
|
||||
|
||||
// If we have objects in our declaration, the user forgot a ';'.
|
||||
|
||||
+1
-1
@@ -2,6 +2,6 @@
|
||||
require("../common.jake");
|
||||
|
||||
// nib2cib uses fontinfo and capp uses nib2cib
|
||||
subtasks(["fontinfo", "nib2cib", "capp", "NativeHost"], ["build"/*, "clean", "clobber"*/]);
|
||||
subtasks(["fontinfo", "nib2cib", "capp", "NativeHost", "xcodecapp"], ["build"/*, "clean", "clobber"*/]);
|
||||
|
||||
subtasks(["fontinfo"], ["clean", "clobber"]);
|
||||
|
||||
@@ -1,28 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
|
||||
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1050</int>
|
||||
<string key="IBDocument.SystemVersion">9G55</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">677</string>
|
||||
<string key="IBDocument.AppKitVersion">949.43</string>
|
||||
<string key="IBDocument.HIToolboxVersion">353.00</string>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<string key="IBDocument.SystemVersion">10J869</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1306</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.35</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string key="NS.object.0">1306</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="371"/>
|
||||
<string>NSView</string>
|
||||
<string>NSMenu</string>
|
||||
<string>NSWindowTemplate</string>
|
||||
<string>NSMenuItem</string>
|
||||
<string>NSSliderCell</string>
|
||||
<string>NSTextField</string>
|
||||
<string>NSTextFieldCell</string>
|
||||
<string>NSSlider</string>
|
||||
<string>NSCustomObject</string>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilderKit</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<object class="NSArray" key="dict.sortedKeys" id="0">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@@ -79,7 +88,7 @@
|
||||
</object>
|
||||
<object class="NSMenuItem" id="609285721">
|
||||
<reference key="NSMenu" ref="110575045"/>
|
||||
<string type="base64-UTF8" key="NSTitle">UHJlZmVyZW5jZXPigKY</string>
|
||||
<string key="NSTitle">Preferences…</string>
|
||||
<string key="NSKeyEquiv">,</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -200,7 +209,7 @@
|
||||
</object>
|
||||
<object class="NSMenuItem" id="722745758">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string type="base64-UTF8" key="NSTitle">T3BlbuKApg</string>
|
||||
<string key="NSTitle">Open…</string>
|
||||
<string key="NSKeyEquiv">o</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -264,7 +273,7 @@
|
||||
</object>
|
||||
<object class="NSMenuItem" id="117038363">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string type="base64-UTF8" key="NSTitle">U2F2ZSBBc+KApg</string>
|
||||
<string key="NSTitle">Save As…</string>
|
||||
<string key="NSKeyEquiv">S</string>
|
||||
<int key="NSKeyEquivModMask">1179648</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -302,7 +311,7 @@
|
||||
</object>
|
||||
<object class="NSMenuItem" id="49223823">
|
||||
<reference key="NSMenu" ref="720053764"/>
|
||||
<string type="base64-UTF8" key="NSTitle">UHJpbnTigKY</string>
|
||||
<string key="NSTitle">Print…</string>
|
||||
<string key="NSKeyEquiv">p</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -425,7 +434,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="447796847">
|
||||
<reference key="NSMenu" ref="963351320"/>
|
||||
<string type="base64-UTF8" key="NSTitle">RmluZOKApg</string>
|
||||
<string key="NSTitle">Find…</string>
|
||||
<string key="NSKeyEquiv">f</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -490,7 +499,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMenuItem" id="679648819">
|
||||
<reference key="NSMenu" ref="769623530"/>
|
||||
<string type="base64-UTF8" key="NSTitle">U2hvdyBTcGVsbGluZ+KApg</string>
|
||||
<string key="NSTitle">Show Spelling…</string>
|
||||
<string key="NSKeyEquiv">:</string>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -1017,7 +1026,7 @@
|
||||
</object>
|
||||
<object class="NSMenuItem" id="237841660">
|
||||
<reference key="NSMenu" ref="466310130"/>
|
||||
<string type="base64-UTF8" key="NSTitle">Q3VzdG9taXplIFRvb2xiYXLigKY</string>
|
||||
<string key="NSTitle">Customize Toolbar…</string>
|
||||
<string key="NSKeyEquiv"/>
|
||||
<int key="NSKeyEquivModMask">1048576</int>
|
||||
<int key="NSMnemonicLoc">2147483647</int>
|
||||
@@ -1118,7 +1127,6 @@
|
||||
<string key="NSWindowTitle">Window</string>
|
||||
<string key="NSWindowClass">NSWindow</string>
|
||||
<nil key="NSViewClass"/>
|
||||
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
||||
<object class="NSView" key="NSWindowView" id="439893737">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
@@ -1129,21 +1137,22 @@
|
||||
<int key="NSvFlags">301</int>
|
||||
<string key="NSFrame">{{192, 143}, {96, 21}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSSliderCell" key="NSCell" id="600801425">
|
||||
<int key="NSCellFlags">-2080244224</int>
|
||||
<int key="NSCellFlags">-2079981824</int>
|
||||
<int key="NSCellFlags2">0</int>
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">1.200000e+01</double>
|
||||
<double key="NSSize">12</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="974764906"/>
|
||||
<double key="NSMaxValue">1.000000e+02</double>
|
||||
<double key="NSMinValue">0.000000e+00</double>
|
||||
<double key="NSValue">5.000000e+01</double>
|
||||
<double key="NSAltIncValue">0.000000e+00</double>
|
||||
<double key="NSMaxValue">100</double>
|
||||
<double key="NSMinValue">0.0</double>
|
||||
<double key="NSValue">50</double>
|
||||
<double key="NSAltIncValue">0.0</double>
|
||||
<int key="NSNumberOfTickMarks">0</int>
|
||||
<int key="NSTickMarkPosition">1</int>
|
||||
<bool key="NSAllowsTickMarkValuesOnly">NO</bool>
|
||||
@@ -1155,6 +1164,7 @@
|
||||
<int key="NSvFlags">301</int>
|
||||
<string key="NSFrame">{{192, 191}, {96, 22}}</string>
|
||||
<reference key="NSSuperview" ref="439893737"/>
|
||||
<reference key="NSWindow"/>
|
||||
<bool key="NSEnabled">YES</bool>
|
||||
<object class="NSTextFieldCell" key="NSCell" id="46991665">
|
||||
<int key="NSCellFlags">-1804468671</int>
|
||||
@@ -1162,7 +1172,7 @@
|
||||
<string key="NSContents"/>
|
||||
<object class="NSFont" key="NSSupport">
|
||||
<string key="NSName">LucidaGrande</string>
|
||||
<double key="NSSize">1.300000e+01</double>
|
||||
<double key="NSSize">13</double>
|
||||
<int key="NSfFlags">1044</int>
|
||||
</object>
|
||||
<reference key="NSControlView" ref="160623561"/>
|
||||
@@ -1188,11 +1198,12 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{480, 360}</string>
|
||||
<string key="NSFrame">{{7, 11}, {480, 360}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
</object>
|
||||
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
|
||||
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
|
||||
<string key="NSMaxSize">{1e+13, 1e+13}</string>
|
||||
</object>
|
||||
<object class="NSCustomObject" id="635946545">
|
||||
<string key="NSClassName">AppController</string>
|
||||
@@ -1719,28 +1730,26 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<object class="NSArray" key="object" id="1049">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="object" ref="0"/>
|
||||
<reference key="children" ref="1048"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="1021"/>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="1014"/>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">First Responder</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-3</int>
|
||||
<reference key="object" ref="1050"/>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">Application</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
@@ -1756,7 +1765,7 @@
|
||||
<reference ref="586577488"/>
|
||||
<reference ref="302598603"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">MainMenu</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
@@ -2292,7 +2301,7 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="439893737"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">372</int>
|
||||
@@ -2612,7 +2621,7 @@
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">450</int>
|
||||
<reference key="object" ref="635946545"/>
|
||||
<reference key="parent" ref="1049"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">452</int>
|
||||
@@ -2646,7 +2655,7 @@
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSMutableArray" key="dict.sortedKeys">
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.IBPluginDependency</string>
|
||||
<string>-2.IBPluginDependency</string>
|
||||
@@ -2781,10 +2790,10 @@
|
||||
<string>354.IBPluginDependency</string>
|
||||
<string>354.ImportedFromIB2</string>
|
||||
<string>371.IBEditorWindowLastContentRect</string>
|
||||
<string>371.IBPluginDependency</string>
|
||||
<string>371.IBWindowTemplateEditedContentRect</string>
|
||||
<string>371.NSWindowTemplate.visibleAtLaunch</string>
|
||||
<string>371.editorWindowContentRectSynchronizationRect</string>
|
||||
<string>371.windowTemplate.maxSize</string>
|
||||
<string>372.IBPluginDependency</string>
|
||||
<string>375.IBPluginDependency</string>
|
||||
<string>376.IBEditorWindowLastContentRect</string>
|
||||
@@ -2877,117 +2886,117 @@
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilderKit</string>
|
||||
<string>com.apple.InterfaceBuilderKit</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1" id="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<integer value="1"/>
|
||||
<string>{{596, 852}, {216, 23}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{522, 812}, {146, 23}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{436, 809}, {64, 6}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{608, 612}, {275, 83}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{187, 434}, {243, 243}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{608, 612}, {167, 43}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{608, 612}, {241, 103}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{525, 802}, {197, 73}}</string>
|
||||
<string>{{143, 285}, {478, 20}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{74, 862}</string>
|
||||
<string>{{6, 978}, {478, 20}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
@@ -2996,23 +3005,23 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{608, 612}, {215, 63}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{303, 221}, {480, 360}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{303, 221}, {480, 360}}</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{33, 99}, {480, 360}}</string>
|
||||
<string>{3.40282e+38, 3.40282e+38}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>{{437, 242}, {86, 43}}</string>
|
||||
@@ -3067,60 +3076,52 @@
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{155, 102}, {245, 183}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{23, 794}, {245, 183}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>{{145, 474}, {199, 203}}</string>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||
<reference ref="9"/>
|
||||
<integer value="1"/>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="unlocalizedProperties">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="activeLocalization"/>
|
||||
<object class="NSMutableDictionary" key="localizations">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
</object>
|
||||
<reference key="dict.sortedKeys" ref="0"/>
|
||||
<reference key="dict.values" ref="0"/>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">459</int>
|
||||
@@ -3134,15 +3135,44 @@
|
||||
<string key="NS.key.0">theWindow</string>
|
||||
<string key="NS.object.0">NSWindow</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<string key="NS.key.0">theWindow</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">theWindow</string>
|
||||
<string key="candidateClassName">NSWindow</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBUserSource</string>
|
||||
<string key="minorKey"/>
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/AppController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.LastKnownRelativeProjectPath">../adsfsdf.xcodeproj</string>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.macosx</string>
|
||||
<integer value="1050" key="NS.object.0"/>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
|
||||
<integer value="3000" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>NSMenuCheckmark</string>
|
||||
<string>NSMenuMixedState</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>{9, 8}</string>
|
||||
<string>{7, 2}</string>
|
||||
</object>
|
||||
</object>
|
||||
</data>
|
||||
</archive>
|
||||
|
||||
+55
-29
@@ -439,7 +439,7 @@ function logFormatter(aString, aLevel, aTitle)
|
||||
|
||||
function getThemeList(defaultTheme, options)
|
||||
{
|
||||
var themes = [defaultTheme || getDefaultThemeName()];
|
||||
var themes = [defaultTheme || getAppKitDefaultThemeName()];
|
||||
|
||||
if (options.extraThemes)
|
||||
for (var i = 0; i < options.extraThemes.length; ++i)
|
||||
@@ -449,23 +449,62 @@ function getThemeList(defaultTheme, options)
|
||||
return themes;
|
||||
}
|
||||
|
||||
function getDefaultThemeName()
|
||||
// Returns undefined if $CAPP_BUILD is not defined, false if path cannot be found in $CAPP_BUILD
|
||||
function findInCappBuild(path, isDirectory, callback)
|
||||
{
|
||||
var themeName = nil,
|
||||
cappBuild = SYS.env["CAPP_BUILD"];
|
||||
var cappBuild = SYS.env["CAPP_BUILD"];
|
||||
|
||||
if (cappBuild)
|
||||
if (!cappBuild)
|
||||
return undefined;
|
||||
|
||||
cappBuild = FILE.canonical(cappBuild);
|
||||
|
||||
if (FILE.isDirectory(cappBuild))
|
||||
{
|
||||
for (var i = 0; i < BuildTypes.length; ++i)
|
||||
var result = null;
|
||||
|
||||
for (var i = 0; i < BuildTypes.length && !result; ++i)
|
||||
{
|
||||
var path = FILE.join(cappBuild, BuildTypes[i], "AppKit", "Info.plist");
|
||||
var findPath = FILE.join(cappBuild, BuildTypes[i], path);
|
||||
|
||||
themeName = themeNameFromPropertyList(path);
|
||||
|
||||
if (themeName)
|
||||
break;
|
||||
if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath)))
|
||||
result = callback(findPath);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
function findInInstalledFrameworks(path, isDirectory, callback)
|
||||
{
|
||||
// NOTE: It's safe to use '/' directly in the path, we're guaranteed to be on a Mac
|
||||
var frameworks = FILE.canonical(FILE.join(SYS.prefix, "packages/cappuccino/Frameworks")),
|
||||
result = null,
|
||||
findPath = FILE.join(frameworks, "Debug", path);
|
||||
|
||||
if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath)))
|
||||
result = callback(findPath);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
findPath = FILE.join(frameworks, path);
|
||||
|
||||
if ((isDirectory && FILE.isDirectory(findPath)) || (!isDirectory && FILE.exists(findPath)))
|
||||
result = callback(findPath);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function getAppKitDefaultThemeName()
|
||||
{
|
||||
var callback = function(path) { return themeNameFromPropertyList(path); },
|
||||
themeName = findInCappBuild("AppKit/Info.plist", false, callback);
|
||||
|
||||
if (!themeName)
|
||||
themeName = findInInstalledFrameworks("AppKit/Info.plist", false, callback);
|
||||
|
||||
return themeName || DefaultTheme;
|
||||
}
|
||||
@@ -512,25 +551,12 @@ function loadTheme(themeName, themeDir)
|
||||
|
||||
if (!themeDir)
|
||||
{
|
||||
// Try in $CAPP_BUILD
|
||||
cappBuild = FILE.canonical(SYS.env["CAPP_BUILD"]);
|
||||
var returnPath = function(path) { return path; };
|
||||
|
||||
if (!cappBuild)
|
||||
fail("$CAPP_BUILD is not set, exiting.");
|
||||
themePath = findInCappBuild(blendName, true, returnPath);
|
||||
|
||||
if (!FILE.isDirectory(cappBuild))
|
||||
fail("$CAPP_BUILD does not exist: " + cappBuild)
|
||||
|
||||
for (var i = 0; i < BuildTypes.length; ++i)
|
||||
{
|
||||
var path = FILE.join(cappBuild, BuildTypes[i], blendName);
|
||||
|
||||
if (FILE.isDirectory(path))
|
||||
{
|
||||
themePath = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!themePath)
|
||||
themePath = findInInstalledFrameworks("AppKit/Resources/" + blendName, true, returnPath);
|
||||
|
||||
// Last resort, try the cwd
|
||||
if (!themePath)
|
||||
@@ -543,7 +569,7 @@ function loadTheme(themeName, themeDir)
|
||||
}
|
||||
|
||||
if (!themePath)
|
||||
fail("Cannot find the theme \"" + themeName + "\"");
|
||||
fail('Cannot find the theme "' + themeName + '"');
|
||||
|
||||
return readTheme(themeName, themePath);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
require ("../../common.jake");
|
||||
|
||||
var app = require("objective-j/jake").app,
|
||||
BundleTask = require("objective-j/jake").BundleTask,
|
||||
FILE = require("file"),
|
||||
OS = require("os"),
|
||||
stream = require("narwhal/term").stream;
|
||||
|
||||
app ("xcodecapp", function(xcodecappTask)
|
||||
{
|
||||
xcodecappTask.setBuildIntermediatesPath(FILE.join($BUILD_DIR, "xcodecapp.build", $CONFIGURATION))
|
||||
xcodecappTask.setBuildPath($BUILD_CJS_CAPPUCCINO_LIB);
|
||||
|
||||
xcodecappTask.setSummary("xCode 4 Integration for Cappuccino projects");
|
||||
xcodecappTask.setIdentifier("org.cappuccino.xcodecapp");
|
||||
xcodecappTask.setLicense(BundleTask.License.LGPL_v2_1);
|
||||
xcodecappTask.setVersion(getCappuccinoVersion());
|
||||
xcodecappTask.setSources(new FileList("*.j"));
|
||||
xcodecappTask.setResources(new FileList("Resources/*"));
|
||||
xcodecappTask.setIncludesNibsAndXibs(true);
|
||||
xcodecappTask.setEnvironments(require("objective-j/jake/environment").CommonJS);
|
||||
xcodecappTask.setFlattensSources(true);
|
||||
xcodecappTask.setSpritesResources(false);
|
||||
|
||||
if ($CONFIGURATION === "Release")
|
||||
xcodecappTask.setCompilerFlags("-O");
|
||||
else
|
||||
xcodecappTask.setCompilerFlags("-DDEBUG -g");
|
||||
});
|
||||
|
||||
$BUILD_CJS_XCODECAPP = FILE.join($BUILD_CJS_CAPPUCCINO_BIN, "xcodecapp");
|
||||
|
||||
// executable in environment directory
|
||||
filedir($BUILD_CJS_XCODECAPP, ["xcodecapp"], function()
|
||||
{
|
||||
make_objj_executable($BUILD_CJS_XCODECAPP);
|
||||
});
|
||||
|
||||
task ("build", ["xcodecapp", $BUILD_CJS_XCODECAPP]);
|
||||
|
||||
CLOBBER.include($BUILD_CJS_CAPPUCCINO_BIN);
|
||||
@@ -0,0 +1,464 @@
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
var FILE = require("file");
|
||||
|
||||
function main(args)
|
||||
{
|
||||
var fileURL = new CFURL(args[1]),
|
||||
outputURL = new CFURL(args[2]),
|
||||
source = FILE.read(fileURL, { charset: "UTF-8" }),
|
||||
flags = ObjectiveJ.Preprocessor.Flags.IncludeDebugSymbols |
|
||||
ObjectiveJ.Preprocessor.Flags.IncludeTypeSignatures,
|
||||
superClasses = { };
|
||||
|
||||
source = ObjectiveJ.preprocess(source, fileURL, flags).code();
|
||||
|
||||
source = source.replace(/objj_allocateClassPair\([a-zA-Z_$](\w|$)*/g, function(aString)
|
||||
{
|
||||
var superClassName = aString.substr("objj_allocateClassPair(".length);
|
||||
|
||||
return "objj_allocateClassPair(\"" + superClassName + "\", CPObject";
|
||||
});
|
||||
|
||||
var allocateClassPair = objj_allocateClassPair;
|
||||
|
||||
objj_allocateClassPair = function(superClassName)
|
||||
{
|
||||
superClasses[arguments[2]] = superClassName;
|
||||
return allocateClassPair(arguments[1], arguments[2]);
|
||||
}
|
||||
|
||||
var classes = [],
|
||||
registerClassPair = objj_registerClassPair;
|
||||
|
||||
objj_registerClassPair = function(aClass)
|
||||
{
|
||||
aClass.actual_super_class;
|
||||
registerClassPair(aClass);
|
||||
classes.push(aClass);
|
||||
}
|
||||
|
||||
objj_executeFile = function()
|
||||
{
|
||||
}
|
||||
|
||||
eval(source);
|
||||
|
||||
var ObjectiveCSource = "";
|
||||
|
||||
classes.forEach(function(aClass)
|
||||
{
|
||||
var outlets = [];
|
||||
|
||||
class_copyIvarList(aClass).forEach(function(anIvar)
|
||||
{
|
||||
var types = ivar_getTypeEncoding(anIvar).split(" ");
|
||||
|
||||
if (types.indexOf("IBOutlet") !== CPNotFound || types.indexOf("@outlet") !== CPNotFound)
|
||||
{
|
||||
types.forEach(function(aType, anIndex)
|
||||
{
|
||||
if (aType === "@outlet")
|
||||
types[anIndex] = "IBOutlet";
|
||||
|
||||
else if (aType !== "IBOutlet")
|
||||
types[anIndex] = NSCompatibleClassName(aType, YES);
|
||||
});
|
||||
|
||||
outlets.push(" " + types.join(" ") + " " + ivar_getName(anIvar) + ";");
|
||||
}
|
||||
});
|
||||
|
||||
var actions = [];
|
||||
|
||||
class_copyMethodList(aClass).forEach(function(aMethod)
|
||||
{
|
||||
var types = aMethod.types,
|
||||
type = types[0];
|
||||
|
||||
if (type === "IBAction" || type === "@action")
|
||||
actions.push("- (IBAction)" + method_getName(aMethod) + "(" + NSCompatibleClassName(types[1] || "id", YES)+ ")aSender;");
|
||||
});
|
||||
|
||||
var className = class_getName(aClass),
|
||||
superClassName = superClasses[className];
|
||||
|
||||
ObjectiveCSource +=
|
||||
"\n@interface " + class_getName(aClass) +
|
||||
(superClassName === "Nil" ? "" : (" : " + NSCompatibleClassName(superClassName))) +
|
||||
"\n{\n" +
|
||||
outlets.join("\n") +
|
||||
"\n}\n" +
|
||||
actions.join("\n") +
|
||||
"\n@end";
|
||||
});
|
||||
|
||||
if (ObjectiveCSource.length)
|
||||
FILE.write(outputURL, ObjectiveCSource, { charset:"UTF-8" });
|
||||
}
|
||||
|
||||
function NSCompatibleClassName(aClassName, asPointer)
|
||||
{
|
||||
if (aClassName === "var" || aClassName === "id")
|
||||
return "id";
|
||||
|
||||
var suffix = aClassName.substr(0, 2),
|
||||
asterisk = asPointer ? "*" : "";
|
||||
|
||||
if (suffix !== "CP")
|
||||
return aClassName + asterisk;
|
||||
|
||||
var NSClassName = "NS" + aClassName.substr(2);
|
||||
|
||||
if (NSClasses[NSClassName])
|
||||
return NSClassName + asterisk;
|
||||
|
||||
return aClassName + asterisk;
|
||||
}
|
||||
|
||||
var NSClasses = {
|
||||
"NSAffineTransform" : YES,
|
||||
"NSAppleEventDescriptor" : YES,
|
||||
"NSAppleEventManager" : YES,
|
||||
"NSAppleScript" : YES,
|
||||
"NSArchiver" : YES,
|
||||
"NSArray" : YES,
|
||||
"NSAssertionHandler" : YES,
|
||||
"NSAttributedString" : YES,
|
||||
"NSAutoreleasePool" : YES,
|
||||
"NSBlockOperation" : YES,
|
||||
"NSBundle" : YES,
|
||||
"NSCache" : YES,
|
||||
"NSCachedURLResponse" : YES,
|
||||
"NSCalendar" : YES,
|
||||
"NSCharacterSet" : YES,
|
||||
"NSClassDescription" : YES,
|
||||
"NSCloneCommand" : YES,
|
||||
"NSCloseCommand" : YES,
|
||||
"NSCoder" : YES,
|
||||
"NSComparisonPredicate" : YES,
|
||||
"NSCompoundPredicate" : YES,
|
||||
"NSCondition" : YES,
|
||||
"NSConditionLock" : YES,
|
||||
"NSConnection" : YES,
|
||||
"NSCountCommand" : YES,
|
||||
"NSCountedSet" : YES,
|
||||
"NSCreateCommand" : YES,
|
||||
"NSData" : YES,
|
||||
"NSDate" : YES,
|
||||
"NSDateComponents" : YES,
|
||||
"NSDateFormatter" : YES,
|
||||
"NSDecimalNumber" : YES,
|
||||
"NSDecimalNumberHandler" : YES,
|
||||
"NSDeleteCommand" : YES,
|
||||
"NSDeserializer" : YES,
|
||||
"NSDictionary" : YES,
|
||||
"NSDirectoryEnumerator" : YES,
|
||||
"NSDistantObject" : YES,
|
||||
"NSDistantObjectRequest" : YES,
|
||||
"NSDistributedLock" : YES,
|
||||
"NSDistributedNotificationCenter" : YES,
|
||||
"NSEnumerator" : YES,
|
||||
"NSError" : YES,
|
||||
"NSException" : YES,
|
||||
"NSExistsCommand" : YES,
|
||||
"NSExpression" : YES,
|
||||
"NSFileHandle" : YES,
|
||||
"NSFileManager" : YES,
|
||||
"NSFileWrapper" : YES,
|
||||
"NSFormatter" : YES,
|
||||
"NSGarbageCollector" : YES,
|
||||
"NSGetCommand" : YES,
|
||||
"NSHashTable" : YES,
|
||||
"NSHost" : YES,
|
||||
"NSHTTPCookie" : YES,
|
||||
"NSHTTPCookieStorage" : YES,
|
||||
"NSHTTPURLResponse" : YES,
|
||||
"NSIndexPath" : YES,
|
||||
"NSIndexSet" : YES,
|
||||
"NSIndexSpecifier" : YES,
|
||||
"NSInputStream" : YES,
|
||||
"NSInvocation" : YES,
|
||||
"NSInvocationOperation" : YES,
|
||||
"NSKeyedArchiver" : YES,
|
||||
"NSKeyedUnarchiver" : YES,
|
||||
"NSLocale" : YES,
|
||||
"NSLock" : YES,
|
||||
"NSLogicalTest" : YES,
|
||||
"NSMachBootstrapServer" : YES,
|
||||
"NSMachPort" : YES,
|
||||
"NSMapTable" : YES,
|
||||
"NSMessagePort" : YES,
|
||||
"NSMessagePortNameServer" : YES,
|
||||
"NSMetadataItem" : YES,
|
||||
"NSMetadataQuery" : YES,
|
||||
"NSMetadataQueryAttributeValueTuple" : YES,
|
||||
"NSMetadataQueryResultGroup" : YES,
|
||||
"NSMethodSignature" : YES,
|
||||
"NSMiddleSpecifier" : YES,
|
||||
"NSMoveCommand" : YES,
|
||||
"NSMutableArray" : YES,
|
||||
"NSMutableAttributedString" : YES,
|
||||
"NSMutableCharacterSet" : YES,
|
||||
"NSMutableData" : YES,
|
||||
"NSMutableDictionary" : YES,
|
||||
"NSMutableIndexSet" : YES,
|
||||
"NSMutableSet" : YES,
|
||||
"NSMutableString" : YES,
|
||||
"NSMutableURLRequest" : YES,
|
||||
"NSNameSpecifier" : YES,
|
||||
"NSNetService" : YES,
|
||||
"NSNetServiceBrowser" : YES,
|
||||
"NSNotification" : YES,
|
||||
"NSNotificationCenter" : YES,
|
||||
"NSNotificationQueue" : YES,
|
||||
"NSNull" : YES,
|
||||
"NSNumber" : YES,
|
||||
"NSNumberFormatter" : YES,
|
||||
"NSObject" : YES,
|
||||
"NSOperation" : YES,
|
||||
"NSOperationQueue" : YES,
|
||||
"NSOrthography" : YES,
|
||||
"NSOutputStream" : YES,
|
||||
"NSPipe" : YES,
|
||||
"NSPointerArray" : YES,
|
||||
"NSPointerFunctions" : YES,
|
||||
"NSPort" : YES,
|
||||
"NSPortCoder" : YES,
|
||||
"NSPortMessage" : YES,
|
||||
"NSPortNameServer" : YES,
|
||||
"NSPositionalSpecifier" : YES,
|
||||
"NSPredicate" : YES,
|
||||
"NSProcessInfo" : YES,
|
||||
"NSPropertyListSerialization" : YES,
|
||||
"NSPropertySpecifier" : YES,
|
||||
"NSProtocolChecker" : YES,
|
||||
"NSProxy" : YES,
|
||||
"NSPurgeableData" : YES,
|
||||
"NSQuitCommand" : YES,
|
||||
"NSRandomSpecifier" : YES,
|
||||
"NSRangeSpecifier" : YES,
|
||||
"NSRecursiveLock" : YES,
|
||||
"NSRelativeSpecifier" : YES,
|
||||
"NSRunLoop" : YES,
|
||||
"NSScanner" : YES,
|
||||
"NSScriptClassDescription" : YES,
|
||||
"NSScriptCoercionHandler" : YES,
|
||||
"NSScriptCommand" : YES,
|
||||
"NSScriptCommandDescription" : YES,
|
||||
"NSScriptExecutionContext" : YES,
|
||||
"NSScriptObjectSpecifier" : YES,
|
||||
"NSScriptSuiteRegistry" : YES,
|
||||
"NSScriptWhoseTest" : YES,
|
||||
"NSSerializer" : YES,
|
||||
"NSSet" : YES,
|
||||
"NSSetCommand" : YES,
|
||||
"NSSocketPort" : YES,
|
||||
"NSSocketPortNameServer" : YES,
|
||||
"NSSortDescriptor" : YES,
|
||||
"NSSpecifierTest" : YES,
|
||||
"NSSpellServer" : YES,
|
||||
"NSStream" : YES,
|
||||
"NSString" : YES,
|
||||
"NSTask" : YES,
|
||||
"NSTextCheckingResult" : YES,
|
||||
"NSThread" : YES,
|
||||
"NSTimer" : YES,
|
||||
"NSTimeZone" : YES,
|
||||
"NSUnarchiver" : YES,
|
||||
"NSUndoManager" : YES,
|
||||
"NSUniqueIDSpecifier" : YES,
|
||||
"NSURL" : YES,
|
||||
"NSURLAuthenticationChallenge" : YES,
|
||||
"NSURLCache" : YES,
|
||||
"NSURLConnection" : YES,
|
||||
"NSURLCredential" : YES,
|
||||
"NSURLCredentialStorage" : YES,
|
||||
"NSURLDownload" : YES,
|
||||
"NSURLHandle" : YES,
|
||||
"NSURLProtectionSpace" : YES,
|
||||
"NSURLProtocol" : YES,
|
||||
"NSURLRequest" : YES,
|
||||
"NSURLResponse" : YES,
|
||||
"NSUserDefaults" : YES,
|
||||
"NSValue" : YES,
|
||||
"NSValueTransformer" : YES,
|
||||
"NSWhoseSpecifier" : YES,
|
||||
"NSXMLDocument" : YES,
|
||||
"NSXMLDTD" : YES,
|
||||
"NSXMLDTDNode" : YES,
|
||||
"NSXMLElement" : YES,
|
||||
"NSXMLNode" : YES,
|
||||
"NSXMLParser" : YES,
|
||||
"NSActionCell" : YES,
|
||||
"NSAffineTransform Additions" : YES,
|
||||
"NSAlert" : YES,
|
||||
"NSAnimation" : YES,
|
||||
"NSAnimationContext" : YES,
|
||||
"NSAppleScript Additions" : YES,
|
||||
"NSApplication" : YES,
|
||||
"NSArrayController" : YES,
|
||||
"NSATSTypesetter" : YES,
|
||||
"NSAttributedString Application Kit Additions" : YES,
|
||||
"NSBezierPath" : YES,
|
||||
"NSBitmapImageRep" : YES,
|
||||
"NSBox" : YES,
|
||||
"NSBrowser" : YES,
|
||||
"NSBrowserCell" : YES,
|
||||
"NSBundle Additions" : YES,
|
||||
"NSButton" : YES,
|
||||
"NSButtonCell" : YES,
|
||||
"NSCachedImageRep" : YES,
|
||||
"NSCell" : YES,
|
||||
"NSCIImageRep" : YES,
|
||||
"NSClipView" : YES,
|
||||
"NSCoder Application Kit Additions" : YES,
|
||||
"NSCollectionView" : YES,
|
||||
"NSCollectionViewItem" : YES,
|
||||
"NSColor" : YES,
|
||||
"NSColorList" : YES,
|
||||
"NSColorPanel" : YES,
|
||||
"NSColorPicker" : YES,
|
||||
"NSColorSpace" : YES,
|
||||
"NSColorWell" : YES,
|
||||
"NSComboBox" : YES,
|
||||
"NSComboBoxCell" : YES,
|
||||
"NSControl" : YES,
|
||||
"NSController" : YES,
|
||||
"NSCursor" : YES,
|
||||
"NSCustomImageRep" : YES,
|
||||
"NSDatePicker" : YES,
|
||||
"NSDatePickerCell" : YES,
|
||||
"NSDictionaryController" : YES,
|
||||
"NSDockTile" : YES,
|
||||
"NSDocument" : YES,
|
||||
"NSDocumentController" : YES,
|
||||
"NSDrawer" : YES,
|
||||
"NSEPSImageRep" : YES,
|
||||
"NSEvent" : YES,
|
||||
"NSFileWrapper" : YES,
|
||||
"NSFont" : YES,
|
||||
"NSFontDescriptor" : YES,
|
||||
"NSFontManager" : YES,
|
||||
"NSFontPanel" : YES,
|
||||
"NSForm" : YES,
|
||||
"NSFormCell" : YES,
|
||||
"NSGlyphGenerator" : YES,
|
||||
"NSGlyphInfo" : YES,
|
||||
"NSGradient" : YES,
|
||||
"NSGraphicsContext" : YES,
|
||||
"NSHelpManager" : YES,
|
||||
"NSImage" : YES,
|
||||
"NSImageCell" : YES,
|
||||
"NSImageRep" : YES,
|
||||
"NSImageView" : YES,
|
||||
"NSLayoutManager" : YES,
|
||||
"NSLevelIndicator" : YES,
|
||||
"NSLevelIndicatorCell" : YES,
|
||||
"NSMatrix" : YES,
|
||||
"NSMenu" : YES,
|
||||
"NSMenuItem" : YES,
|
||||
"NSMenuItemCell" : YES,
|
||||
"NSMenuView" : YES,
|
||||
"NSMutableAttributedString Additions" : YES,
|
||||
"NSMutableParagraphStyle" : YES,
|
||||
"NSNib" : YES,
|
||||
"NSNibConnector" : YES,
|
||||
"NSNibControlConnector" : YES,
|
||||
"NSNibOutletConnector" : YES,
|
||||
"NSObjectController" : YES,
|
||||
"NSOpenGLContext" : YES,
|
||||
"NSOpenGLLayer" : YES,
|
||||
"NSOpenGLPixelBuffer" : YES,
|
||||
"NSOpenGLPixelFormat" : YES,
|
||||
"NSOpenGLView" : YES,
|
||||
"NSOpenPanel" : YES,
|
||||
"NSOutlineView" : YES,
|
||||
"NSPageLayout" : YES,
|
||||
"NSPanel" : YES,
|
||||
"NSParagraphStyle" : YES,
|
||||
"NSPasteboard" : YES,
|
||||
"NSPasteboardItem" : YES,
|
||||
"NSPathCell" : YES,
|
||||
"NSPathComponentCell" : YES,
|
||||
"NSPathControl" : YES,
|
||||
"NSPDFImageRep" : YES,
|
||||
"NSPersistentDocument" : YES,
|
||||
"NSPICTImageRep" : YES,
|
||||
"NSPopUpButton" : YES,
|
||||
"NSPopUpButtonCell" : YES,
|
||||
"NSPredicateEditor" : YES,
|
||||
"NSPredicateEditorRowTemplate" : YES,
|
||||
"NSPrinter" : YES,
|
||||
"NSPrintInfo" : YES,
|
||||
"NSPrintOperation" : YES,
|
||||
"NSPrintPanel" : YES,
|
||||
"NSProgressIndicator" : YES,
|
||||
"NSResponder" : YES,
|
||||
"NSRuleEditor" : YES,
|
||||
"NSRulerMarker" : YES,
|
||||
"NSRulerView" : YES,
|
||||
"NSRunningApplication" : YES,
|
||||
"NSSavePanel" : YES,
|
||||
"NSScreen" : YES,
|
||||
"NSScroller" : YES,
|
||||
"NSScrollView" : YES,
|
||||
"NSSearchField" : YES,
|
||||
"NSSearchFieldCell" : YES,
|
||||
"NSSecureTextField" : YES,
|
||||
"NSSecureTextFieldCell" : YES,
|
||||
"NSSegmentedCell" : YES,
|
||||
"NSSegmentedControl" : YES,
|
||||
"NSShadow" : YES,
|
||||
"NSSlider" : YES,
|
||||
"NSSliderCell" : YES,
|
||||
"NSSound" : YES,
|
||||
"NSSpeechRecognizer" : YES,
|
||||
"NSSpeechSynthesizer" : YES,
|
||||
"NSSpellChecker" : YES,
|
||||
"NSSplitView" : YES,
|
||||
"NSStatusBar" : YES,
|
||||
"NSStatusItem" : YES,
|
||||
"NSStepper" : YES,
|
||||
"NSStepperCell" : YES,
|
||||
"NSString Application Kit Additions" : YES,
|
||||
"NSTableColumn" : YES,
|
||||
"NSTableHeaderCell" : YES,
|
||||
"NSTableHeaderView" : YES,
|
||||
"NSTableView" : YES,
|
||||
"NSTabView" : YES,
|
||||
"NSTabViewItem" : YES,
|
||||
"NSText" : YES,
|
||||
"NSTextAttachment" : YES,
|
||||
"NSTextAttachmentCell" : YES,
|
||||
"NSTextBlock" : YES,
|
||||
"NSTextContainer" : YES,
|
||||
"NSTextField" : YES,
|
||||
"NSTextFieldCell" : YES,
|
||||
"NSTextInputContext" : YES,
|
||||
"NSTextList" : YES,
|
||||
"NSTextStorage" : YES,
|
||||
"NSTextTab" : YES,
|
||||
"NSTextTable" : YES,
|
||||
"NSTextTableBlock" : YES,
|
||||
"NSTextView" : YES,
|
||||
"NSTokenField" : YES,
|
||||
"NSTokenFieldCell" : YES,
|
||||
"NSToolbar" : YES,
|
||||
"NSToolbarItem" : YES,
|
||||
"NSToolbarItemGroup" : YES,
|
||||
"NSTouch" : YES,
|
||||
"NSTrackingArea" : YES,
|
||||
"NSTreeController" : YES,
|
||||
"NSTreeNode" : YES,
|
||||
"NSTypesetter" : YES,
|
||||
"NSURL Additions" : YES,
|
||||
"NSUserDefaultsController" : YES,
|
||||
"NSView" : YES,
|
||||
"NSViewAnimation" : YES,
|
||||
"NSViewController" : YES,
|
||||
"NSWindow" : YES,
|
||||
"NSWindowController" : YES,
|
||||
"NSWorkspace" : YES
|
||||
};
|
||||
@@ -0,0 +1,354 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
9EEC4498135749D200615446 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EEC4497135749D200615446 /* Cocoa.framework */; };
|
||||
9EEC44B5135749D300615446 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9EEC4497135749D200615446 /* Cocoa.framework */; };
|
||||
9EEC44CC13574A0B00615446 /* ${CappuccinoProjectName} in Resources */ = {isa = PBXBuildFile; fileRef = 9EEC44CB13574A0B00615446 /* ${CappuccinoProjectName} */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
9EEC44B6135749D300615446 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 9EEC448A135749D200615446 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 9EEC4492135749D200615446;
|
||||
remoteInfo = Another;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
9EEC4493135749D200615446 /* Another.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Another.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9EEC4497135749D200615446 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
9EEC449A135749D300615446 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
9EEC449B135749D300615446 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
9EEC449C135749D300615446 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
9EEC44B4135749D300615446 /* AnotherTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnotherTests.octest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9EEC44CB13574A0B00615446 /* ${CappuccinoProjectName} */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ${CappuccinoProjectName}; path = ${CappuccinoProjectRelativePath}; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
9EEC4490135749D200615446 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9EEC4498135749D200615446 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
9EEC44B0135749D300615446 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9EEC44B5135749D300615446 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9EEC4488135749D200615446 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EEC44CB13574A0B00615446 /* ${CappuccinoProjectName} */,
|
||||
9EEC4496135749D200615446 /* Frameworks */,
|
||||
9EEC4494135749D200615446 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9EEC4494135749D200615446 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EEC4493135749D200615446 /* Another.app */,
|
||||
9EEC44B4135749D300615446 /* AnotherTests.octest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9EEC4496135749D200615446 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EEC4497135749D200615446 /* Cocoa.framework */,
|
||||
9EEC4499135749D300615446 /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9EEC4499135749D300615446 /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9EEC449A135749D300615446 /* AppKit.framework */,
|
||||
9EEC449B135749D300615446 /* CoreData.framework */,
|
||||
9EEC449C135749D300615446 /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
9EEC4492135749D200615446 /* Another */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 9EEC44C5135749D300615446 /* Build configuration list for PBXNativeTarget "Another" */;
|
||||
buildPhases = (
|
||||
9EEC448F135749D200615446 /* Sources */,
|
||||
9EEC4490135749D200615446 /* Frameworks */,
|
||||
9EEC4491135749D200615446 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Another;
|
||||
productName = Another;
|
||||
productReference = 9EEC4493135749D200615446 /* Another.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
9EEC44B3135749D300615446 /* AnotherTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 9EEC44C8135749D300615446 /* Build configuration list for PBXNativeTarget "AnotherTests" */;
|
||||
buildPhases = (
|
||||
9EEC44AF135749D300615446 /* Sources */,
|
||||
9EEC44B0135749D300615446 /* Frameworks */,
|
||||
9EEC44B1135749D300615446 /* Resources */,
|
||||
9EEC44B2135749D300615446 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
9EEC44B7135749D300615446 /* PBXTargetDependency */,
|
||||
);
|
||||
name = AnotherTests;
|
||||
productName = AnotherTests;
|
||||
productReference = 9EEC44B4135749D300615446 /* AnotherTests.octest */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
9EEC448A135749D200615446 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
ORGANIZATIONNAME = "280 North, Inc.";
|
||||
};
|
||||
buildConfigurationList = 9EEC448D135749D200615446 /* Build configuration list for PBXProject "Another" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 9EEC4488135749D200615446;
|
||||
productRefGroup = 9EEC4494135749D200615446 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
9EEC4492135749D200615446 /* Another */,
|
||||
9EEC44B3135749D300615446 /* AnotherTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
9EEC4491135749D200615446 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9EEC44CC13574A0B00615446 /* ${CappuccinoProjectName} in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
9EEC44B1135749D300615446 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
9EEC44B2135749D300615446 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
9EEC448F135749D200615446 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
9EEC44AF135749D300615446 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
9EEC44B7135749D300615446 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 9EEC4492135749D200615446 /* Another */;
|
||||
targetProxy = 9EEC44B6135749D300615446 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
9EEC44C3135749D300615446 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9EEC44C4135749D300615446 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.6;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
9EEC44C6135749D300615446 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "Another/Another-Prefix.pch";
|
||||
INFOPLIST_FILE = "Another/Another-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9EEC44C7135749D300615446 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "Another/Another-Prefix.pch";
|
||||
INFOPLIST_FILE = "Another/Another-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
9EEC44C9135749D300615446 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Another.app/Contents/MacOS/Another";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "AnotherTests/AnotherTests-Prefix.pch";
|
||||
INFOPLIST_FILE = "AnotherTests/AnotherTests-Info.plist";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
SenTestingKit,
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
9EEC44CA135749D300615446 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Another.app/Contents/MacOS/Another";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "AnotherTests/AnotherTests-Prefix.pch";
|
||||
INFOPLIST_FILE = "AnotherTests/AnotherTests-Info.plist";
|
||||
OTHER_LDFLAGS = (
|
||||
"-framework",
|
||||
SenTestingKit,
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
TEST_HOST = "$(BUNDLE_LOADER)";
|
||||
WRAPPER_EXTENSION = octest;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
9EEC448D135749D200615446 /* Build configuration list for PBXProject "Another" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
9EEC44C3135749D300615446 /* Debug */,
|
||||
9EEC44C4135749D300615446 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
9EEC44C5135749D300615446 /* Build configuration list for PBXNativeTarget "Another" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
9EEC44C6135749D300615446 /* Debug */,
|
||||
9EEC44C7135749D300615446 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
};
|
||||
9EEC44C8135749D300615446 /* Build configuration list for PBXNativeTarget "AnotherTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
9EEC44C9135749D300615446 /* Debug */,
|
||||
9EEC44CA135749D300615446 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 9EEC448A135749D200615446 /* Project object */;
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
@import <Foundation/CPString.j>
|
||||
@import <Foundation/CPDictionary.j>
|
||||
|
||||
@import "XCResourceMonitor.j"
|
||||
|
||||
var FILE = require("file"),
|
||||
OS = require("os");
|
||||
|
||||
|
||||
@implementation XCProject : CPObject
|
||||
{
|
||||
CFURL m_URL;
|
||||
|
||||
XCResourceMonitor m_sourceResourceMonitor;
|
||||
XCResourceMonitor m_nibResourceMonitor;
|
||||
|
||||
CFURL m_xCodeProjectURL;
|
||||
CFURL m_xCodeProjectFileURL;
|
||||
CFURL m_xCodeSupportSourcesURL;
|
||||
}
|
||||
|
||||
- (id)initWithPath:(CPString)aPath
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
{
|
||||
m_URL = new CFURL(aPath);
|
||||
|
||||
[self prepare_xCodeProject];
|
||||
|
||||
m_sourceResourceMonitor = [[XCResourceCollection alloc] initWithPattern:FILE.join(m_URL, "/**/*.j")];
|
||||
m_nibResourceMonitor = [[XCResourceCollection alloc] initWithPattern:FILE.join(m_URL, "/**/*.[nx]ib")];
|
||||
|
||||
[self launch];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (CPString)projectName
|
||||
{
|
||||
return m_URL.lastPathComponent();
|
||||
}
|
||||
|
||||
- (CFURL)xCodeProjectTemplateURL
|
||||
{
|
||||
var CAPP_HOME = require("narwhal/packages").catalog["cappuccino"].directory;
|
||||
|
||||
return new CFURL(FILE.join(CAPP_HOME, "lib", "xcodecapp", "Resources", "xCodeSupport.xcodeproj"));
|
||||
}
|
||||
|
||||
- (CFURL)xCodeProjectParserURL
|
||||
{
|
||||
var CAPP_HOME = require("narwhal/packages").catalog["cappuccino"].directory;
|
||||
|
||||
return new CFURL(FILE.join(CAPP_HOME, "lib", "xcodecapp", "Resources", "FIXME_parser.j"));
|
||||
}
|
||||
|
||||
- (void)launch
|
||||
{
|
||||
OS.system("open " + m_xCodeProjectFileURL);
|
||||
}
|
||||
|
||||
- (void)prepare_xCodeProject
|
||||
{
|
||||
m_xCodeProjectURL = new CFURL(".xCodeSupport", m_URL.asDirectoryPathURL());
|
||||
|
||||
if (FILE.exists(m_xCodeProjectURL))
|
||||
FILE.rmtree(m_xCodeProjectURL);
|
||||
|
||||
FILE.mkdir(m_xCodeProjectURL);
|
||||
|
||||
var projectName = [self projectName],
|
||||
xCodeProjectTemplateURL = [self xCodeProjectTemplateURL];
|
||||
|
||||
m_xCodeProjectFileURL = new CFURL(projectName + ".xcodeproj", m_xCodeProjectURL.asDirectoryPathURL());
|
||||
|
||||
FILE.copyTree(xCodeProjectTemplateURL, m_xCodeProjectFileURL.absoluteURL());
|
||||
|
||||
var pbxprojURL = new CFURL("project.pbxproj", m_xCodeProjectFileURL.asDirectoryPathURL()),
|
||||
pbxproj = FILE.read(pbxprojURL, { charset:"UTF-8" });
|
||||
|
||||
pbxproj = pbxproj.replace(/\$\{CappuccinoProjectName\}/g, projectName);
|
||||
pbxproj = pbxproj.replace(/\$\{CappuccinoProjectRelativePath\}/g, FILE.join("..", "..", projectName));
|
||||
|
||||
FILE.write(pbxprojURL, pbxproj, { charset:"UTF-8" });
|
||||
|
||||
m_xCodeSupportSourcesURL = new CFURL("Sources", m_xCodeProjectURL.asDirectoryPathURL());
|
||||
|
||||
FILE.mkdir(m_xCodeSupportSourcesURL);
|
||||
}
|
||||
|
||||
- (void)update
|
||||
{
|
||||
[self updateSourceFiles];
|
||||
[self updateNibFiles];
|
||||
}
|
||||
|
||||
- (CPURL)shadowURLForSourceURL:(CPURL)aSourceURL
|
||||
{
|
||||
var flattenedPath = (aSourceURL + "").replace(new RegExp("\/", "g"), "_"),
|
||||
extension = FILE.extension(flattenedPath),
|
||||
basename = flattenedPath.substr(0, flattenedPath.length - extension.length) + ".h";
|
||||
|
||||
return new CFURL(basename, m_xCodeSupportSourcesURL.asDirectoryPathURL());
|
||||
}
|
||||
|
||||
- (void)updateSourceFiles
|
||||
{
|
||||
// Require the new parser for this.
|
||||
[m_sourceResourceMonitor update];
|
||||
|
||||
[m_sourceResourceMonitor addedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
print("Added " + aFilePath);
|
||||
OS.system("objj " + [self xCodeProjectParserURL] + " " + aFilePath + " " + [self shadowURLForSourceURL:aFilePath]);
|
||||
});
|
||||
|
||||
[m_sourceResourceMonitor editedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
print("Edited " + aFilePath);
|
||||
OS.system("objj " + [self xCodeProjectParserURL] + " " + aFilePath + " " + [self shadowURLForSourceURL:aFilePath]);
|
||||
});
|
||||
|
||||
[m_sourceResourceMonitor removedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
print("Removed " + aFilePath);
|
||||
FILE.remove([self shadowURLForSourceURL:aFilePath]);
|
||||
});
|
||||
}
|
||||
|
||||
- (void)updateNibFiles
|
||||
{
|
||||
[m_nibResourceMonitor update];
|
||||
|
||||
[m_nibResourceMonitor addedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
print("Added " + aFilePath);
|
||||
OS.system("nib2cib " + aFilePath);
|
||||
});
|
||||
|
||||
[m_nibResourceMonitor editedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
print("Edited " + aFilePath);
|
||||
OS.system("nib2cib " + aFilePath);
|
||||
});
|
||||
|
||||
[m_nibResourceMonitor removedFilePaths].forEach(function(aFilePath)
|
||||
{
|
||||
// delete?
|
||||
print("Removed " + aFilePath);
|
||||
// OS.system("nib2cib " + aFilePath);
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,69 @@
|
||||
|
||||
@import <Foundation/CPObject.j>
|
||||
|
||||
var FILE = require("file"),
|
||||
FileList = require("jake").FileList;
|
||||
|
||||
|
||||
@implementation XCResourceCollection : CPObject
|
||||
{
|
||||
CPString m_pattern;
|
||||
CPDictionary m_mtimesForFilePaths;
|
||||
|
||||
CPMutableArray m_addedFilePaths @accessors(readonly, getter=addedFilePaths);
|
||||
CPMutableArray m_removedFilePaths @accessors(readonly, getter=removedFilePaths);
|
||||
CPMutableArray m_editedFilePaths @accessors(readonly, getter=editedFilePaths);
|
||||
}
|
||||
|
||||
- (id)initWithPattern:(CPString)aPattern
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self)
|
||||
m_pattern = aPattern;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)update
|
||||
{
|
||||
m_addedFilePaths = [];
|
||||
m_removedFilePaths = [];
|
||||
m_editedFilePaths = [];
|
||||
|
||||
// FIXME: There must be a better way to do this.
|
||||
var subProjects = new FileList(FILE.join(FILE.dirname(FILE.dirname(m_pattern)), "*/**/Jakefile")),
|
||||
paths = new FileList(m_pattern);
|
||||
|
||||
subProjects.forEach(function(aPath)
|
||||
{
|
||||
paths.exclude(FILE.join(FILE.dirname(aPath), "**", "*"));
|
||||
});
|
||||
|
||||
var mtimesForFilePaths = [CPMutableDictionary new];
|
||||
|
||||
paths.forEach(function(aPath)
|
||||
{
|
||||
var time = [m_mtimesForFilePaths objectForKey:aPath],
|
||||
current = FILE.mtime(aPath);
|
||||
|
||||
if (time === nil)
|
||||
[m_addedFilePaths addObject:aPath];
|
||||
|
||||
else if (current > time)
|
||||
[m_editedFilePaths addObject:aPath];
|
||||
|
||||
[mtimesForFilePaths setObject:current forKey:aPath];
|
||||
});
|
||||
|
||||
var filePath = nil,
|
||||
filePaths = [m_mtimesForFilePaths keyEnumerator];
|
||||
|
||||
while (filePath = [filePaths nextObject])
|
||||
if ([mtimesForFilePaths objectForKey:filePath] === nil)
|
||||
[m_removedFilePaths addObject:filePath];
|
||||
|
||||
m_mtimesForFilePaths = mtimesForFilePaths;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
@import "XCProject.j"
|
||||
|
||||
var FILE = require("file"),
|
||||
OS = require("os");
|
||||
|
||||
var project = [[XCProject alloc] initWithPath:FILE.cwd()];
|
||||
|
||||
while (YES)
|
||||
{
|
||||
[project update];
|
||||
|
||||
OS.sleep(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user