Compare commits

..
29 Commits
Author SHA1 Message Date
Randall Luecke a80147bafd Merge branch 'master' into coretext 2011-06-25 22:03:51 -07:00
Randall Luecke fc81483371 Fix typeo in CPToolbar.j CPToolbarItems to not respect maxSize. Closes #1305. 2011-06-25 00:45:07 -07:00
Klaas Pieter Annema e552b022ba Merge branch 'pull-request-1302' 2011-06-24 12:21:02 +02:00
Antoine Mercadal 6c34bec51e do not return 0 if any conversion fail (return 2 instead) 2011-06-19 19:32:42 +02:00
Randall Luecke f170e4812d Documented CoreText. 2011-06-19 01:00:22 -07:00
Randall Luecke 070728aea9 Typo 2011-06-18 23:57:31 -07:00
Randall Luecke 5e3ae58d42 Added view drawing methods to CPAttributedString 2011-06-18 23:54:56 -07:00
Randall Luecke b4e4bdb924 Added string drawing methods for CPString. 2011-06-18 23:44:32 -07:00
Randall Luecke 0f097e0ff4 Added support for center alginment of in CTFrameDraw. 2011-06-18 22:59:28 -07:00
Randall Luecke e38845f993 Default to left alignment for frameDraw. 2011-06-18 22:54:03 -07:00
Randall Luecke f4f4dd8025 Default the text position point to (0,0) if it's undefined. 2011-06-18 21:53:50 -07:00
Randall Luecke c942259c90 Import CPAttributedString in Foundation.j now that we can actually use it! :D 2011-06-18 18:59:01 -07:00
Nicholas Small a4fb0920f6 Forgot key file of CoreText. 2011-06-16 11:49:05 -04:00
Ross Boucher cbabb544ab bootstrap should have a +x bit. 2011-06-15 12:54:11 -07:00
Nicholas Small 4d47b5abf5 CoreText.
Still needs a lot of work; there are bugs,
performance issues, and missing features.
2011-06-13 01:30:50 -07:00
Alexander Ljungberg aac09d8208 Clicking on a non-editable level indicator in a table row now selects that row. 2011-06-06 00:44:15 -04:00
Alexander Ljungberg a127fc9ec3 'Enabled' support for nib2cib of NSLevelIndicator. 2011-06-06 00:35:41 -04:00
Alexander Ljungberg 551aa300ea Merge branch 'master' of github.com:280north/cappuccino 2011-06-06 00:11:23 -04:00
Alexander Ljungberg 485e59b5eb More handlesContentAsCompoundValue, although fairly guess-work based. More research needed in the future. 2011-06-06 00:11:04 -04:00
Alexander Ljungberg fdfcbf1da2 CPArrayController handlesContentAsCompoundValue support for contentArray binding. 2011-06-05 19:39:28 -04:00
Alexander Ljungberg 0f5eee0258 nib2cib compatible CPNumberFormatter skeleton. 2011-06-05 19:27:21 -04:00
Alexander Ljungberg 870492eb96 Fix selection behaviour in previous commit. 2011-06-05 19:19:14 -04:00
Alexander Ljungberg b50005049e Fixed: array controller remove: would not only remove selected rows, but any other rows isEqual: to the selected rows. 2011-06-05 18:57:36 -04:00
Alexander Ljungberg 0e890e19ea Fixed: during CPUserDefault change notifications, objectForKey: could return the value from prior to the change. 2011-06-05 17:32:56 -04:00
Alexander Ljungberg 59aabc150c Crude but functional infinite recursion checker, optional at compile time. 2011-06-04 01:23:24 -04:00
Alexander Ljungberg b159815349 Suppress binding updates support. 2011-06-04 00:57:57 -04:00
Alexander Ljungberg bfe5afaddd Whitespace cleanup. 2011-06-03 00:05:30 -04:00
Alexander Ljungberg 64e907156c Minor array controller optimisation: don't send a filterPredicate change notification if clearsFilterPredicateOnInsertion is YES but filterPredicate is already nil when insertObject:atArrangedObjectIndex: is called. 2011-06-03 00:00:39 -04:00
Alexander Ljungberg 5d01ca428c Optimise CPArrayController insertObject:atArrangedObjectIndex: by not attempting to arrange the content array. The given index is only meant for the arrangedObjects. 2011-06-02 23:41:03 -04:00
107 changed files with 2449 additions and 6602 deletions
-1
View File
@@ -9,4 +9,3 @@ WebSite
*.xcodeproj/*.perspectivev3
xcuserdata/
!*.xcodeproj/project.pbxproj
target
-2
View File
@@ -1,2 +0,0 @@
rvm_install_on_use_flag=1
rvm jruby-head@buildr
+2 -1
View File
@@ -25,6 +25,7 @@
@import "CPAnimation.j"
@import "CPApplication.j"
@import "CPArrayController.j"
@import "CPAttributedString+Additions.j"
@import "CPBezierPath.j"
@import "CPBox.j"
@import "CPBrowser.j"
@@ -37,7 +38,6 @@
@import "CPCibControlConnector.j"
@import "CPCibLoading.j"
@import "CPCibOutletConnector.j"
@import "CPCibRuntimeAttributesConnector.j"
@import "CPClipView.j"
@import "CPCollectionView.j"
@import "CPCollectionViewItem.j"
@@ -84,6 +84,7 @@
@import "CPSound.j"
@import "CPSplitView.j"
@import "CPStepper.j"
@import "CPString+Additions.j"
@import "CPTableColumn.j"
@import "CPTableView.j"
@import "CPTabView.j"
+16 -47
View File
@@ -107,7 +107,7 @@ CPRunContinuesResponse = -1002;
CPPanel _aboutPanel;
CPArray _themeBlends @accessors(property=themeBlends);
CPThemeBlend _themeBlend @accessors(property=themeBlend);
}
/*!
@@ -141,8 +141,6 @@ CPRunContinuesResponse = -1002;
_windows = [];
[_windows addObject:nil];
_themeBlends = [];
}
return self;
@@ -340,7 +338,7 @@ CPRunContinuesResponse = -1002;
Copyright - Human readable copyright information.
</pre>
If you choose not the include any of the above keys, they will default
If you choose not the include any of the above keys, they will default
to the following respective keys in your info.plist file.
<pre>
@@ -1005,7 +1003,7 @@ CPRunContinuesResponse = -1002;
}
/*!
Sets the arguments of your application.
Sets the arguments of your application.
That is, set the slash seperated values of an array as the window location hash.
For example if you pass an array:
@@ -1158,16 +1156,6 @@ CPRunContinuesResponse = -1002;
userInfo:nil];
}
- (CPThemeBlend)themeBlend
{
return (_themeBlends.length > 0 ? _themeBlends[0] : nil);
}
- (void)setThemeBlend:(CPThemeBlend)aThemeBlend
{
_themeBlends[0] = aThemeBlend;
}
+ (CPString)defaultThemeName
{
return ([[CPBundle mainBundle] objectForInfoDictionaryKey:"CPDefaultTheme"] || @"Aristo");
@@ -1230,14 +1218,15 @@ function CPApplicationMain(args, namedArgs)
[_CPAppBootstrapper performActions];
}
var _CPAppBootstrapperActions = nil,
_CPAppThemeURLsToLoad = [];
var _CPAppBootstrapperActions = nil;
@implementation _CPAppBootstrapper : CPObject
{
}
+ (CPArray)actions
{
return [@selector(bootstrapPlatform), @selector(loadThemes), @selector(loadMainCibFile)];
return [@selector(bootstrapPlatform), @selector(loadDefaultTheme), @selector(loadMainCibFile)];
}
+ (void)performActions
@@ -1261,30 +1250,17 @@ var _CPAppBootstrapperActions = nil,
return [CPPlatform bootstrap];
}
+ (BOOL)loadThemes
+ (BOOL)loadDefaultTheme
{
_CPAppThemeURLsToLoad.push([CPApplication defaultThemeName]);
var defaultThemeName = [CPApplication defaultThemeName],
themeURL = nil;
var auxiliaryThemes = ([[CPBundle mainBundle] objectForInfoDictionaryKey:@"CPAuxiliaryThemes"] || []);
_CPAppThemeURLsToLoad = _CPAppThemeURLsToLoad.concat(auxiliaryThemes);
[self loadNextTheme];
return YES;
}
+ (BOOL)loadNextTheme
{
var themeName = _CPAppThemeURLsToLoad.shift();
if (themeName === @"Aristo")
themeURL = [[CPBundle bundleForClass:[CPApplication class]] pathForResource:themeName + @".blend"];
if (defaultThemeName === @"Aristo")
themeURL = [[CPBundle bundleForClass:[CPApplication class]] pathForResource:defaultThemeName + @".blend"];
else
themeURL = [[CPBundle mainBundle] pathForResource:themeName + @".blend"];
themeURL = [[CPBundle mainBundle] pathForResource:defaultThemeName + @".blend"];
var blend = [[CPThemeBlend alloc] initWithContentsOfURL:themeURL];
[blend loadWithDelegate:self];
return YES;
@@ -1292,17 +1268,10 @@ var _CPAppBootstrapperActions = nil,
+ (void)blendDidFinishLoading:(CPThemeBlend)aThemeBlend
{
var themeBlends = [CPApp themeBlends];
[[CPApplication sharedApplication] setThemeBlend:aThemeBlend];
[CPTheme setDefaultTheme:[CPTheme themeNamed:[CPApplication defaultThemeName]]];
[themeBlends addObject:aThemeBlend];
if ([themeBlends count] === 1)
[CPTheme setDefaultTheme:[CPTheme themeNamed:[CPApplication defaultThemeName]]];
if (_CPAppThemeURLsToLoad.length === 0)
[self performActions];
else
[self loadNextTheme];
[self performActions];
}
+ (BOOL)loadMainCibFile
+132 -22
View File
@@ -313,6 +313,8 @@
// Don't use [super setContent:] as that would fire the contentObject change.
// We need to be in control of when notifications fire.
// Note that if we have a contentArray binding, setting the content does /not/
// cause a reverse binding set.
_contentObject = value;
if (_clearsFilterPredicateOnInsertion && _filterPredicate != nil)
@@ -737,6 +739,10 @@
*/
_disableSetContent = YES;
[_contentObject addObject:object];
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
_disableSetContent = NO;
if (willClearPredicate)
@@ -771,7 +777,8 @@
}
/*!
Adds an object at a given index to the receiver's collection.
Adds an object at a given index in the receiver's arrangedObjects. Also add the object
to the content collection (although at the end rather than the given index).
@param id anObject - The object to add to the collection.
@param int anIndex - The index to insert the object at.
@@ -781,8 +788,12 @@
if (![self canAdd])
return;
if (_clearsFilterPredicateOnInsertion)
var willClearPredicate = NO;
if (_clearsFilterPredicateOnInsertion && _filterPredicate)
{
[self willChangeValueForKey:@"filterPredicate"];
willClearPredicate = YES;
}
[self willChangeValueForKey:@"content"];
@@ -790,10 +801,17 @@
See _disableSetContent explanation in addObject:.
*/
_disableSetContent = YES;
[_contentObject insertObject:anObject atIndex:anIndex];
// The atArrangedObjectIndex: part of this method's name only refers to where the
// object goes in arrangedObjects, not in the content array. So use addObject:,
// not insertObject:atIndex: here for speed.
[_contentObject addObject:anObject];
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
_disableSetContent = NO;
if (_clearsFilterPredicateOnInsertion)
if (willClearPredicate)
[self __setFilterPredicate:nil];
[[self arrangedObjects] insertObject:anObject atIndex:anIndex];
@@ -809,7 +827,7 @@
[self __setSelectionIndexes:[CPIndexSet indexSetWithIndex:0]];
[self didChangeValueForKey:@"content"];
if (_clearsFilterPredicateOnInsertion)
if (willClearPredicate)
[self didChangeValueForKey:@"filterPredicate"];
}
@@ -820,26 +838,28 @@
*/
- (void)removeObject:(id)object
{
[self willChangeValueForKey:@"content"];
[self willChangeValueForKey:@"content"];
/*
See _disableSetContent explanation in addObject:.
*/
_disableSetContent = YES;
[_contentObject removeObject:object];
_disableSetContent = NO;
// See _disableSetContent explanation in addObject:.
_disableSetContent = YES;
if (_filterPredicate === nil || [_filterPredicate evaluateWithObject:object])
{
[_contentObject removeObject:object];
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
_disableSetContent = NO;
if (_filterPredicate === nil || [_filterPredicate evaluateWithObject:object])
{
// selectionIndexes change notification will be fired as a result of the
// content change. Don't fire manually.
var pos = [_arrangedObjects indexOfObject:object];
[_arrangedObjects removeObjectAtIndex:pos];
[_selectionIndexes shiftIndexesStartingAtIndex:pos by:-1];
}
}
[self didChangeValueForKey:@"content"];
[self didChangeValueForKey:@"content"];
}
/*!
@@ -875,16 +895,61 @@
*/
- (void)remove:(id)sender
{
[self removeObjects:[[self arrangedObjects] objectsAtIndexes:[self selectionIndexes]]];
[self removeObjectsAtArrangedObjectIndexes:_selectionIndexes];
}
/*!
Removes the objects at the specified indexes in the controller's arranged objects from the content array.
@param CPIndexSet indexes - indexes of the objects to remove.
*/
- (void)removeObjectsAtArrangedObjectIndexes:(CPIndexSet)indexes
- (void)removeObjectsAtArrangedObjectIndexes:(CPIndexSet)anIndexSet
{
[self _removeObjects:[[self arrangedObjects] objectsAtIndexes:indexes]];
[self willChangeValueForKey:@"content"];
/*
See _disableSetContent explanation in addObject:.
*/
_disableSetContent = YES;
var arrangedObjects = [self arrangedObjects],
index = [anIndexSet lastIndex],
position = CPNotFound,
newSelectionIndexes = [_selectionIndexes copy];
while (index !== CPNotFound)
{
var object = [arrangedObjects objectAtIndex:index];
// First try the simple case which should work if there are no sort descriptors.
if ([_contentObject objectAtIndex:index] === object)
[_contentObject removeObjectAtIndex:index];
else
{
// Since we don't have a reverse mapping between the sorted order and the
// unsorted one, we'll just simply have to remove an arbitrary pointer. It might
// be the 'wrong' one - as in not the one the user selected - but the wrong
// one is still just another pointer to the same object, so the user will not
// be able to see any difference.
contentIndex = [_contentObject indexOfObjectIdenticalTo:object];
[_contentObject removeObjectAtIndex:contentIndex];
}
[arrangedObjects removeObjectAtIndex:index];
// Deselect this row if it was selected, and either way shift all selection indexes
// following it up by 1.
[newSelectionIndexes removeIndex:index];
[newSelectionIndexes shiftIndexesStartingAtIndex:index by:-1];
index = [anIndexSet indexLessThanIndex:index];
}
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
_disableSetContent = NO;
// This will automatically handle the avoidsEmptySelection case.
[self __setSelectionIndexes:newSelectionIndexes];
[self didChangeValueForKey:@"content"];
}
/*!
@@ -904,6 +969,8 @@
[contentArray addObject:[objects objectAtIndex:i]];
[self setContent:contentArray];
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
}
/*!
@@ -922,11 +989,13 @@
{
[self willChangeValueForKey:@"content"];
/*
See _disableSetContent explanation in addObject:.
*/
// See _disableSetContent explanation in addObject:.
_disableSetContent = YES;
[_contentObject removeObjectsInArray:objects];
// Allow handlesContentAsCompoundValue reverse sets to trigger.
[[CPBinder getBinding:@"contentArray" forObject:self] _contentArrayDidChange];
_disableSetContent = NO;
var arrangedObjects = [self arrangedObjects],
@@ -985,12 +1054,53 @@
var destination = [_info objectForKey:CPObservedObjectKey],
keyPath = [_info objectForKey:CPObservedKeyPathKey],
options = [_info objectForKey:CPOptionsKey],
isCompound = [self handlesContentAsCompoundValue];
if (!isCompound)
{
newValue = [destination mutableArrayValueForKeyPath:keyPath];
}
else
{
// handlesContentAsCompoundValue == YES so we cannot just set up a proxy.
// Every read and every write must go through transformValue and
// reverseTransformValue, and the resulting object cannot be described by
// a key path.
newValue = [destination valueForKeyPath:keyPath];
}
newValue = [self transformValue:newValue withOptions:options];
if (isCompound)
{
// Make sure we can edit our copy of the content. TODO In Cocoa, this copy
// appears to be deferred until the array actually needs to be edited.
newValue = [newValue mutableCopy];
}
[_source setValue:newValue forKey:aBinding];
}
- (void)_contentArrayDidChange
{
// When handlesContentAsCompoundValue == YES, it is not sufficient to modify the content object
// in place because what we are holding is an array 'unwrapped' from a compound value by
// a value transformer. So when we modify it we need a reverse set and transform to create
// a new compound value.
//
// (The Cocoa documentation on the subject is not very clear but after substantial
// experimentation this seems both reasonable and compliant.)
if ([self handlesContentAsCompoundValue])
{
var destination = [_info objectForKey:CPObservedObjectKey],
keyPath = [_info objectForKey:CPObservedKeyPathKey];
[self suppressSpecificNotificationFromObject:destination keyPath:keyPath];
[self reverseSetValueFor:@"contentArray"];
[self unsuppressSpecificNotificationFromObject:destination keyPath:keyPath];
}
}
@end
var CPArrayControllerAvoidsEmptySelection = @"CPArrayControllerAvoidsEmptySelection",
+62
View File
@@ -0,0 +1,62 @@
/*
* CPAttributedString+Additions.j
* AppKit
*
* Created by Randy Luecke
* Copyright 2011, RCLConcepts, LLC.
*
* 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
*/
/*
AppKit adds two methods to the CPAttributedString class to support drawing string directly in an CPView.
AppKit also adds similar methods to CPString.
*/
@implementation CPAttributedString (AppKitAdditions)
/*!
Draws a string in the current graphics context.
This method and draws the reciver on a single "infinately long" line.
@param aPoint - The starting point to draw the string
*/
- (void)drawAtPoint:(CGPoint)aPoint
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
line = CTLineCreateWithAttributedString([self copy]);
CGContextSetTextPosition(context, aPoint.x, aPoint.y);
CTLineDraw(line, context);
}
/*!
Draws a string in the current graphics context.
@param aRect - The rect for which the string should be drawn into
*/
- (void)drawInRect:(CGRect)aRect
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
frameSetter = CTFramesetterCreateWithAttributedString([self copy]),
path = CGPathCreateMutable();
CGPathAddRect(path, nil, aRect);
var frame = CTFramesetterCreateFrame(frameSetter, CPMakeRange(0, [self length]), path, nil);
CTFrameDraw(frame, context);
}
@end
+6 -99
View File
@@ -27,7 +27,6 @@
@import "CPCompatibility.j"
@import "CPImage.j"
/// @cond IGNORE
var _redComponent = 0,
_greenComponent = 1,
@@ -55,66 +54,6 @@ var cachedBlackColor,
cachedShadowColor,
cachedClearColor;
/// @endcond
/*!
Orientation to use with \c CPColorPattern for vertical patterns.
*/
CPColorPatternIsVertical = YES,
/*!
Orientation to use with \c CPColorPattern for horizontal patterns.
*/
CPColorPatternIsHorizontal = NO;
/*!
To create a simple color with a pattern image:
<code>CPColorWithImages(name, width, height{, bundle})</code>
To create a color with a three part pattern image:
<code>CPColorWithImages(slices{, orientation})</code>
where slices is an array of three [name, width, height{, bundle}] arrays,
and orientation is \c CPColorPatternIsVertical or \ref CPColorPatternIsHorizontal.
If orientatation is not passed, it defaults to \ref CPColorPatternIsHorizontal.
To create a color with a nine part pattern image:
<code>CPColorWithImages(slices);</code>
where slices is an array of nine [name, width, height{, bundle}] arrays.
*/
function CPColorWithImages()
{
if (arguments.length < 3)
{
var slices = arguments[0],
imageSlices = [];
for (var i = 0; i < slices.length; ++i)
{
var slice = slices[i];
imageSlices.push(slice ? CPImageInBundle(slice[0], CGSizeMake(slice[1], slice[2]), slice[3]) : nil);
}
if (imageSlices.length === 3)
return [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:imageSlices isVertical:arguments[1] || CPColorPatternIsHorizontal]];
else
return [CPColor colorWithPatternImage:[[CPNinePartImage alloc] initWithImageSlices:imageSlices]];
}
else if (arguments.length === 3 || arguments.length === 4)
{
return [CPColor colorWithPatternImage:CPImageInBundle(arguments[0], CGSizeMake(arguments[1], arguments[2]), arguments[3])];
}
else
{
return nil;
}
}
/*!
@ingroup appkit
@@ -694,36 +633,7 @@ url("data:image/png;base64,BASE64ENCODEDDATA") // if there is a pattern image
- (CPString)description
{
var description = [super description],
patternImage = [self patternImage];
if (!patternImage)
return description + " " + [self cssString];
description += " {\n";
if ([patternImage isThreePartImage] || [patternImage isNinePartImage])
{
var slices = [patternImage imageSlices];
if ([patternImage isThreePartImage])
description += " orientation: " + ([patternImage isVertical] ? "vertical" : "horizontal") + ",\n";
description += " patternImage (" + slices.length + " part): [\n";
for (var i = 0; i < slices.length; ++i)
{
var imgDescription = [slices[i] description];
description += imgDescription.replace(/^/mg, " ") + ",\n";
}
description = description.substr(0, description.length - 2) + "\n ]\n}";
}
else
description += [patternImage description].replace(/^/mg, " ") + "\n}";
return description;
return [super description]+" "+[self cssString];
}
@end
@@ -768,10 +678,8 @@ url("data:image/png;base64,BASE64ENCODEDDATA") // if there is a pattern image
@end
/// @cond IGNORE
var CPColorComponentsKey = @"CPColorComponentsKey",
CPColorPatternImageKey = @"CPColorPatternImageKey";
/// @endcond
@implementation CPColor (CPCoding)
@@ -802,12 +710,13 @@ var CPColorComponentsKey = @"CPColorComponentsKey",
@end
/// @cond IGNORE
var hexCharacters = "0123456789ABCDEF";
/*
Used for the CPColor +colorWithHexString: implementation.
Returns an array of rgb components.
/*!
Used for the CPColor \c +colorWithHexString: implementation
@ignore
@class CPColor
@return an array of rgb components
*/
var hexToRGB = function(hex)
{
@@ -845,5 +754,3 @@ var byteToHex = function(n)
return hexCharacters.charAt((n - n % 16) / 16) +
hexCharacters.charAt(n % 16);
};
/// @endcond
+19 -17
View File
@@ -571,28 +571,29 @@ var _CPEventPeriodicEventPeriod = 0,
if (_modifierFlags & (CPCommandKeyMask | CPControlKeyMask))
return YES;
// Cocoa does not consider space, backspace, or escape a key equivalent
// if the first responder is a text field (presumably a subclass of NSText).
var firstResponderIsText = [[_window firstResponder] isKindOfClass:[CPTextField class]];
for (var i = 0; i < characterCount; i++)
{
var c = _characters.charAt(i);
if ((c >= CPUpArrowFunctionKey && c <= CPModeSwitchFunctionKey) ||
c === CPEnterCharacter ||
c === CPNewlineCharacter ||
c === CPCarriageReturnCharacter ||
c === CPEscapeFunctionKey ||
(!firstResponderIsText &&
(c === CPSpaceFunctionKey ||
c === CPDeleteCharacter ||
c === CPBackspaceCharacter)))
switch (_characters.charAt(i))
{
return YES;
case CPBackspaceCharacter:
case CPDeleteCharacter:
case CPDeleteFunctionKey:
case CPTabCharacter:
case CPCarriageReturnCharacter:
case CPNewlineCharacter:
case CPSpaceFunctionKey:
case CPEscapeFunctionKey:
case CPPageUpFunctionKey:
case CPPageDownFunctionKey:
case CPLeftArrowFunctionKey:
case CPUpArrowFunctionKey:
case CPRightArrowFunctionKey:
case CPDownArrowFunctionKey:
case CPEndFunctionKey:
case CPHomeFunctionKey:
return YES;
}
}
// FIXME: More cases?
return NO;
}
@@ -650,3 +651,4 @@ function _CPEventFromNativeMouseEvent(aNativeEvent, anEventType, aPoint, modifie
return aNativeEvent;
}
+1 -20
View File
@@ -44,8 +44,7 @@ CPImageNameColorPanel = @"CPImageNameColorPanel";
CPImageNameColorPanelHighlighted = @"CPImageNameColorPanelHighlighted";
var imagesForNames = { },
AppKitImageForNames = { },
ImageDescriptionFormat = "%s {\n filename: \"%s\",\n size: { width:%f, height:%f }\n}";
AppKitImageForNames = { };
AppKitImageForNames[CPImageNameColorPanel] = CGSizeMake(26.0, 29.0);
AppKitImageForNames[CPImageNameColorPanelHighlighted] = CGSizeMake(26.0, 29.0);
@@ -325,24 +324,6 @@ function CPAppKitImage(aFilename, aSize)
return NO;
}
- (CPString)description
{
var filename = [self filename],
size = [self size];
if (filename.indexOf("data:") === 0)
{
var index = filename.indexOf(",");
if (index > 0)
filename = [CPString stringWithFormat:@"%s,%s...%s", filename.substr(0, index), filename.substr(index + 1, 10), filename.substr(filename.length - 10)];
else
filename = "data:<unknown type>";
}
return [CPString stringWithFormat:ImageDescriptionFormat, [super description], filename, size.width, size.height];
}
/* @ignore */
- (void)_derefFromImage
{
+45 -1
View File
@@ -39,6 +39,8 @@ var CPBindingOperationAnd = 0,
{
CPDictionary _info;
id _source;
JSObject _suppressedNotifications;
}
+ (void)exposeBinding:(CPString)aBinding forClass:(Class)aClass
@@ -122,6 +124,7 @@ var CPBindingOperationAnd = 0,
{
_source = aSource;
_info = [CPDictionary dictionaryWithObjects:[aDestination, aKeyPath] forKeys:[CPObservedObjectKey, CPObservedKeyPathKey]];
_suppressedNotifications = {};
if (options)
[_info setObject:options forKey:CPOptionsKey];
@@ -169,6 +172,10 @@ var CPBindingOperationAnd = 0,
if (!changes)
return;
var objectSuppressions = _suppressedNotifications[[anObject UID]];
if (objectSuppressions && objectSuppressions[aKeyPath])
return;
[self setValueFor:context];
}
@@ -226,6 +233,44 @@ var CPBindingOperationAnd = 0,
return [[options objectForKey:CPContinuouslyUpdatesValueBindingOption] boolValue];
}
- (BOOL)handlesContentAsCompoundValue
{
var options = [_info objectForKey:CPOptionsKey];
return [[options objectForKey:CPHandlesContentAsCompoundValueBindingOption] boolValue];
}
/*!
Use this to avoid reacting to the notifications coming out of a reverseTransformedValue:.
*/
- (void)suppressSpecificNotificationFromObject:(id)anObject keyPath:(CPString)aKeyPath
{
if (!anObject)
return;
var uid = [anObject UID],
objectSuppressions = _suppressedNotifications[uid];
if (!objectSuppressions)
_suppressedNotifications[uid] = objectSuppressions = {};
objectSuppressions[aKeyPath] = YES;
}
/*!
Use this to cancel suppressSpecificNotificationFromObject:keyPath:.
*/
- (void)unsuppressSpecificNotificationFromObject:(id)anObject keyPath:(CPString)aKeyPath
{
if (!anObject)
return;
var uid = [anObject UID],
objectSuppressions = _suppressedNotifications[uid];
if (!objectSuppressions)
return;
delete objectSuppressions[aKeyPath];
}
@end
@implementation CPObject (KeyValueBindingCreation)
@@ -235,7 +280,6 @@ var CPBindingOperationAnd = 0,
[CPBinder exposeBinding:aBinding forClass:[self class]];
}
+ (Class)_binderClassForBinding:(CPString)theBinding
{
return [CPBinder class];
+9
View File
@@ -223,6 +223,15 @@ var _CPLevelIndicatorBezelColor = nil,
return _isEditable;
}
- (CPView)hitTest:(CPPoint)aPoint
{
// Don't swallow clicks when displayed in a table.
if (![self isEditable])
return nil;
return [super hitTest:aPoint];
}
- (void)mouseDown:(CPEvent)anEvent
{
if (![self isEditable] || ![self isEnabled])
+12 -1
View File
@@ -498,7 +498,7 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
- (CPString)description
{
return "<_CPObservableArray: "+[super description]+" >";
return "<_CPObservableArray: " + [super description] + " >";
}
- (id)initWithArray:(CPArray)anArray
@@ -710,6 +710,17 @@ var CPObjectControllerContentKey = @"CPObjectControllerCo
{
[[_controller selectedObjects] setValue:theValue forKeyPath:theKeyPath];
[_cachedValues removeObjectForKey:theKeyPath];
// Allow handlesContentAsCompoundValue to work, based on observation of Cocoa's
// NSArrayController - when handlesContentAsCompoundValue and setValue:forKey:@"selection.X"
// is called, the array controller causes the compound value to be rewritten if
// handlesContentAsCompoundValue == YES. Note that
// A) this doesn't use observation (observe: X is not visible in backtraces)
// B) it only happens through the selection proxy and not on arrangedObject.X, content.X
// or even selectedObjects.X.
// FIXME The main code for this should somehow be in CPArrayController and also work
// for table based row edits.
[[CPBinder getBinding:@"contentArray" forObject:_controller] _contentArrayDidChange];
}
- (void)setValue:(id)theValue forKey:(CPString)theKeyPath
+72
View File
@@ -0,0 +1,72 @@
/*
* CPString+Additions.j
* AppKit
*
* Created by Randy Luecke
* Copyright 2011, RCLConcepts, LLC.
*
* 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
*/
/*
AppKit adds two methods to the CPString class to support drawing string directly in an CPView.
AppKit also adds similar methods to CPAttributedString.
The two drawing methods draw a string object with a single set of attributes that apply to the entire string.
To draw a string with multiple attributes, such as multiple text fonts, you must use an attributed string.
*/
@implementation CPString (AppKitAdditions)
/*!
Draws a string in the current graphics context.
This method applies the attributes to the entier string
and displays it on a single "infinately long" line.
@param aPoint - The starting point to draw the string
@param attributes - the dictionary of attributes to apply to the string
*/
- (void)drawAtPoint:(CGPoint)aPoint withAttributes:(CPDictionary)attributes
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
run = _CTRunCreate([self copy], attributes);
CGContextSetTextPosition(context, aPoint.x, aPoint.y);
CTRunDraw(run, context, nil);
}
/*!
Draws a string in the current graphics context.
This method applies the attributes to the entier string
and displays it within the given rect.
@param aRect - The rect for which the string should be drawn into
@param attributes - the dictionary of attributes to apply to the string
*/
- (void)drawInRect:(CGRect)aRect withAttributes:(CPDictionary)attributes
{
var context = [[CPGraphicsContext currentContext] graphicsPort],
string = [[CPAttributedString alloc] initWithString:self attributes:attributes];
frameSetter = CTFramesetterCreateWithAttributedString(string),
path = CGPathCreateMutable();
CGPathAddRect(path, nil, aRect);
var frame = CTFramesetterCreateFrame(frameSetter, CPMakeRange(0, [string length]), path, nil);
CTFrameDraw(frame, context);
}
@end
+10 -10
View File
@@ -332,18 +332,18 @@ CPTableColumnUserResizingMask = 1 << 1;
individual cell that is shown. As a result, changes made after calling this method won't be reflected.
Example:
@code
[tableColumn setDataView:someView]; // snapshot taken
[[tableColumn dataView] setSomething:x]; //won't work
@endcode
@code
[tableColumn setDataView:someView]; // snapshot taken
[[tableColumn dataView] setSomething:x]; //won't work
@endcode
This doesn't work because the snapshot is taken before the new property is applied. Instead, do:
@code
[someView setSomething:x];
[tableColumn setDataView:someView];
@endcode
@code
[someView setSomething:x];
[tableColumn setDataView:someView];
@endcode
@note You should implement CPKeyedArchiving otherwise you might see unexpected results.
@note you should implement CPKeyedArchiving otherwise you might see unexpected results.
This is done by adding the following methods to your class:
@endnote
@@ -380,7 +380,7 @@ CPTableColumnUserResizingMask = 1 << 1;
}
@endcode
@section Theming
@section Themeing
When you set a dataview and it is added to the tableview the theme state will be set to \c CPThemeStateTableDataView
When the dataview becomes selected the theme state will be set to \c CPThemeStateSelectedDataView.
-1
View File
@@ -323,7 +323,6 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5;
{
_tableViewFlags = 0;
_lastSelectedRow = -1;
_clickedRow = -1;
_selectedColumnIndexes = [CPIndexSet indexSet];
_selectedRowIndexes = [CPIndexSet indexSet];
+3
View File
@@ -704,6 +704,9 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder");
- (void)keyDown:(CPEvent)anEvent
{
if ([anEvent _couldBeKeyEquivalent] && [self performKeyEquivalent:anEvent])
return;
// CPTextField uses an HTML input element to take the input so we need to
// propagate the dom event so the element is updated. This has to be done
// before interpretKeyEvents: though so individual commands have a chance
+9 -57
View File
@@ -25,10 +25,9 @@
@import <Foundation/CPKeyedUnarchiver.j>
var CPThemesByName = { },
CPThemeNamesByInheritance = [],
CPThemeDefaultTheme = nil,
CPThemeDefaultHudTheme = nil;
var CPThemesByName = { },
CPThemeDefaultTheme = nil,
CPThemeDefaultHudTheme = nil;
/*!
@@ -77,52 +76,6 @@ var CPThemesByName = { },
return CPThemesByName[aName];
}
/*!
Returns an array of names of all loaded themes, in the order they were loaded.
*/
+ (CPArray)allThemeNames
{
return [CPThemeNamesByInheritance copy];
}
/*!
Returns the closest matching theme for a given view or view class.
The matching proceeds as follows:
- The default theme class name for the class is retrieved.
- Starting with the last loaded theme and proceeding towards the default theme,
each theme is checked to see if it defines that theme class.
- If the theme defines the class name, that theme is returned.
- If no themes match, the default theme is returned.
@param aViewOrClass The view or view class to match with a theme
@return The first matching theme
*/
+ (CPTheme)themeForView:(id)aViewOrClass
{
var themeClass = nil;
if (class_isMetaClass(aViewOrClass.isa))
themeClass = [aViewOrClass defaultThemeClass];
else
themeClass = [aViewOrClass themeClass];
if (themeClass)
{
var count = CPThemeNamesByInheritance.length;
while (count--)
{
var theme = CPThemesByName[CPThemeNamesByInheritance[count]];
if ([theme._attributes containsKey:themeClass])
return theme;
}
}
return CPThemeDefaultTheme;
}
- (id)initWithName:(CPString)aName
{
self = [super init];
@@ -133,9 +86,6 @@ var CPThemesByName = { },
_attributes = [CPDictionary dictionary];
CPThemesByName[_name] = self;
if (![CPThemeNamesByInheritance containsObject:_name])
CPThemeNamesByInheritance.push(_name);
}
return self;
@@ -349,9 +299,6 @@ var CPThemeNameKey = @"CPThemeNameKey",
_attributes = [aCoder decodeObjectForKey:CPThemeAttributesKey];
CPThemesByName[_name] = self;
if (![CPThemeNamesByInheritance containsObject:_name])
CPThemeNamesByInheritance.push(_name);
}
return self;
@@ -519,7 +466,12 @@ CPThemeStateCircular = CPThemeState("circular");
- (void)setValue:(id)aValue
{
[self setValue:aValue forState:CPThemeStateNormal];
_cache = {};
if (aValue === undefined || aValue === nil)
_values = [CPDictionary dictionary];
else
_values = [CPDictionary dictionaryWithObject:aValue forKey:String(CPThemeStateNormal)];
}
- (void)setValue:(id)aValue forState:(CPThemeState)aState
+1 -1
View File
@@ -1015,7 +1015,7 @@ var TOP_MARGIN = 5.0,
_labelSize = [_labelField frame].size;
_minSize = CGSizeMake(MAX(_labelSize.width, minSize.width), _labelSize.height + minSize.height + LABEL_MARGIN + TOP_MARGIN);
_maxSize = CGSizeMake(MAX(_labelSize.width, minSize.width), 100000000.0);
_maxSize = CGSizeMake(MIN(_labelSize.width, maxSize.width), 100000000.0);
[_toolbar tile];
}
+2 -2
View File
@@ -295,7 +295,7 @@ var CPViewFlags = { },
_DOMImageSizes = [];
#endif
_theme = [CPTheme themeForView:self];
_theme = [CPTheme defaultTheme];
_themeState = CPThemeStateNormal;
[self setupViewFlags];
@@ -2695,7 +2695,7 @@ var CPViewAutoresizingMaskKey = @"CPViewAutoresizingMask",
[self setupViewFlags];
_theme = [CPTheme themeForView:self];
_theme = [CPTheme defaultTheme];
_themeClass = [aCoder decodeObjectForKey:CPViewThemeClassKey];
_themeState = CPThemeState([aCoder decodeIntForKey:CPViewThemeStateKey]);
_themeAttributes = {};
@@ -1,64 +0,0 @@
/*
* CPCibRuntimeAttributesConnector.j
* AppKit
*
* Created by Aparajita Fishman.
* 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
*/
@import "CPCibConnector.j"
var CPCibRuntimeAttributesConnectorObjectKey = @"CPCibRuntimeAttributesConnectorObjectKey",
CPCibRuntimeAttributesConnectorKeyPathsKey = @"CPCibRuntimeAttributesConnectorKeyPathsKey",
CPCibRuntimeAttributesConnectorValuesKey = @"CPCibRuntimeAttributesConnectorValuesKey";
@implementation CPCibRuntimeAttributesConnector : CPCibConnector
{
id _keyPaths;
id _values;
}
- (id)initWithCoder:(CPCoder)aCoder
{
if (self = [super initWithCoder:aCoder])
{
_source = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorObjectKey];
_keyPaths = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorKeyPathsKey];
_values = [aCoder decodeObjectForKey:CPCibRuntimeAttributesConnectorValuesKey];
}
return self;
}
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];
[aCoder encodeObject:_source forKey:CPCibRuntimeAttributesConnectorObjectKey];
[aCoder encodeObject:_keyPaths forKey:CPCibRuntimeAttributesConnectorKeyPathsKey];
[aCoder encodeObject:_values forKey:CPCibRuntimeAttributesConnectorValuesKey];
}
- (void)establishConnection
{
var count = [_keyPaths count];
while (count--)
[_source setValue:_values[count] forKeyPath:_keyPaths[count]];
}
@end
+2 -2
View File
@@ -61,14 +61,14 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey",
if (!object)
{
CPLog.error("Unable to find class " + theClassName + " referenced in cib file.");
CPLog.error("Unable to find class " + theClassName + " in cib file.");
object = [self allocObjectWithCoder:aCoder className:[aCoder decodeObjectForKey:_CPCibClassSwapperOriginalClassNameKey]];
}
}
if (!object)
[CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " referenced in cib file."];
[CPException raise:CPInvalidArgumentException reason:@"Unable to find class " + theClassName + " in cib file."];
return object;
}
+1 -17
View File
@@ -43,11 +43,6 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey",
return [[self alloc] initWithClassName:@"CPImage" resourceName:aResourceName properties:[CPDictionary dictionaryWithObject:aSize forKey:@"size"]];
}
+ (id)imageResourceWithName:(CPString)aResourceName size:(CGSize)aSize bundleClass:(CPString)aBundleClass
{
return [[self alloc] initWithClassName:@"CPImage" resourceName:aResourceName properties:[CPDictionary dictionaryWithObjects:[aSize, aBundleClass] forKeys:[@"size", @"bundleClass"]]];
}
- (id)initWithClassName:(CPString)aClassName resourceName:(CPString)aResourceName properties:(CPDictionary)properties
{
self = [super init];
@@ -94,18 +89,7 @@ var _CPCibCustomResourceClassNameKey = @"_CPCibCustomResourceClassNameKey",
else if (_resourceName == "CPRemoveTemplate")
return [[CPImage alloc] initWithContentsOfFile:[[CPBundle bundleForClass:[CPButtonBar class]] pathForResource:@"minus_button.png"] size:CGSizeMake(11, 4)];
var bundleClass = _properties.valueForKey(@"bundleClass"),
bundle = nil;
if (bundleClass)
{
bundleClass = CPClassFromString(bundleClass);
if (bundleClass)
bundle = [CPBundle bundleForClass:bundleClass];
}
return [[CPImage alloc] initWithContentsOfFile:[(bundle || [aCoder bundle]) pathForResource:_resourceName] size:_properties.valueForKey(@"size")];
return [[CPImage alloc] initWithContentsOfFile:[[aCoder bundle] pathForResource:_resourceName] size:_properties.valueForKey(@"size")];
}
return self;
+2 -21
View File
@@ -29,7 +29,6 @@
@import "CPCibControlConnector.j"
@import "CPCibOutletConnector.j"
@import "CPCibBindingConnector.j"
@import "CPCibRuntimeAttributesConnector.j"
@implementation _CPCibObjectData : CPObject
@@ -258,29 +257,11 @@ var _CPCibObjectDataNamesKeysKey = @"_CPCibObjectDataNamesKeysKey
_replacementObjects[[_fileOwner UID]] = anOwner;
var index = 0,
count = _connections.length,
runtimeAttributeConnectors = [],
connection = nil;
count = _connections.length;
for (; index < count; ++index)
{
connection = _connections[index];
if ([connection isKindOfClass:[CPCibRuntimeAttributesConnector class]])
// Defer runtime attribute connections until after all other connections are made
runtimeAttributeConnectors.push(connection);
else
{
[connection replaceObjects:_replacementObjects];
[connection establishConnection];
}
}
count = runtimeAttributeConnectors.length;
for (index = 0; index < count; ++index)
{
connection = runtimeAttributeConnectors[index];
var connection = _connections[index];
[connection replaceObjects:_replacementObjects];
[connection establishConnection];
+99
View File
@@ -0,0 +1,99 @@
/*
* 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);
}
// FIXME: these are hacks that override the default behavior.
function CGContextSetFillColor(/* CGContext */ aContext, /* CPColor */ aColor)
{
aContext.fillStyle = [aColor cssString];
aContext._CPColor = aColor;
}
function CGContextGetFillColor(/* CGContext */ aContext)
{
return aContext._CPColor;
}
+192
View File
@@ -0,0 +1,192 @@
/*
* CTFrame.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
*/
@import "CTLine.j"
kCTFrameProgressionTopToBottom = 0;
kCTFrameProgressionRightToLeft = 1;
kCTFrameProgressionAttributeName = @"kCTFrameProgressionAttributeName";
function _CTFrameCreate(aPath, attributes, lines, attributedString)
{
return {
path: aPath,
attributes: attributes,
lines: lines,
string: attributedString
};
}
_CTFrameCreate.displayName = @"_CTFrameCreate";
/*!
Returns the range of the frame based on the original string
FIX ME: This implementation is wrong
*/
function CTFrameGetStringRange(/* CTFrame */ aFrame)
{
return CPMakeRange();
}
CTFrameGetStringRange.displayName = @"CTFrameGetStringRange";
/*!
Returns a range object with the visisble characters
FIX ME: THis implementation is wrong
*/
function CTFrameGetVisibleStringRange(/* CTFrame */ aFrame)
{
return CPMakeRange();
}
CTFrameGetVisibleStringRange.displayName = @"CTFrameGetVisibleStringRange";
/*!
Returns the path for the frame.
*/
function CTFrameGetPath(/* CTFrame */ aFrame)
{
return aFrame.path;
}
CTFrameGetPath.displayName = @"CTFrameGetPath";
/*!
Returns a dictionary of attributes for the frame.
*/
function CTFrameGetFrameAttributes(/* CTFrame */ aFrame)
{
return aFrame.frameAttributes;
}
CTFrameGetFrameAttributes.displayName = @"CTFrameGetFrameAttributes";
/*!
Returns the array containing CTLines that make up the frame
*/
function CTFrameGetLines(/* CTFrame */ aFrame)
{
return aFrame.lines;
}
CTFrameGetLines.displayName = @"CTFrameGetLines";
/*!
Returns an array of CGPoints for the origin of each CTLine in the frame
*/
function CTFrameGetLineOrigins(/* CTFrame */ aFrame, /* CPRange */ aRange)
{
var results = [],
lines = aRange ? CTFrameGetLinesForRange(aFrame, aRange) : aFrame.lines;
for (var i = -1, count = lines.length; ++i < count;)
results.push(lines[i].origin);
return results;
}
CTFrameGetLineOrigins.displayName = @"CTFrameGetLineOrigins";
/*!
Returns an array of CTLines for a given range.
Divergent from Cocoa and expensive.
*/
function CTFrameGetLinesForRange(/* CTFrame */ aFrame, /* CPRange */ lhs)
{
var lines = aFrame.lines, results = [];
for (var i = -1, count = lines.length; ++i < count;)
{
var line = lines[i],
rhs = CTLineGetStringRange(line);
if ((CPMaxRange(lhs) < rhs.location || CPMaxRange(rhs) < lhs.location) && result.length)
break;
if (lhs.location >= rhs.location && rhs.location <= CPMaxRange(lhs) && CPMaxRange(rhs) > lhs.location)
results.push(line);
}
return results;
}
CTFrameGetLinesForRange.displayName = @"CTFrameGetLinesForRange";
/*!
Returns a CPRange
This is divergent from Cocoa. It's a convenience method used in CPTextView.
*/
function CTFrameGetRangeForPoint(/* CTFrame */ aFrame, /* CGPoint */ aPoint)
{
var lines = aFrame.lines, y = aPoint.y;
for (var i = -1, count = lines.length; ++i < count;)
{
var line = lines[i],
bounds = CTLineGetImageBounds(line),
lineY = line._startPosition.y;
if (y >= lineY && y < bounds.size.height + lineY)
{
// FIXME: we seem to be doing stuff like this with some frequency;
// Maybe it should be normalized at an earlier point.
var index = CTLineGetStringIndexForPosition(line, aPoint),
range = CTLineGetStringRange(line);
range.location += index;
range.length = 0;
return range;
}
}
}
CTFrameGetRangeForPoint.displayName = @"CTFrameGetRangeForPoint";
/*!
Draws the frame to the graphics context.
*/
function CTFrameDraw(/* CTFrame */ aFrame, /* CGContext */ aContext)
{
var origin = aFrame.path.start,
lines = aFrame.lines;
CGContextSetTextPosition(aContext, origin.x, origin.y);
for (var i = -1, count = lines.length; ++i < count;)
{
var line = lines[i],
alignment = [line.string attribute:@"alignment" atIndex:0 effectiveRange:CPMakeRange(0, 0)],
position = CGContextGetTextPosition(aContext);
if (alignment === CPRightTextAlignment)
line.origin = CGPointMake((aFrame.path.elements[1].x - origin.x * 2) - CTLineGetTypographicBounds(line).width, position.y);
else if (alignment === CPCenterTextAlignment)
line.origin = CGPointMake(((aFrame.path.elements[1].x - origin.x) / 2) - CTLineGetTypographicBounds(line).width / 2, position.y);
else
line.origin = CGPointMake(origin.x, position.y);
CGContextSetTextPosition(aContext, line.origin.x, line.origin.y);
CTLineDraw(line, aContext);
}
}
CTFrameDraw.displayName = @"CTFrameDraw";
+122
View File
@@ -0,0 +1,122 @@
/*
* CTFramesetter.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
*/
@import "CTFrame.j"
@import "CTTypesetter.j"
/*!
Creates a typesetter with a given CPAttributedString
*/
function CTFramesetterCreateWithAttributedString(/* CPAttributedString */ aString)
{
return {
string: aString,
typesetter: CTTypesetterCreateWithAttributedString(aString)
};
}
CTFramesetterCreateWithAttributedString.displayName = @"CTFramesetterCreateWithAttributedString";
/*!
Creates a CTFrame with a given typesetter, range, path, and attributes
*/
function CTFramesetterCreateFrame(/* CTFramesetter */ aFramesetter, /* CPRange */ aRange, /* CGPath */ aPath, /* CPDictionary */ frameAttributes)
{
if (aFramesetter._cachedFrame && [aFramesetter._cachedAttributes isEqual:frameAttributes])
return aFramesetter._cachedFrame;
var attributedString = aRange ? [aFramesetter.string attributedSubstringFromRange:aRange] : aFramesetter.string,
nonattributedString = [attributedString string],
splitLines = nonattributedString.split(/\n|\r/g),
lines = [];
var index = 0;
for (var i = -1, count = splitLines.length; ++i < count;)
{
var length = splitLines[i].length;
if (i !== count - 1)
++length;
var range = CPMakeRange(index, length),
line = CTLineCreateWithAttributedString([attributedString attributedSubstringFromRange:range]);
line.range = range; // FIXME: a couple hacks to make managing lines in CPTextView easier
line.prevLine = lastLine;
if (lastLine)
lastLine.nextLine = line;
lines.push(line);
index += length;
var lastLine = line;
}
return aFramesetter._cachedFrame = _CTFrameCreate(aPath, frameAttributes, lines);
}
CTFramesetterCreateFrame.displayName = @"CTFramesetterCreateFrame";
/*!
Returns a CTTypesetter
*/
function CTFramesetterGetTypesetter(/* CTFramesetter */ aFramesetter)
{
return aFramesetter.typesetter;
}
CTFramesetterGetTypesetter.displayName = @"CTFramesetterGetTypesetter";
/*!
Returns a CGSize object with the suggested size for a given frame.
*/
function CTFramesetterSuggestFrameSizeWithConstraints(/* CTFramesetter */ aFramesetter, /* CPRange */ aRange, /* CPDictionary */ frameAttributes, /* CGSize */ constraints, /* {CPRange} */ fitRange)
{
var frame = CTFramesetterCreateFrame(aFramesetter, aRange, null, frameAttributes),
lines = CTFrameGetLines(frame),
width = 0.0,
height = 0.0;
for (var i = -1, count = lines.length; ++i < count;)
{
var bounds = CTLineGetTypographicBounds(lines[i]);
// var bounds = CTLineGetImageBounds(lines[i], [[CPGraphicsContext currentContext] graphicsPort]).size;
width = MAX(width, bounds.width);
height += bounds.lineHeight;
// height += bounds.height;
}
return CGSizeMake(width, height);
}
CTFramesetterSuggestFrameSizeWithConstraints.displayName = @"CTFramesetterSuggestFrameSizeWithConstraints";
/*!
Returns the CPAttributedString for a given framesetter
*/
function CTFramesetterGetAttributedString(/* CTFramesetter */ aFramesetter)
{
return aFramesetter.string;
}
CTFramesetterGetAttributedString.displayName = @"CTFramesetterGetAttributedString";
+258
View File
@@ -0,0 +1,258 @@
/*
* CTLine.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
*/
@import "CTRun.j"
kCTLineTruncationStart = 0;
kCTLineTruncationEnd = 1;
kCTLineTruncationMiddle = 2;
/*!
Creates a new line with a supplied CPAttributedString
*/
function CTLineCreateWithAttributedString(/* CPAttributedString */ aString)
{
var line = {
string: aString,
runs: []
};
_CTLineCreateRuns(line);
return line;
}
CTLineCreateWithAttributedString.displayName = @"CTLineCreateWithAttributedString";
/*!
Creates a new line truncated to a given width.
@param aLine - The input line
@param width - The constraining width
@param truncationToken - The characters to represent the truncation. This is usually an elipsis. If not token is given the string will just clip
FIX ME: Not implemented correctly
*/
function CTLineCreateTruncatedLine(/* CTLine */ aLine, /* float */ width, /* CTLineTruncationType */ truncationType, /* CTLine */ truncationToken)
{
return aLine;
}
CTLineCreateTruncatedLine.displayName = @"CTLineCreateTruncatedLine";
/*!
Returns a CTLine with justified text.
FIX ME: This is not implemented correctly
*/
function CTLineCreateJustifiedLine(/* CTline */ aLine, /* float */ justificationFactor, /* float */ width)
{
return aLine;
}
CTLineCreateJustifiedLine.displayName = @"CTLineCreateJustifiedLine";
/*!
Returns the number of glyphs in a given line.
*/
function CTLineGetGlyphCount(/* CTLine */ aLine)
{
return [aLine.string length];
}
CTLineGetGlyphCount.displayName = @"CTLineGetGlyphCount";
/*!
Returns the array of CTRuns that make up the line.
*/
function CTLineGetGlyphRuns(/* CTLine */ aLine)
{
return aLine.runs;
}
CTLineGetGlyphRuns.displayName = @"CTLineGetGlyphRuns";
/*!
Returns the range for which the CTLine makes up the original string
*/
function CTLineGetStringRange(/* CTLine */ aLine)
{
return CPCopyRange(aLine.range) || CPMakeRange(0, [aLine.string length])
}
CTLineGetStringRange.displayName = @"CTLineGetStringRange";
/*!
No op
*/
function CTLineGetPenOffsetForFlush(/* CTLine */ aLine, /* float */ flushFactor, /* float */ flushWidth)
{
}
CTLineGetPenOffsetForFlush.displayName = @"CTLineGetPenOffsetForFlush";
/*!
Draws the CTLine to the graphics context.
*/
function CTLineDraw(/* CTLine */ aLine, /* CGContext */ aContext)
{
var startPosition = aLine._startPosition = CGContextGetTextPosition(aContext),
height = CTLineGetImageBounds(aLine, aContext).size.height;
// FIXME: This is WRONG. This NEEDS to be in CGContext.
CGContextSetTextPosition(aContext, startPosition.x, startPosition.y + height * 0.5);
var runs = aLine.runs;
for (var i = -1, count = runs.length; ++i < count;)
CTRunDraw(runs[i], aContext);
CGContextSetTextPosition(aContext, startPosition.x, startPosition.y + height);
}
CTLineDraw.displayName = @"CTLineDraw";
/*!
Calcaulates the image bounds for a line.
*/
function CTLineGetImageBounds(/* CTLine */ aLine, /* CGContext */ aContext)
{
if (aLine._imageBounds)
return aLine._imageBounds;
var runs = aLine.runs,
width = 0.0,
height = 0.0;
for (var i = -1, count = runs.length; ++i < count;)
{
var runSize = CTRunGetImageBounds(runs[i], aContext).size;
width += runSize.width;
height = MAX(height, runSize.height);
}
return aLine._imageBounds = CGRectMake(0.0, 0.0, width, height);
}
CTLineGetImageBounds.displayName = @"CTLineGetImageBounds";
/*!
Returns a JSObject: {width: float, ascent: float, descent: float, lineHeight: float}
This method is more expensive than CTLineGetImageBounds.
*/
function CTLineGetTypographicBounds(/* CTLine */ aLine)
{
if (aLine._typographicBounds)
return aLine._typographicBounds;
var runs = aLine.runs,
width = 0.0,
ascent = 0.0,
descent = 0.0,
lineHeight = 0.0;
for (var i = -1, count = runs.length; ++i < count;)
{
var runObject = CTRunGetTypographicBounds(runs[i]);
width += runObject.width;
ascent = MAX(ascent, runObject.ascent);
descent = MAX(descent, runObject.descent);
lineHeight = MAX(lineHeight, runObject.lineHeight);
}
return aLine._typographicBounds = {
width: width,
ascent: ascent,
descent: descent,
lineHeight: lineHeight
};
}
CTLineGetTypographicBounds.displayName = @"CTLineGetTypographicBounds";
/*!
Returns the index of the line based on the original string
*/
function CTLineGetStringIndexForPosition(/* CTLine */ aLine, /* CGPoint */ aPoint)
{
var runs = aLine.runs, x = aPoint.x, index = 0;
for (var i = -1, count = runs.length; ++i < count;)
{
var run = runs[i],
origins = run.glyphOrigins;
for (var j = -1, jcount = origins.length; ++j < jcount;)
{
var origin = origins[j], next;
if (j < jcount - 1)
next = origins[j + 1];
else if (i < count - 1)
next = runs[i + 1].glyphOrigins[0];
else
return index++;
if (x <= (next.x - origin.x) / 2 + origin.x)
return index;
index++;
}
}
}
CTLineGetStringIndexForPosition.displayName = @"CTLineGetStringIndexForPosition";
/*!
Returns the offset corresponding to a string index,
this works well for for movement between adjacent lines or for drawing a custom caret.
*/
function CTLineGetOffsetForStringIndex(/* CTLine */ aLine, /* int */ anIndex, /* float */ secondaryOffset)
{
var runs = aLine.runs;
for (var i = -1, count = runs.length; ++i < count;)
{
var run = runs[i], runRange = run.range;
if (CPLocationInRange(anIndex, runRange))
return run.glyphOrigins[anIndex - runRange.location];
}
}
CTLineGetOffsetForStringIndex.displayName = @"CTLineGetOffsetForStringIndex";
function _CTLineCreateRuns(aLine)
{
var string = aLine.string,
runs = aLine.runs,
rangeEntries = string._rangeEntries;
for (var i = -1, count = rangeEntries.length; ++i < count;)
{
var rangeEntry = rangeEntries[i],
range = rangeEntry.range,
rangeString = [[string string] substringWithRange:range],
attributes = rangeEntry.attributes;
var run = _CTRunCreate(rangeString, attributes);
run.range = range;
runs.push(run);
}
}
_CTLineCreateRuns.displayName = @"_CTLineCreateRuns";
+290
View File
@@ -0,0 +1,290 @@
/*
* CTRun.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
*/
kCTRunStatusNoStatus = 0;
kCTRunStatusRightToLeft = 1 << 0;
kCTRunStatusNonMonotonic = 1 << 1;
kCTRunStatusNonIdentityMatrix = 1 << 2;
/*!
A CTRun represents a span of characters with common attribtues.
*/
function _CTRunCreate(glyphs, attributes)
{
return {
glyphs: glyphs,
attributes: attributes,
status: kCTRunStatusNoStatus
};
}
_CTRunCreate.displayName = @"_CTRunCreate";
/*!
Returns the number of glyphs in the run.
*/
function CTRunGetGlyphCount(/* CTRun */ aRun)
{
return aRun.glyphs.length;
}
CTRunGetGlyphCount.displayName = @"CTRunGetGlyphCount";
/*!
Returns a CPDictionary of attributes for the CTRun
*/
function CTRunGetAttributes(/* CTRun */ aRun)
{
return aRun.attributes;
}
CTRunGetAttributes.displayName = @"CTRunGetAttributes";
/*!
Returns a CTRunStatus
CTRuns have status that can be used to speed up certain operations.
Possible values:
@code
kCTRunStatusNoStatus
kCTRunStatusRightToLeft
kCTRunStatusNonMonotonic
kCTRunStatusNonIdentityMatrix
@endcode
*/
function CTRunGetStatus(/* CTRun */ aRun)
{
return aRun.status || kCTRunStatusNoStatus;
}
CTRunGetStatus.displayName = @"CTRunGetStatus";
/*!
Returns an array of CGGlyphs
FIX ME: Not implemented correctly
*/
function CTRunGetGlyphs(/* CTRun */ aRun, /* CPRange */ aRange)
{
if (!aRun.glyphs)
aRun.glyphs = [];
return aRun.glyphs;
}
CTRunGetGlyphs.displayName = @"CTRunGetGlyphs";
/*!
Returns an array of CGPoints
FIX ME: Not implemented correctly
*/
function CTRunGetPositions(/* CTRun */ aRun, /* CPRange */ aRange)
{
if (!aRun.positions)
aRun.positions = [];
return aRun.positions;
}
CTRunGetPositions.displayName = @"CTRunGetPositions";
/*!
Returns an array of CGSizes
FIX ME: Not implemented correctly
*/
function CTRunGetAdvances(/* CTRun */ aRun, /* CPRange */ aRange)
{
if (!aRun.advances)
aRun.advances = [];
return aRun.advances;
}
CTRunGetAdvances.displayName = @"CTRunGetAdvances";
/*!
Returns an array of indexes.
FIX ME: Not implemented correctly
*/
function CTRunGetStringIndices(/* CTRun */ aRun, /* CPRange */ aRange)
{
if (!aRun.stringIndices)
aRun.stringIndices = [];
return aRun.stringIndices;
}
CTRunGetStringIndices.displayName = @"CTRunGetStringIndices";
/*!
Returns a CPRange containing the location of the run in the parent string
*/
function CTRunGetStringRange(/* CTRun */ aRun)
{
return aRun.range;
}
CTRunGetStringRange.displayName = @"CTRunGetStringRange";
/*!
Returns a JSObject: {width: float, ascender: float, descender: float, lineHeight: float}
More expensive
*/
function CTRunGetTypographicBounds(/* CTRun */ aRun, /* CPRange */ aRange)
{
if (aRun._typographicBounds)
return aRun._typographicBounds;
var attributes = aRun.attributes,
font = [attributes valueForKey:@"font"],
string = _CTRunStringForRange(aRun, aRange);
return aRun._typographicBounds = {
width: [string sizeWithFont:font].width, // FIXME: account for tabs
ascender: [font ascender],
descender: [font descender],
lineHeight: [font defaultLineHeightForFont]
};
}
CTRunGetTypographicBounds.displayName = @"CTRunGetTypographicBounds";
/*!
Returns a CGRect
Cheap
*/
function CTRunGetImageBounds(/* CTRun */ aRun, /* CGContext */ aContext, /* CPRange */ aRange)
{
if (aRun._imageBounds)
return aRun._imageBounds;
_CTRunPrepareDraw(aRun, aContext);
var string = _CTRunStringForRange(aRun, aRange),
width = aContext.measureText(string).width,
height = [CGContextGetFont(aContext) defaultLineHeightForFont];
_CTRunUnprepareDraw(aRun, aContext);
return aRun._imageBounds = CGRectMake(0.0, 0.0, width, height);
}
CTRunGetImageBounds.displayName = @"CTRunGetImageBounds";
// CGAffineTransform
function CTRunGetTextMatrix(/* CTRun */ aRun)
{
}
CTRunGetTextMatrix.displayName = @"CTRunGetTextMatrix";
/*!
Draws the run to the context
*/
function CTRunDraw(/* CTRun */ aRun, /* CGContext */ aContext, /* CPRange */ aRange)
{
_CTRunPrepareDraw(aRun, aContext);
var string = aRange ? [aRun.glyphs substringWithRange:aRange] : aRun.glyphs;
_CTRunDrawShadow(aRun, aContext, string);
var origins = aRun.glyphOrigins = [];
for (var i = -1, count = string.length; ++i < count;)
{
var glyph = string[i];
origins[i] = CGContextGetTextPosition(aContext);
CGContextShowText(aContext, glyph);
}
_CTRunUnprepareDraw(aRun, aContext);
}
CTRunDraw.displayName = @"CTRunDraw";
function _CTRunDrawShadow(aRun, aContext, aString)
{
var attributes = aRun.attributes,
textShadowColor = [attributes valueForKey:@"text-shadow-color"],
textShadowOffset = [attributes valueForKey:@"text-shadow-offset"];
if (textShadowColor && textShadowOffset)
{
var color = CGContextGetFillColor(aContext),
position = CGContextGetTextPosition(aContext);
CGContextSetFillColor(aContext, textShadowColor);
CGContextShowTextAtPoint(aContext, position.x + textShadowOffset.width, position.y + textShadowOffset.height, aString);
CGContextSetFillColor(aContext, color);
CGContextSetTextPosition(aContext, position.x, position.y);
}
}
_CTRunDrawShadow.displayName = @"_CTRunDrawShadow";
function _CTRunPrepareDraw(aRun, aContext)
{
var attributes = aRun.attributes,
font = [attributes valueForKey:@"font"],
color = [attributes valueForKey:@"color"];
if (font)
{
CGContextSelectFont(aContext, font);
aRun._cachedFont = CGContextGetFont(aContext);
}
if (color)
{
CGContextSetFillColor(aContext, color);
aRun._cachedColor = CGContextGetFillColor(aContext);
}
}
_CTRunPrepareDraw.displayName = @"_CTRunPrepareDraw";
function _CTRunUnprepareDraw(aRun, aContext)
{
if (aRun._cachedFont)
{
CGContextSelectFont(aContext, aRun._cachedFont);
aRun._cachedFont = nil;
}
if (aRun._cachedColor)
{
CGContextSetFillColor(aContext, aRun._cachedColor);
aRun._cachedColor = nil;
}
}
_CTRunUnprepareDraw.displayName = @"_CTRunUnprepareDraw";
function _CTRunStringForRange(aRun, aRange)
{
return (!aRange || aRange.length === 0) ? aRun.glyphs : [aRun.glyphs substringWithRange:aRange];
}
_CTRunStringForRange.displayName = @"_CTRunStringForRange";
+60
View File
@@ -0,0 +1,60 @@
/*
* CTTypesetter.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
*/
@import "CTLine.j"
kCTTypesetterOptionDisableBidiProcessing = @"kCTTypesetterOptionDisableBidiProcessing";
kCTTypesetterOptionForcedEmbeddingLevel = @"kCTTypesetterOptionForcedEmbeddingLevel";
// Returns a CTTypesetter
function CTTypesetterCreateWithAttributedString(/* CPAttributedString */ aString)
{
return CTTypesetterCreateWithAttributedStringAndOptions(aString, nil);
}
// Returns a CTTypesetter
function CTTypesetterCreateWithAttributedStringAndOptions(/* CPAttributedString */ aString, /* CPDictionary */ aDictionary)
{
return {
string: aString,
options: aDictionary
}
}
// Returns a CTLine
function CTTypesetterCreateLine(/* CTTypesetter */ aTypesetter, /* CPRange */ aRange)
{
}
// Returns an index
function CTTypesetterSuggestLineBreak(/* CTTypesetter */ aTypesetter, /* int */ startIndex, /* float */ width)
{
}
// Returns an index
function CTTypesetterSuggestClusterBreak(/* CTTypesetter */ aTypesetter, /* int */ startIndex, /* float */ width)
{
}
@@ -1,8 +1,8 @@
/*
* NSNull.j
* nib2cib
* CoreText.j
* CoreText
*
* Created by Aparajita Fishman.
* Created by Nicholas Small.
* Copyright 2011, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -20,18 +20,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
@import <Foundation/CPNull.j>
@import "CTFramesetter.j"
@import "CTFrame.j"
@import "CTTypesetter.j"
@import "CTLine.j"
@import "CTRun.j"
@implementation NSNull : CPNull
- (id)initWithCoder:(CPCoder)aCoder
{
return [CPNull null];
}
- (Class)classForKeyedArchiver
{
return [CPNull class];
}
@end
@import "CGContextText.j"
+2 -2
View File
@@ -810,8 +810,8 @@ var themedButtonValues = nil,
[@"bezel-color", bezelDisabledColor, CPThemeStateBezeled | CPThemeStateDisabled],
[@"font", [CPFont systemFontOfSize:12.0], CPThemeStateBezeled],
[@"content-inset", CGInsetMake(7.0, 7.0, 6.0, 8.0), CPThemeStateBezeled],
[@"content-inset", CGInsetMake(6.0, 7.0, 6.0, 8.0), CPThemeStateBezeled | CPThemeStateEditing],
[@"content-inset", CGInsetMake(8.0, 7.0, 5.0, 8.0), CPThemeStateBezeled],
[@"content-inset", CGInsetMake(7.0, 7.0, 5.0, 8.0), CPThemeStateBezeled | CPThemeStateEditing],
[@"bezel-inset", CGInsetMake(3.0, 4.0, 3.0, 4.0), CPThemeStateBezeled],
[@"bezel-inset", CGInsetMake(0.0, 0.0, 0.0, 0.0), CPThemeStateBezeled | CPThemeStateEditing],
-22
View File
@@ -288,28 +288,6 @@ var _CPimageAndTextViewFrameSizeChangedFlag = 1 << 0,
return _textShadowOffset;
}
- (CGRect)textFrame
{
[self layoutIfNeeded];
var textFrame = CGRectMakeZero();
if (_DOMTextElement)
{
var textStyle = _DOMTextElement.style;
textFrame.origin.y = parseInt(textStyle.top.substr(0, textStyle.top.length - 2), 10),
textFrame.origin.x = parseInt(textStyle.left.substr(0, textStyle.left.length - 2), 10),
textFrame.size.width = parseInt(textStyle.width.substr(0, textStyle.width.length - 2), 10),
textFrame.size.height = parseInt(textStyle.height.substr(0, textStyle.height.length - 2), 10);
textFrame.size.width += _textShadowOffset.width;
textFrame.size.height += _textShadowOffset.height;
}
return textFrame;
}
- (void)setImage:(CPImage)anImage
{
if (_image == anImage)
-48
View File
@@ -1,48 +0,0 @@
require "buildr4osgi"
require File.join(File.dirname(__FILE__), "repositories.rb")
require File.join(File.dirname(__FILE__), "dependencies.rb")
# Keep this structure to allow the build system to update version numbers.
VERSION_NUMBER = "1.0.0.1"
# Shorten expressions
def jars(*args)
args.collect {|arg| project(arg).package(:jar)}
end
desc "Cappuccino Distribution"
define "cappuccino" do
project.version = VERSION_NUMBER
project.group = "com.intalio.cloud.cappuccino"
file(_("target/patch")).enhance do
mkdir_p "target/patch"
end
file(_("target/Frameworks")).enhance do
mkdir_p "target/Frameworks/Debug"
system <<-BASH
export BUILD_PATH="target/Build"
jake debug release
BASH
cp_r "target/Build/Release/AppKit", "target/Frameworks/"
cp_r "target/Build/Release/Foundation", "target/Frameworks/"
cp_r "target/Build/Release/Objective-J", "target/Frameworks/"
cp_r "target/Build/Debug/AppKit", "target/Frameworks/Debug/"
cp_r "target/Build/Debug/Foundation", "target/Frameworks/Debug/"
cp_r "target/Build/Debug/Objective-J", "target/Frameworks/Debug/"
end
# file(_("target/Build")).enhance do
# end
package(:bundle).include _("target/patch"), :as => "patch"
package(:bundle).include _("target/Frameworks"), :as => "content/Frameworks"
package(:bundle).include _("build.properties"), :as => "build.properties"
package(:bundle).meta_inf << file('META-INF/web-fragment.xml')
end
+1 -15
View File
@@ -428,9 +428,7 @@ var avgOperator,
maxOperator,
minOperator,
countOperator,
sumOperator,
distinctUnionOfObjectsOperator,
unionOfObjectsOperator;
sumOperator;
kvoOperators["avg"] = function avgOperator(self, _cmd, param)
{
@@ -497,18 +495,6 @@ kvoOperators["sum"] = function sumOperator(self, _cmd, param)
return sum;
}
kvoOperators["distinctUnionOfObjects"] = function distinctUnionOfObjectsOperator(self, _cmd, param)
{
var objects = [self valueForKeyPath:param];
return [[CPSet setWithArray:objects] allObjects];
}
kvoOperators["unionOfObjects"] = function unionOfObjectsOperator(self, _cmd, param)
{
return [self valueForKeyPath:param];
}
@implementation CPArray (KeyValueObserving)
- (void)addObserver:(id)anObserver toObjectsAtIndexes:(CPIndexSet)indexes forKeyPath:(CPString)aKeyPath options:(unsigned)options context:(id)context
+9
View File
@@ -27,6 +27,10 @@
@import "CPRange.j"
@import "CPString.j"
CPFontAttributeName = "font";
CPForegroundColorAttributeName = "color";
/*!
@class CPAttributedString
@ingroup foundation
@@ -42,6 +46,11 @@
implements functionality from both NSAttributedString and
NSMutableAttributedString. However, to ease converting of existing
Objective-C code a CPMutableAttributedString alias to this class exists.
Below are a list of commonly used attributes:
CPFontAttributeName - Font object
CPForegroundColorAttributeName - CPColor object
*/
@implementation CPAttributedString : CPObject
{
+3 -2
View File
@@ -201,10 +201,11 @@ var _CPKeyedArchiverStringClass = Nil,
for (; i < _objects.length; ++i)
{
var object = _objects[i];
var object = _objects[i],
theClass = [object classForKeyedArchiver];
// Do whatever with the class, yo.
// We called willEncodeObject previously.
// We call willEncodeObject previously.
_plistObject = _plistObjects[[_UIDs objectForKey:[object UID]]];
[object encodeWithCoder:self];
+51
View File
@@ -0,0 +1,51 @@
/*
* CPNumberFormatter.j
* Foundation
*
* Created by Alexander Ljungberg.
* Copyright 2011, WireLoad 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
*/
@import <Foundation/CPString.j>
@import <Foundation/CPFormatter.j>
@implementation CPNumberFormatter : CPFormatter
{
}
@end
@implementation CPNumberFormatter (CPCoding)
- (id)initWithCoder:(CPCoder)aCoder
{
self = [super initWithCoder:aCoder];
if (self)
{
}
return self;
}
- (void)encodeWithCoder:(CPCoder)aCoder
{
[super encodeWithCoder:aCoder];
}
@end
+6 -10
View File
@@ -438,18 +438,14 @@ var CPComparisonPredicateModifier,
reg = new RegExp(rhs.escapeForRegExp(),commut);
return reg.test(lhs);
case CPBeginsWithPredicateOperatorType: var range = CPMakeRange(0, MIN([lhs length], [rhs length]));
if (_options & CPCaseInsensitivePredicateOption)
string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption)
string_compare_options |= CPDiacriticInsensitiveSearch;
case CPBeginsWithPredicateOperatorType: var range = CPMakeRange(0,[rhs length]);
if (_options & CPCaseInsensitivePredicateOption) string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption) string_compare_options |= CPDiacriticInsensitiveSearch;
return ([lhs compare:rhs options:string_compare_options range:range] == CPOrderedSame);
case CPEndsWithPredicateOperatorType: var range = CPMakeRange(MAX([lhs length] - [rhs length], 0), MIN([lhs length], [rhs length]));
if (_options & CPCaseInsensitivePredicateOption)
string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption)
string_compare_options |= CPDiacriticInsensitiveSearch;
case CPEndsWithPredicateOperatorType: var range = CPMakeRange([lhs length] - [rhs length],[rhs length]);
if (_options & CPCaseInsensitivePredicateOption) string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption) string_compare_options |= CPDiacriticInsensitiveSearch;
return ([lhs compare:rhs options:string_compare_options range:range] == CPOrderedSame);
case CPCustomSelectorPredicateOperatorType: return [lhs performSelector:_customSelector withObject:rhs];
+2 -4
View File
@@ -184,9 +184,8 @@ var StandardUserDefaults;
}
[domain setObject:anObject forKey:aKey];
[self domainDidChange:aDomain];
_searchListNeedsReload = YES;
[self domainDidChange:aDomain];
}
/*!
@@ -211,9 +210,8 @@ var StandardUserDefaults;
return;
[domain removeObjectForKey:aKey];
[self domainDidChange:aDomain];
_searchListNeedsReload = YES;
[self domainDidChange:aDomain];
}
/*!
+2
View File
@@ -21,6 +21,7 @@
*/
@import "CPArray.j"
@import "CPAttributedString.j"
@import "CPBundle.j"
@import "CPCharacterSet.j"
@import "CPCoder.j"
@@ -49,6 +50,7 @@
@import "CPNotificationCenter.j"
@import "CPNull.j"
@import "CPNumber.j"
@import "CPNumberFormatter.j"
@import "CPObject.j"
@import "CPObjJRuntime.j"
@import "CPOperation.j"
-9
View File
@@ -1,9 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: cappuccinofrag
Bundle-SymbolicName: com.intalio.cloud.cappuccino
Fragment-Host: com.intalio.cloud.carbon
Jetty-WarFragmentFolderPath: /content
Jetty-WarPatchFragmentFolderPath: /patch
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-fragment
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
metadata-complete="false"
version="3.0">
<servlet>
<servlet-name>cappuccino-fragment</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>cappuccino-fragment</servlet-name>
<url-pattern>/carbon</url-pattern>
</servlet-mapping>
</web-fragment>
+26
View File
@@ -33,6 +33,15 @@ var CLS_CLASS = 0x1,
#define GETMETA(aClass) (ISMETA(aClass) ? aClass : aClass.isa)
#define ISINITIALIZED(aClass) GETINFO(GETMETA(aClass), CLS_INITIALIZED)
// MAXIMUM_RECURSION_CHECKS
// If defined, objj_msgSend will check for recursion deeper than MAXIMUM_RECURSION_DEPTH and
// throw an error if found. While crude, this can be helpful when your JavaScript debugger
// crashes on recursion errors (e.g. Safari) or ignores them (e.g. Chrome).
// #define MAXIMUM_RECURSION_CHECKS
#define MAXIMUM_RECURSION_DEPTH 80
GLOBAL(objj_ivar) = function(/*String*/ aName, /*String*/ aType)
{
this.name = aName;
@@ -604,6 +613,10 @@ DISPLAY_NAME(ivar_getTypeEncoding);
// Sending Messages
#ifdef MAXIMUM_RECURSION_CHECKS
var __objj_msgSend__StackDepth = 0;
#endif
GLOBAL(objj_msgSend) = function(/*id*/ aReceiver, /*SEL*/ aSelector)
{
if (aReceiver == nil)
@@ -613,6 +626,13 @@ GLOBAL(objj_msgSend) = function(/*id*/ aReceiver, /*SEL*/ aSelector)
CLASS_GET_METHOD_IMPLEMENTATION(var implementation, isa, aSelector);
#ifdef MAXIMUM_RECURSION_CHECKS
if (__objj_msgSend__StackDepth++ > MAXIMUM_RECURSION_DEPTH)
throw new Error("Maximum call stack depth exceeded.");
try {
#endif
switch(arguments.length)
{
case 2: return implementation(aReceiver, aSelector);
@@ -621,6 +641,12 @@ GLOBAL(objj_msgSend) = function(/*id*/ aReceiver, /*SEL*/ aSelector)
}
return implementation.apply(aReceiver, arguments);
#ifdef MAXIMUM_RECURSION_CHECKS
} finally {
__objj_msgSend__StackDepth--;
}
#endif
}
DISPLAY_NAME(objj_msgSend);
+42
View File
@@ -80,6 +80,7 @@
[arrayController insertObject:object atArrangedObjectIndex:1];
[self assert:object equals:[[arrayController arrangedObjects] objectAtIndex:1]];
[self assertTrue:[[arrayController content] containsObject:object] message:@"object should be inserted into content"];
}
- (void)testAddObjectUpdatesArrangedObjectsWithoutSortDescriptors
@@ -438,6 +439,31 @@
[self assert:1 equals:[observations count] message:@"exactly 1 notification for addObject (clearsFilterPredicate YES)"];
}
/*!
Test that if there is no filter predicate to clear, insertObject:atArrangedObjectIndex: with
clearsFilterPredicate YES does not send a false filterPredicate notification.
*/
- (void)testObservationDuringInsertObject_atArrangedIndex_
{
var arrayController = [self arrayController];
[arrayController addObserver:self forKeyPath:@"filterPredicate" options:CPKeyValueObservingOptionOld | CPKeyValueObservingOptionNew context:nil];
// Add something to clear.
[arrayController setFilterPredicate:[CPPredicate predicateWithFormat:@"(name != %@)", "Francisco"]];
observations = [];
var aPerson = [Employee employeeWithName:@"Alexander" department:[Department departmentWithName:@"Cosmic Path Finding"]];
[arrayController setClearsFilterPredicateOnInsertion:YES];
[self assert:0 equals:[observations count] message:@"no observations before insertObject test"];
[arrayController insertObject:aPerson atArrangedObjectIndex:1];
[self assert:1 equals:[observations count] message:@"exactly 1 notification for insertObject (clearsFilterPredicate YES)"];
// Now that the filter is already cleared, we should not get notified that it clears again on the second insert.
[arrayController insertObject:aPerson atArrangedObjectIndex:1];
[self assert:1 equals:[observations count] message:@"exactly 1 notification for insertObject x 2 (clearsFilterPredicate YES)"];
}
- (void)testCompoundKeyPaths
{
var departmentNameField = [[CPTextField alloc] init];
@@ -482,6 +508,22 @@
[self assertTrue:[[arrayController arrangedObjects] count] > 0];
}
/**
In a table with arranged contents like [1, 1, 2, 1], selecting the second '1' and removing it
should result in [1, 2, 1] - not [2]. E.g. we don't use removeObject:1 but only remove the
actually selected instance.
*/
- (void)testRemove_OneOfMultipleEqualObjects
{
var ac = [CPArrayController new],
contentArray = [1, 1, 2, 1];
[ac setContent:contentArray];
[self assert:[1, 1, 2, 1] equals:[ac arrangedObjects]];
[ac setSelectionIndexes:[CPIndexSet indexSetWithIndex:1]];
[ac remove:nil];
[self assert:[1, 2, 1] equals:[ac arrangedObjects] message:"only one copy of 1 removed + the right copy should be removed"];
}
- (void)observeValueForKeyPath:keyPath
ofObject:anActivity
change:change
+23
View File
@@ -249,6 +249,29 @@
CPLog(@"here: "+aKeyPath+" value: "+[anObject valueForKey:aKeyPath]);
}
- (void)testSuppressNotification
{
var control = [[CPTextField alloc] init],
anotherControl = [[CPTextField alloc] init];
[control setStringValue:@"brown"];
[control bind:CPValueBinding toObject:self withKeyPath:@"FOO" options:nil];
[self setValue:@"green" forKeyPath:@"FOO"];
[self assert:@"green" equals:[control stringValue] message:@"normal binding action"];
var binding = [CPBinder getBinding:CPValueBinding forObject:control];
[binding suppressSpecificNotificationFromObject:self keyPath:@"FOO"];
[self setValue:@"orange" forKeyPath:@"FOO"];
[self assert:@"green" equals:[control stringValue] message:@"binding update suppressed"];
[binding unsuppressSpecificNotificationFromObject:anotherControl keyPath:@"FOO"];
[self setValue:@"blue" forKeyPath:@"FOO"];
[self assert:@"green" equals:[control stringValue] message:@"binding update still suppressed"];
[binding unsuppressSpecificNotificationFromObject:self keyPath:@"FOO"];
[self setValue:@"octarine" forKeyPath:@"FOO"];
[self assert:@"octarine" equals:[control stringValue] message:@"binding update no longer suppressed"];
}
@end
@implementation BindingTester : CPObject
-22
View File
@@ -189,28 +189,6 @@
[self assertTrue:[pred evaluateWithObject:dict] message:"'"+ [pred description] + "' should be true"];
}
- (void)testBeginsWithEndsWithPredicate
{
// This always worked
var data = ["To", "Tom", "Tomb", "Tomboy"],
pred = [CPPredicate predicateWithFormat:@"SELF beginsWith 'To'"],
result = [data filteredArrayUsingPredicate:pred];
[self assertTrue:result.length === 4 message:"'" + [pred description] + "' should return [\"To\", \"Tom\", \"Tomb\", \"Tomboy\"]"];
// Make sure beginsWith comparison string longer than source strings works
pred = [CPPredicate predicateWithFormat:@"SELF beginsWith 'Tomb'"];
result = [data filteredArrayUsingPredicate:pred];
[self assertTrue:[result isEqual:["Tomb", "Tomboy"]] message:"'" + [pred description] + "' should return [\"Tomb\", \"Tomboy\"]"];
// Make sure endsWith comparison string longer than source strings works
pred = [CPPredicate predicateWithFormat:@"SELF endsWith 'boy'"];
result = [data filteredArrayUsingPredicate:pred];
[self assertTrue:[result isEqual:["Tomboy"]] message:"'" + [pred description] + "' should return [\"Tomboy\"]"];
}
- (void)testNilComparisons
{
// Custom Selector Predicate
+17 -1
View File
@@ -18,6 +18,7 @@ CPUserDefaultsTestKey2 = @"KEY2";
@implementation CPUserDefaultsTest : OJTestCase
{
CPUserDefaults target;
id lastObservedCPUserDefaultsTestKey1;
}
- (void)setUp
@@ -40,7 +41,6 @@ CPUserDefaultsTestKey2 = @"KEY2";
}
- (void)testSetObjectForKey
{
[target setObject:[CPArray arrayWithObjects:@"cell1", @"cell2"] forKey:CPUserDefaultsTestKey1];
@@ -133,7 +133,23 @@ CPUserDefaultsTestKey2 = @"KEY2";
[target removeObjectForKey:CPUserDefaultsTestKey1];
[self assert:[target dataForKey:CPUserDefaultsTestKey1] equals:nil];
}
- (void)testNotification
{
[target setDouble:5.0 forKey:CPUserDefaultsTestKey1];
[[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(userDefaultsDidChange:) name:CPUserDefaultsDidChangeNotification object:target];
// Prod the class to resolve any outstanding _searchListNeedsReload's.
[self assert:5.0 equals:[target objectForKey:CPUserDefaultsTestKey1] message:"normal read"];
[target setDouble:10.0 forKey:CPUserDefaultsTestKey1];
[self assert:[target objectForKey:CPUserDefaultsTestKey1] equals:lastObservedCPUserDefaultsTestKey1 message:"should observe new value"];
}
- (void)userDefaultsDidChange:(CPNotification)aNotification
{
lastObservedCPUserDefaultsTestKey1 = [target objectForKey:CPUserDefaultsTestKey1];
}
@end
@@ -1,80 +0,0 @@
/*
* AppController.j
* test
*
* Created by aparajita on May 19, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/CPObject.j>
function formatter(aString, aLevel, aTitle)
{
return aString;
}
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
CPView simpleColor;
CPView patternColor;
CPView threePartColor;
CPView ninePartColor;
CPImage imageView;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (void)awakeFromCib
{
CPLogRegister(CPLogConsole, null, formatter);
// In this case, we want the window from Cib to become our full browser window
[theWindow setFullPlatformWindow:YES];
var color = [CPColor colorWithHexString:@"88B3FF"];
CPLog([color description]);
[simpleColor setBackgroundColor:color];
color = CPColorWithImages("wheel_button.png", 32, 32, [CPBundle bundleForClass:[CPView class]]);
CPLog([color description]);
[patternColor setBackgroundColor:color];
var bundle = [CPBundle bundleForClass:[CPView class]];
color = CPColorWithImages([
["Aristo.blend/Resources/button-bezel-left.png", 4, 24, bundle],
["Aristo.blend/Resources/button-bezel-center.png", 1, 24, bundle],
["Aristo.blend/Resources/button-bezel-right.png", 4, 24, bundle]
]);
CPLog([color description]);
[threePartColor setBackgroundColor:color];
color = CPColorWithImages([
["Aristo.blend/Resources/textfield-bezel-square-focused-0.png", 7, 7, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-1.png", 1, 7, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-2.png", 7, 7, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-3.png", 7, 1, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-4.png", 1, 1, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-5.png", 7, 1, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-6.png", 7, 7, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-7.png", 1, 7, bundle],
["Aristo.blend/Resources/textfield-bezel-square-focused-8.png", 7, 7, bundle],
]);
CPLog([color description]);
[ninePartColor setBackgroundColor:color];
var image = CPImageInBundle("add1-32.png", CGSizeMake(32, 32));
CPLog([image description]);
[imageView setImage:image];
}
@end
@@ -1,10 +0,0 @@
<?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>CPColor-CPImage-description</string>
</dict>
</plist>
@@ -1,94 +0,0 @@
/*
* Jakefile
* test
*
* Created by aparajita on May 19, 2011.
* Copyright 2011, Victory-Heart Productions 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");
app ("test", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("test");
task.setIdentifier("com.aparajita.test");
task.setVersion("1.0");
task.setAuthor("Victory-Heart Productions");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("test");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["test"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "test"));
OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "test"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "test"));
print("----------------------------");
}
File diff suppressed because one or more lines are too long
@@ -1,654 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10J869</string>
<string key="IBDocument.InterfaceBuilderVersion">804</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">804</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="372"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1050">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{335, 370}, {389, 380}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="439893737">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="1066696903">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 297}, {159, 36}}</string>
<reference key="NSSuperview" ref="439893737"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSTextField" id="385245898">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{47, 307}, {82, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="12386750">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Simple color</string>
<object class="NSFont" key="NSSupport" id="710279137">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="385245898"/>
<object class="NSColor" key="NSBackgroundColor" id="616930867">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="968014435">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSCustomView" id="605260233">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 243}, {159, 36}}</string>
<reference key="NSSuperview" ref="439893737"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSTextField" id="179895693">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{47, 253}, {85, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="222300836">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Pattern color</string>
<reference key="NSSupport" ref="710279137"/>
<reference key="NSControlView" ref="179895693"/>
<reference key="NSBackgroundColor" ref="616930867"/>
<reference key="NSTextColor" ref="968014435"/>
</object>
</object>
<object class="NSCustomView" id="688674788">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 186}, {159, 36}}</string>
<reference key="NSSuperview" ref="439893737"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSTextField" id="63869060">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{47, 196}, {85, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="828490958">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">3-part color</string>
<reference key="NSSupport" ref="710279137"/>
<reference key="NSControlView" ref="63869060"/>
<reference key="NSBackgroundColor" ref="616930867"/>
<reference key="NSTextColor" ref="968014435"/>
</object>
</object>
<object class="NSCustomView" id="100716157">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{151, 130}, {159, 36}}</string>
<reference key="NSSuperview" ref="439893737"/>
<string key="NSClassName">NSView</string>
</object>
<object class="NSTextField" id="488609560">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{47, 140}, {85, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="548167261">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">9-part color</string>
<reference key="NSSupport" ref="710279137"/>
<reference key="NSControlView" ref="488609560"/>
<reference key="NSBackgroundColor" ref="616930867"/>
<reference key="NSTextColor" ref="968014435"/>
</object>
</object>
<object class="NSTextField" id="696346150">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{47, 84}, {85, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="30856995">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Image</string>
<reference key="NSSupport" ref="710279137"/>
<reference key="NSControlView" ref="696346150"/>
<reference key="NSBackgroundColor" ref="616930867"/>
<reference key="NSTextColor" ref="968014435"/>
</object>
</object>
<object class="NSImageView" id="276994718">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<object class="NSMutableSet" key="NSDragTypes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="set.sortedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>Apple PDF pasteboard type</string>
<string>Apple PICT pasteboard type</string>
<string>Apple PNG pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
</object>
</object>
<string key="NSFrame">{{148, 68}, {48, 48}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSImageCell" key="NSCell" id="334634827">
<int key="NSCellFlags">130560</int>
<int key="NSCellFlags2">33554432</int>
<int key="NSAlign">0</int>
<int key="NSScale">2</int>
<int key="NSStyle">0</int>
<bool key="NSAnimates">NO</bool>
</object>
<bool key="NSEditable">YES</bool>
</object>
</object>
<string key="NSFrameSize">{389, 380}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
<object class="NSCustomObject" id="635946545">
<string key="NSClassName">AppController</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="635946545"/>
</object>
<int key="connectionID">451</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">theWindow</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="972006081"/>
</object>
<int key="connectionID">459</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">ninePartColor</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="100716157"/>
</object>
<int key="connectionID">480</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">threePartColor</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="688674788"/>
</object>
<int key="connectionID">481</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">patternColor</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="605260233"/>
</object>
<int key="connectionID">482</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">simpleColor</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="1066696903"/>
</object>
<int key="connectionID">483</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">imageView</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="276994718"/>
</object>
<int key="connectionID">490</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<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="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="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="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">371</int>
<reference key="object" ref="972006081"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="439893737"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">372</int>
<reference key="object" ref="439893737"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="385245898"/>
<reference ref="1066696903"/>
<reference ref="605260233"/>
<reference ref="179895693"/>
<reference ref="688674788"/>
<reference ref="63869060"/>
<reference ref="100716157"/>
<reference ref="488609560"/>
<reference ref="696346150"/>
<reference ref="276994718"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">450</int>
<reference key="object" ref="635946545"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">468</int>
<reference key="object" ref="1066696903"/>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">469</int>
<reference key="object" ref="385245898"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="12386750"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">470</int>
<reference key="object" ref="12386750"/>
<reference key="parent" ref="385245898"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">471</int>
<reference key="object" ref="605260233"/>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">472</int>
<reference key="object" ref="179895693"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="222300836"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">473</int>
<reference key="object" ref="222300836"/>
<reference key="parent" ref="179895693"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">474</int>
<reference key="object" ref="688674788"/>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">475</int>
<reference key="object" ref="63869060"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="828490958"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">476</int>
<reference key="object" ref="828490958"/>
<reference key="parent" ref="63869060"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">477</int>
<reference key="object" ref="100716157"/>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">478</int>
<reference key="object" ref="488609560"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="548167261"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">479</int>
<reference key="object" ref="548167261"/>
<reference key="parent" ref="488609560"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">485</int>
<reference key="object" ref="696346150"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="30856995"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">486</int>
<reference key="object" ref="30856995"/>
<reference key="parent" ref="696346150"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">487</int>
<reference key="object" ref="276994718"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="334634827"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">488</int>
<reference key="object" ref="334634827"/>
<reference key="parent" ref="276994718"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-3.IBPluginDependency</string>
<string>371.IBEditorWindowLastContentRect</string>
<string>371.IBPluginDependency</string>
<string>371.IBViewEditorWindowController.showingBoundsRectangles</string>
<string>371.IBViewEditorWindowController.showingLayoutRectangles</string>
<string>371.IBWindowTemplateEditedContentRect</string>
<string>371.NSWindowTemplate.visibleAtLaunch</string>
<string>371.editorWindowContentRectSynchronizationRect</string>
<string>372.IBPluginDependency</string>
<string>468.IBPluginDependency</string>
<string>468.IBViewBoundsToFrameTransform</string>
<string>469.IBPluginDependency</string>
<string>469.IBViewBoundsToFrameTransform</string>
<string>470.IBPluginDependency</string>
<string>471.IBPluginDependency</string>
<string>471.IBViewBoundsToFrameTransform</string>
<string>472.IBPluginDependency</string>
<string>472.IBViewBoundsToFrameTransform</string>
<string>473.IBPluginDependency</string>
<string>474.IBPluginDependency</string>
<string>474.IBViewBoundsToFrameTransform</string>
<string>475.IBPluginDependency</string>
<string>475.IBViewBoundsToFrameTransform</string>
<string>476.IBPluginDependency</string>
<string>477.IBPluginDependency</string>
<string>477.IBViewBoundsToFrameTransform</string>
<string>478.IBPluginDependency</string>
<string>478.IBViewBoundsToFrameTransform</string>
<string>479.IBPluginDependency</string>
<string>485.IBPluginDependency</string>
<string>485.IBViewBoundsToFrameTransform</string>
<string>486.IBPluginDependency</string>
<string>487.IBPluginDependency</string>
<string>488.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{432, 718}, {389, 380}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES"/>
<boolean value="YES"/>
<string>{{432, 718}, {389, 380}}</string>
<integer value="1"/>
<string>{{33, 99}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUMXAABDm4AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCPAAAw6gAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUMXAABDgIAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCPAAAw40AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUMXAABDSAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCPAAAw2EAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">AUMXAABDAgAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCPAAAwxsAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCUAAAwxYAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">490</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<object class="NSMutableDictionary" key="outlets">
<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">IBProjectSource</string>
<string key="minorKey">./Classes/AppController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>imageView</string>
<string>ninePartColor</string>
<string>patternColor</string>
<string>simpleColor</string>
<string>threePartColor</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>imageView</string>
<string>ninePartColor</string>
<string>patternColor</string>
<string>simpleColor</string>
<string>threePartColor</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">imageView</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">ninePartColor</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">patternColor</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">simpleColor</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">threePartColor</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<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>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,103 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
test
Created by aparajita on May 19, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>CPColor-CPImage-description</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</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:
// 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);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,77 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
test
Created by aparajita on May 19, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>CPColor-CPImage-description</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,18 +0,0 @@
/*
* AppController.j
* test
*
* Created by aparajita on May 19, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
@@ -1,43 +0,0 @@
/*
* AppController.j
* RuntimeAttributesTest
*
* Created by Aparajita Fishman on March 26, 2011.
* Copyright 2009, 280 North, Inc. All rights reserved.
*/
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
CPWindow theWindow; //this "outlet" is connected automatically by the Cib
CPView firstResponder;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (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];
}
- (void)setInitialResponder:(CPInteger)tag
{
[theWindow setInitialFirstResponder:[[theWindow contentView] viewWithTag:tag]];
}
- (void)setValue:(id)value forUndefinedKey:(CPString)key
{
console.log("setValue:" + value + " forKey:" + key);
}
@end
@@ -1,10 +0,0 @@
<?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>RuntimeAttributesTest</string>
</dict>
</plist>
@@ -1,94 +0,0 @@
/*
* Jakefile
* test
*
* Created by aparajita on March 26, 2011.
* Copyright 2011, Victory-Heart Productions 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");
app ("test", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("test");
task.setIdentifier("com.aparajitaworld.test");
task.setVersion("1.0");
task.setAuthor("Victory-Heart Productions");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("test");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["test"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "test"));
OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "test"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "test"));
print("----------------------------");
}
File diff suppressed because one or more lines are too long
@@ -1,609 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10J869</string>
<string key="IBDocument.InterfaceBuilderVersion">804</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">804</string>
</object>
<array class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<integer value="24"/>
</array>
<array key="IBDocument.PluginDependencies">
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</array>
<dictionary class="NSMutableDictionary" key="IBDocument.Metadata"/>
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<object class="NSCustomObject" id="1001">
<string key="NSClassName">NSObject</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="673890665">
<string key="NSClassName">AppController</string>
</object>
<object class="NSWindowTemplate" id="917316023">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{162, 992}, {548, 314}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">RuntimeAttributes Test</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="412280178">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="332976459">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{37, 187}, {118, 25}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="941203667">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">button</string>
<object class="NSFont" key="NSSupport" id="28800349">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="332976459"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="361072273">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{37, 148}, {118, 25}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="431597734">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">disabled</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="361072273"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSTextField" id="920139093">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{37, 99}, {118, 22}}</string>
<reference key="NSSuperview" ref="412280178"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="224672534">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="920139093"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="339930237">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textBackgroundColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="702864141">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor" id="369941818">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSTextField" id="138511613">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{37, 53}, {118, 22}}</string>
<reference key="NSSuperview" ref="412280178"/>
<int key="NSTag">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="515815898">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="138511613"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="339930237"/>
<reference key="NSTextColor" ref="702864141"/>
</object>
</object>
<object class="NSTextField" id="957450672">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{179, 194}, {166, 17}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="536930828">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">This button's title was set</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="957450672"/>
<object class="NSColor" key="NSBackgroundColor" id="893262643">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="1038132650">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<reference key="NSColor" ref="369941818"/>
</object>
</object>
</object>
<object class="NSTextField" id="529909268">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{34, 249}, {389, 45}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1030502695">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">272629760</int>
<string key="NSContents">See the User Defined Runtime Attributes for each view below and for the AppController to see the effect.</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="529909268"/>
<reference key="NSBackgroundColor" ref="893262643"/>
<reference key="NSTextColor" ref="1038132650"/>
</object>
</object>
<object class="NSTextField" id="1027602674">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{179, 156}, {166, 17}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="861810273">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">This button was disabled</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="1027602674"/>
<reference key="NSBackgroundColor" ref="893262643"/>
<reference key="NSTextColor" ref="1038132650"/>
</object>
</object>
<object class="NSTextField" id="440736310">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{179, 101}, {255, 17}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="464063783">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">This ordinarily would be first responder</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="440736310"/>
<reference key="NSBackgroundColor" ref="893262643"/>
<reference key="NSTextColor" ref="1038132650"/>
</object>
</object>
<object class="NSTextField" id="646490210">
<reference key="NSNextResponder" ref="412280178"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{179, 22}, {352, 51}}</string>
<reference key="NSSuperview" ref="412280178"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="393618729">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">272629760</int>
<string type="base64-UTF8" key="NSContents">VGhpcyB3YXMgc2V0IHRvIGJlIGZpcnN0IHJlc3BvbmRlciBieSB0aGUKQXBwQ29udHJvbGxlciAtc2V0
SW5pdGlhbEZpcnN0UmVzcG9uZGVyIG1ldGhvZA</string>
<reference key="NSSupport" ref="28800349"/>
<reference key="NSControlView" ref="646490210"/>
<reference key="NSBackgroundColor" ref="893262643"/>
<reference key="NSTextColor" ref="1038132650"/>
</object>
</object>
</array>
<string key="NSFrameSize">{548, 314}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
</array>
<object class="IBObjectContainer" key="IBDocument.Objects">
<array class="NSMutableArray" key="connectionRecords">
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="673890665"/>
</object>
<int key="connectionID">10</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">theWindow</string>
<reference key="source" ref="673890665"/>
<reference key="destination" ref="917316023"/>
</object>
<int key="connectionID">25</int>
</object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
<object class="IBObjectRecord">
<int key="objectID">0</int>
<array key="object" id="0"/>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<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="1003"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="673890665"/>
<reference key="parent" ref="0"/>
<string key="objectName">App Controller</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
<reference key="object" ref="917316023"/>
<array class="NSMutableArray" key="children">
<reference ref="412280178"/>
</array>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="412280178"/>
<array class="NSMutableArray" key="children">
<reference ref="332976459"/>
<reference ref="361072273"/>
<reference ref="920139093"/>
<reference ref="138511613"/>
<reference ref="1027602674"/>
<reference ref="440736310"/>
<reference ref="646490210"/>
<reference ref="957450672"/>
<reference ref="529909268"/>
</array>
<reference key="parent" ref="917316023"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">26</int>
<reference key="object" ref="332976459"/>
<array class="NSMutableArray" key="children">
<reference ref="941203667"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">27</int>
<reference key="object" ref="941203667"/>
<reference key="parent" ref="332976459"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">32</int>
<reference key="object" ref="920139093"/>
<array class="NSMutableArray" key="children">
<reference ref="224672534"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">33</int>
<reference key="object" ref="224672534"/>
<reference key="parent" ref="920139093"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">34</int>
<reference key="object" ref="138511613"/>
<array class="NSMutableArray" key="children">
<reference ref="515815898"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">35</int>
<reference key="object" ref="515815898"/>
<reference key="parent" ref="138511613"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">36</int>
<reference key="object" ref="361072273"/>
<array class="NSMutableArray" key="children">
<reference ref="431597734"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">37</int>
<reference key="object" ref="431597734"/>
<reference key="parent" ref="361072273"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">39</int>
<reference key="object" ref="957450672"/>
<array class="NSMutableArray" key="children">
<reference ref="536930828"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">40</int>
<reference key="object" ref="536930828"/>
<reference key="parent" ref="957450672"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">41</int>
<reference key="object" ref="1027602674"/>
<array class="NSMutableArray" key="children">
<reference ref="861810273"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">42</int>
<reference key="object" ref="861810273"/>
<reference key="parent" ref="1027602674"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">43</int>
<reference key="object" ref="440736310"/>
<array class="NSMutableArray" key="children">
<reference ref="464063783"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">44</int>
<reference key="object" ref="464063783"/>
<reference key="parent" ref="440736310"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">45</int>
<reference key="object" ref="646490210"/>
<array class="NSMutableArray" key="children">
<reference ref="393618729"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">46</int>
<reference key="object" ref="393618729"/>
<reference key="parent" ref="646490210"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">47</int>
<reference key="object" ref="529909268"/>
<array class="NSMutableArray" key="children">
<reference ref="1030502695"/>
</array>
<reference key="parent" ref="412280178"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">48</int>
<reference key="object" ref="1030502695"/>
<reference key="parent" ref="529909268"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="23.IBEditorWindowLastContentRect">{{719, 660}, {548, 314}}</string>
<string key="23.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="23.IBWindowTemplateEditedContentRect">{{719, 660}, {548, 314}}</string>
<boolean value="YES" key="23.NSWindowTemplate.visibleAtLaunch"/>
<string key="24.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary" key="26.IBAttributePlaceholdersKey">
<string key="NS.key.0">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<object class="IBUserDefinedRuntimeAttributesPlaceholder" key="NS.object.0">
<string key="name">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<reference key="object" ref="332976459"/>
<array key="userDefinedRuntimeAttributes">
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.boolean</string>
<string key="keyPath">hidden</string>
<boolean value="NO" key="value"/>
</object>
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.string</string>
<string key="keyPath">title</string>
<string key="value">Hello!</string>
</object>
</array>
</object>
</object>
<string key="26.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="26.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCDAAAw3IAAA</bytes>
</object>
<string key="27.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="32.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="32.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCFAAAwsgAAA</bytes>
</object>
<string key="33.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="34.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="34.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCDAAAwtIAAA</bytes>
</object>
<string key="35.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary" key="36.IBAttributePlaceholdersKey">
<string key="NS.key.0">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<object class="IBUserDefinedRuntimeAttributesPlaceholder" key="NS.object.0">
<string key="name">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<reference key="object" ref="361072273"/>
<array key="userDefinedRuntimeAttributes">
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.boolean</string>
<string key="keyPath">enabled</string>
<boolean value="NO" key="value"/>
</object>
</array>
</object>
</object>
<string key="36.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="36.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCDAAAw0sAAA</bytes>
</object>
<string key="37.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="39.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="39.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDMwAAwzwAAA</bytes>
</object>
<string key="40.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="41.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="41.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDMQAAw0oAAA</bytes>
</object>
<string key="42.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="43.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="43.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDMQAAwxQAAA</bytes>
</object>
<string key="44.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="45.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="45.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDMQAAws4AAA</bytes>
</object>
<string key="46.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform" key="47.IBViewBoundsToFrameTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCCAAAw5MAAA</bytes>
</object>
<string key="48.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary" key="9.IBAttributePlaceholdersKey">
<string key="NS.key.0">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<object class="IBUserDefinedRuntimeAttributesPlaceholder" key="NS.object.0">
<string key="name">IBUserDefinedRuntimeAttributesPlaceholderName</string>
<reference key="object" ref="673890665"/>
<array key="userDefinedRuntimeAttributes">
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.number</string>
<string key="keyPath">initialResponder</string>
<real value="2" key="value"/>
</object>
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.string</string>
<string key="keyPath">localized</string>
<string key="value">foo</string>
<bool key="localized">YES</bool>
</object>
<object class="IBUserDefinedRuntimeAttribute">
<string key="typeIdentifier">com.apple.InterfaceBuilder.userDefinedRuntimeAttributeType.nil</string>
<string key="keyPath">null</string>
<nil key="value"/>
</object>
</array>
</object>
</object>
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
<int key="maxID">48</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">theWindow</string>
<string key="NS.object.0">id</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">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">delegate</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">delegate</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">delegate</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3200" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,103 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
test
Created by aparajita on March 26, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>RuntimeAttributesTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</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:
// 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);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,77 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
test
Created by aparajita on March 26, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>RuntimeAttributesTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
-18
View File
@@ -1,18 +0,0 @@
/*
* AppController.j
* test
*
* Created by aparajita on March 26, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
@@ -1,145 +0,0 @@
/*
* AppController.j
* performKeyEquivalentTest
*
* Created by aparajita on May 22, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPEvent.j>
var usesNewCode = YES;
@implementation AppController : CPObject
{
CPWindow theWindow;
CPWindow theOtherWindow;
CPCheckBox useNewCode;
CPTextField textField;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
// This is called when the application is done loading.
}
- (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.
[theOtherWindow orderFront:nil];
[theWindow setInitialFirstResponder:textField];
[theWindow makeKeyAndOrderFront:nil];
}
- (void)setUsesNewCode:(id)sender
{
usesNewCode = [sender state] === CPOnState;
}
@end
@implementation MyTextField : CPTextField
- (void)keyDown:(CPEvent)anEvent
{
CPLog("keyDown:%s", [self description]);
if (!usesNewCode)
{
if ([anEvent _couldBeKeyEquivalent] && [self performKeyEquivalent:anEvent])
return;
}
// CPTextField uses an HTML input element to take the input so we need to
// propagate the dom event so the element is updated. This has to be done
// before interpretKeyEvents: though so individual commands have a chance
// to override this (escape to clear the text in a search field for example).
[[[self window] platformWindow] _propagateCurrentDOMEvent:YES];
[self interpretKeyEvents:[anEvent]];
[[CPRunLoop currentRunLoop] limitDateForMode:CPDefaultRunLoopMode];
}
- (BOOL)performKeyEquivalent:(CPEvent)anEvent
{
CPLog("performKeyEquivalent:%s", [self description]);
return [super performKeyEquivalent:anEvent];
}
@end
@implementation CPEvent (test)
- (BOOL)_couldBeKeyEquivalent
{
if (_type !== CPKeyDown)
return NO;
var characterCount = _characters.length;
if (!characterCount)
return NO;
if (_modifierFlags & (CPCommandKeyMask | CPControlKeyMask))
return YES;
// Cocoa does not consider space, backspace, or escape a key equivalent
// if the first responder is a text field (presumably a subclass of NSText).
var firstResponderIsText = [[_window firstResponder] isKindOfClass:[CPTextField class]];
for (var i = 0; i < characterCount; i++)
{
if (usesNewCode)
{
var c = _characters.charAt(i);
if ((c >= CPUpArrowFunctionKey && c <= CPModeSwitchFunctionKey) ||
c === CPEnterCharacter ||
c === CPNewlineCharacter ||
c === CPCarriageReturnCharacter ||
(!firstResponderIsText &&
(c === CPSpaceFunctionKey ||
c === CPDeleteCharacter ||
c === CPBackspaceCharacter ||
c === CPEscapeFunctionKey)))
{
return YES;
}
}
else
{
switch (_characters.charAt(i))
{
case CPBackspaceCharacter:
case CPDeleteCharacter:
case CPDeleteFunctionKey:
case CPTabCharacter:
case CPCarriageReturnCharacter:
case CPNewlineCharacter:
case CPSpaceFunctionKey:
case CPEscapeFunctionKey:
case CPPageUpFunctionKey:
case CPPageDownFunctionKey:
case CPLeftArrowFunctionKey:
case CPUpArrowFunctionKey:
case CPRightArrowFunctionKey:
case CPDownArrowFunctionKey:
case CPEndFunctionKey:
case CPHomeFunctionKey:
return YES;
}
}
}
// FIXME: More cases?
return NO;
}
@end
@@ -1,10 +0,0 @@
<?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>performKeyEquivalentTest</string>
</dict>
</plist>
@@ -1,94 +0,0 @@
/*
* Jakefile
* performKeyEquivalentTest
*
* Created by aparajita on May 22, 2011.
* Copyright 2011, Victory-Heart Productions 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");
app ("performKeyEquivalentTest", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "performKeyEquivalentTest.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("performKeyEquivalentTest");
task.setIdentifier("com.aparajita.performKeyEquivalentTest");
task.setVersion("1.0");
task.setAuthor("Victory-Heart Productions");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("performKeyEquivalentTest");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["performKeyEquivalentTest"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "performKeyEquivalentTest", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "performKeyEquivalentTest", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "performKeyEquivalentTest"));
OS.system(["press", "-f", FILE.join("Build", "Release", "performKeyEquivalentTest"), FILE.join("Build", "Deployment", "performKeyEquivalentTest")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "performKeyEquivalentTest"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "performKeyEquivalentTest"), FILE.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "performKeyEquivalentTest", "performKeyEquivalentTest.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "performKeyEquivalentTest"));
print("----------------------------");
}
File diff suppressed because one or more lines are too long
@@ -1,862 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10J869</string>
<string key="IBDocument.InterfaceBuilderVersion">804</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">804</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="371"/>
<integer value="475"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1050">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{100, 1000}, {480, 360}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">Text + Buttons</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="439893737">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="160623561">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{189, 290}, {96, 22}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="46991665">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<object class="NSFont" key="NSSupport" id="455972270">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="160623561"/>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSColor" key="NSBackgroundColor" id="465635440">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textBackgroundColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MQA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor" id="403720344">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">textColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSTextField" id="215024340">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{189, 237}, {96, 22}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="894772288">
<int key="NSCellFlags">-1804468671</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents"/>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="215024340"/>
<bool key="NSDrawsBackground">YES</bool>
<reference key="NSBackgroundColor" ref="465635440"/>
<reference key="NSTextColor" ref="403720344"/>
</object>
</object>
<object class="NSButton" id="962787846">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{187, 178}, {109, 18}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="679700256">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Use new code</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="962787846"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSSwitch</string>
</object>
<object class="NSButtonImageSource" key="NSAlternateImage">
<string key="NSImageName">NSSwitch</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
<object class="NSButton" id="995743194">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{106, 99}, {118, 25}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="599889457">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Escape</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="995743194"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="610457973">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{258, 99}, {118, 25}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="432442054">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Backspace</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="610457973"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"></string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="905278565">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{106, 58}, {118, 25}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="527208717">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Space</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="905278565"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">IA</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="106930791">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{258, 58}, {118, 25}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="165714669">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Down arrow</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="106930791"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"></string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
</object>
<string key="NSFrameSize">{480, 360}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
<object class="NSCustomObject" id="635946545">
<string key="NSClassName">AppController</string>
</object>
<object class="NSWindowTemplate" id="264185350">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{700, 1000}, {480, 360}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">Buttons</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="841164116">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="1039086975">
<reference key="NSNextResponder" ref="841164116"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{106, 99}, {118, 25}}</string>
<reference key="NSSuperview" ref="841164116"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="536067330">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Escape</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="1039086975"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">Gw</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="949576017">
<reference key="NSNextResponder" ref="841164116"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{258, 99}, {118, 25}}</string>
<reference key="NSSuperview" ref="841164116"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1006898495">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Backspace</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="949576017"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"></string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="928640245">
<reference key="NSNextResponder" ref="841164116"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{106, 58}, {118, 25}}</string>
<reference key="NSSuperview" ref="841164116"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="246606737">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Space</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="928640245"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string type="base64-UTF8" key="NSKeyEquivalent">IA</string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSButton" id="37863177">
<reference key="NSNextResponder" ref="841164116"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{258, 58}, {118, 25}}</string>
<reference key="NSSuperview" ref="841164116"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="160250892">
<int key="NSCellFlags">-2080244224</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Down arrow</string>
<reference key="NSSupport" ref="455972270"/>
<reference key="NSControlView" ref="37863177"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"></string>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
</object>
<string key="NSFrameSize">{480, 360}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="635946545"/>
</object>
<int key="connectionID">451</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">theWindow</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="972006081"/>
</object>
<int key="connectionID">459</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">useNewCode</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="962787846"/>
</object>
<int key="connectionID">465</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">setUsesNewCode:</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="962787846"/>
</object>
<int key="connectionID">466</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">theOtherWindow</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="264185350"/>
</object>
<int key="connectionID">492</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">textField</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="160623561"/>
</object>
<int key="connectionID">493</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<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="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="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="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">371</int>
<reference key="object" ref="972006081"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="439893737"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">372</int>
<reference key="object" ref="439893737"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="160623561"/>
<reference ref="215024340"/>
<reference ref="962787846"/>
<reference ref="995743194"/>
<reference ref="610457973"/>
<reference ref="905278565"/>
<reference ref="106930791"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">450</int>
<reference key="object" ref="635946545"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">456</int>
<reference key="object" ref="160623561"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="46991665"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">457</int>
<reference key="object" ref="46991665"/>
<reference key="parent" ref="160623561"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">460</int>
<reference key="object" ref="215024340"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="894772288"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">461</int>
<reference key="object" ref="894772288"/>
<reference key="parent" ref="215024340"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">462</int>
<reference key="object" ref="962787846"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="679700256"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">463</int>
<reference key="object" ref="679700256"/>
<reference key="parent" ref="962787846"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">467</int>
<reference key="object" ref="995743194"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="599889457"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">468</int>
<reference key="object" ref="599889457"/>
<reference key="parent" ref="995743194"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">469</int>
<reference key="object" ref="610457973"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="432442054"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">470</int>
<reference key="object" ref="432442054"/>
<reference key="parent" ref="610457973"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">471</int>
<reference key="object" ref="905278565"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="527208717"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">472</int>
<reference key="object" ref="106930791"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="165714669"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">473</int>
<reference key="object" ref="165714669"/>
<reference key="parent" ref="106930791"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">474</int>
<reference key="object" ref="527208717"/>
<reference key="parent" ref="905278565"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">475</int>
<reference key="object" ref="264185350"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="841164116"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">476</int>
<reference key="object" ref="841164116"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="37863177"/>
<reference ref="928640245"/>
<reference ref="949576017"/>
<reference ref="1039086975"/>
</object>
<reference key="parent" ref="264185350"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">477</int>
<reference key="object" ref="37863177"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="160250892"/>
</object>
<reference key="parent" ref="841164116"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">478</int>
<reference key="object" ref="928640245"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="246606737"/>
</object>
<reference key="parent" ref="841164116"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">479</int>
<reference key="object" ref="949576017"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="1006898495"/>
</object>
<reference key="parent" ref="841164116"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">480</int>
<reference key="object" ref="1039086975"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="536067330"/>
</object>
<reference key="parent" ref="841164116"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">487</int>
<reference key="object" ref="536067330"/>
<reference key="parent" ref="1039086975"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">488</int>
<reference key="object" ref="1006898495"/>
<reference key="parent" ref="949576017"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">489</int>
<reference key="object" ref="246606737"/>
<reference key="parent" ref="928640245"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">490</int>
<reference key="object" ref="160250892"/>
<reference key="parent" ref="37863177"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-3.IBPluginDependency</string>
<string>371.IBEditorWindowLastContentRect</string>
<string>371.IBPluginDependency</string>
<string>371.IBWindowTemplateEditedContentRect</string>
<string>371.NSWindowTemplate.visibleAtLaunch</string>
<string>371.editorWindowContentRectSynchronizationRect</string>
<string>372.IBPluginDependency</string>
<string>456.CustomClassName</string>
<string>456.IBPluginDependency</string>
<string>456.IBViewBoundsToFrameTransform</string>
<string>457.IBPluginDependency</string>
<string>460.CustomClassName</string>
<string>460.IBPluginDependency</string>
<string>460.IBViewBoundsToFrameTransform</string>
<string>461.IBPluginDependency</string>
<string>462.IBPluginDependency</string>
<string>462.IBViewBoundsToFrameTransform</string>
<string>463.IBPluginDependency</string>
<string>467.IBPluginDependency</string>
<string>467.IBViewBoundsToFrameTransform</string>
<string>468.IBPluginDependency</string>
<string>469.IBPluginDependency</string>
<string>469.IBViewBoundsToFrameTransform</string>
<string>470.IBPluginDependency</string>
<string>471.IBPluginDependency</string>
<string>471.IBViewBoundsToFrameTransform</string>
<string>472.IBPluginDependency</string>
<string>472.IBViewBoundsToFrameTransform</string>
<string>473.IBPluginDependency</string>
<string>474.IBPluginDependency</string>
<string>475.IBEditorWindowLastContentRect</string>
<string>475.IBPluginDependency</string>
<string>475.IBWindowTemplateEditedContentRect</string>
<string>475.NSWindowTemplate.visibleAtLaunch</string>
<string>475.editorWindowContentRectSynchronizationRect</string>
<string>476.IBPluginDependency</string>
<string>477.IBPluginDependency</string>
<string>477.IBViewBoundsToFrameTransform</string>
<string>478.IBPluginDependency</string>
<string>478.IBViewBoundsToFrameTransform</string>
<string>479.IBPluginDependency</string>
<string>479.IBViewBoundsToFrameTransform</string>
<string>480.IBPluginDependency</string>
<string>480.IBViewBoundsToFrameTransform</string>
<string>487.IBPluginDependency</string>
<string>488.IBPluginDependency</string>
<string>489.IBPluginDependency</string>
<string>490.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{438, 784}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{438, 784}, {480, 360}}</string>
<boolean value="NO"/>
<string>{{33, 99}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>MyTextField</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDQAAAw4IAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>MyTextField</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDQAAAw08AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDPgAAwxAAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABC1AAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDgQAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABC1AAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDgQAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{940, 784}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{940, 784}, {480, 360}}</string>
<boolean value="NO"/>
<string>{{33, 99}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDgQAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABC1AAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDgQAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABC1AAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">493</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<object class="NSMutableDictionary" key="outlets">
<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">IBProjectSource</string>
<string key="minorKey">./Classes/AppController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">setUsesNewCode:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">setUsesNewCode:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">setUsesNewCode:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>textField</string>
<string>theOtherWindow</string>
<string>useNewCode</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>NSWindow</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>textField</string>
<string>theOtherWindow</string>
<string>useNewCode</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">textField</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">theOtherWindow</string>
<string key="candidateClassName">NSWindow</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">useNewCode</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MyTextField</string>
<string key="superclassName">NSTextField</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<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>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">NSSwitch</string>
<string key="NS.object.0">{15, 15}</string>
</object>
</data>
</archive>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,103 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
performKeyEquivalentTest
Created by aparajita on May 22, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>performKeyEquivalentTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</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:
// 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);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading performKeyEquivalentTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,77 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
performKeyEquivalentTest
Created by aparajita on May 22, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>performKeyEquivalentTest</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading performKeyEquivalentTest...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,23 +0,0 @@
/*
* AppController.j
* performKeyEquivalentTest
*
* Created by aparajita on May 22, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
var formatter = function(aString, aTitle, aLevel)
{
return aString;
};
function main(args, namedArgs)
{
CPLogRegister(CPLogConsole, nil, formatter);
CPApplicationMain(args, namedArgs);
}
@@ -1,150 +0,0 @@
/*
* AppController.j
* predicateWithFormat
*
* Created by aparajita on May 25, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/CPObject.j>
var usesNewCode = NO;
@implementation AppController : CPObject
{
CPWindow theWindow;
CPPopUpButton dataMenu;
CPPopUpButton comparisonMenu;
CPPopUpButton nameMenu;
CPTextField resultsField;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
useNewCode = usesNewCode;
}
- (void)awakeFromCib
{
}
- (BOOL)useNewCode
{
return usesNewCode;
}
- (void)setUseNewCode:(BOOL)flag
{
usesNewCode = flag;
}
- (void)search:(id)sender
{
var results = @"";
try
{
var format = [CPString stringWithFormat:@"SELF %@ %%@", [comparisonMenu titleOfSelectedItem]],
predicate = [CPPredicate predicateWithFormat:format, [nameMenu titleOfSelectedItem]],
data = [[dataMenu titleOfSelectedItem]],
searchResults = [data filteredArrayUsingPredicate:predicate],
results = searchResults.join("\n");
[resultsField setTextColor:[CPColor blackColor]];
}
catch (ex)
{
results = [ex reason];
[resultsField setTextColor:[CPColor redColor]];
}
[resultsField setStringValue:@"Result: " + results];
}
@end
var CPComparisonPredicateModifier,
CPPredicateOperatorType;
@implementation CPComparisonPredicate (test)
- (BOOL)_evaluateValue:lhs rightValue:rhs
{
var leftIsNil = (lhs == nil || [lhs isEqual:[CPNull null]]),
rightIsNil = (rhs == nil || [rhs isEqual:[CPNull null]]);
if ((leftIsNil || rightIsNil) && _type != CPCustomSelectorPredicateOperatorType)
return (leftIsNil == rightIsNil &&
(_type == CPEqualToPredicateOperatorType ||
_type == CPLessThanOrEqualToPredicateOperatorType ||
_type == CPGreaterThanOrEqualToPredicateOperatorType));
var string_compare_options = 0;
// left and right should be casted first [CAST()] following 10.5 rules.
switch (_type)
{
case CPLessThanPredicateOperatorType: return ([lhs compare:rhs] == CPOrderedAscending);
case CPLessThanOrEqualToPredicateOperatorType: return ([lhs compare:rhs] != CPOrderedDescending);
case CPGreaterThanPredicateOperatorType: return ([lhs compare:rhs] == CPOrderedDescending);
case CPGreaterThanOrEqualToPredicateOperatorType: return ([lhs compare:rhs] != CPOrderedAscending);
case CPEqualToPredicateOperatorType: return [lhs isEqual:rhs];
case CPNotEqualToPredicateOperatorType: return (![lhs isEqual:rhs]);
case CPMatchesPredicateOperatorType: var commut = (_options & CPCaseInsensitivePredicateOption) ? "gi":"g";
if (_options & CPDiacriticInsensitivePredicateOption)
{
lhs = lhs.stripDiacritics();
rhs = rhs.stripDiacritics();
}
return (new RegExp(rhs,commut)).test(lhs);
case CPLikePredicateOperatorType: if (_options & CPDiacriticInsensitivePredicateOption)
{
lhs = lhs.stripDiacritics();
rhs = rhs.stripDiacritics();
}
var commut = (_options & CPCaseInsensitivePredicateOption) ? "gi":"g",
reg = new RegExp(rhs.escapeForRegExp(),commut);
return reg.test(lhs);
case CPBeginsWithPredicateOperatorType: var range = usesNewCode ? CPMakeRange(0, MIN([lhs length], [rhs length])) : CPMakeRange(0,[rhs length]);
if (_options & CPCaseInsensitivePredicateOption) string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption) string_compare_options |= CPDiacriticInsensitiveSearch;
return ([lhs compare:rhs options:string_compare_options range:range] == CPOrderedSame);
case CPEndsWithPredicateOperatorType: var range = usesNewCode ? CPMakeRange(MAX([lhs length] - [rhs length], 0), MIN([lhs length], [rhs length])) : CPMakeRange([lhs length] - [rhs length],[rhs length]);
if (_options & CPCaseInsensitivePredicateOption) string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption) string_compare_options |= CPDiacriticInsensitiveSearch;
return ([lhs compare:rhs options:string_compare_options range:range] == CPOrderedSame);
case CPCustomSelectorPredicateOperatorType: return [lhs performSelector:_customSelector withObject:rhs];
case CPInPredicateOperatorType: var a = lhs; // swap
lhs = rhs;
rhs = a;
case CPContainsPredicateOperatorType: if (![lhs isKindOfClass:[CPString class]])
{
if (![lhs respondsToSelector: @selector(objectEnumerator)])
[CPException raise:CPInvalidArgumentException reason:@"The left/right hand side for a CONTAINS/IN operator must be a collection or a string"];
return [lhs containsObject:rhs];
}
if (_options & CPCaseInsensitivePredicateOption)
string_compare_options |= CPCaseInsensitiveSearch;
if (_options & CPDiacriticInsensitivePredicateOption)
string_compare_options |= CPDiacriticInsensitiveSearch;
return ([lhs rangeOfString:rhs options:string_compare_options].location != CPNotFound);
case CPBetweenPredicateOperatorType: if ([rhs count] < 2)
[CPException raise:CPInvalidArgumentException reason:@"The right hand side for a BETWEEN operator must contain 2 objects"];
return ([lhs compare:rhs[0]] == CPOrderedDescending && [lhs compare:rhs[1]] == CPOrderedAscending);
default: return NO;
}
}
@end
@@ -1,10 +0,0 @@
<?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>test</string>
</dict>
</plist>
-94
View File
@@ -1,94 +0,0 @@
/*
* Jakefile
* test
*
* Created by aparajita on May 25, 2011.
* Copyright 2011, Victory-Heart Productions 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");
app ("test", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "test.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("test");
task.setIdentifier("com.aparajita.test");
task.setVersion("1.0");
task.setAuthor("Victory-Heart Productions");
task.setEmail("feedback @nospam@ yourcompany.com");
task.setSummary("test");
task.setSources((new FileList("**/*.j")).exclude(FILE.join("Build", "**")));
task.setResources(new FileList("Resources/**"));
task.setIndexFilePath("index.html");
task.setInfoPlistPath("Info.plist");
task.setNib2CibFlags("-R Resources/");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task ("default", ["test"], function()
{
printResults(configuration);
});
task ("build", ["default"]);
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
});
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
});
task ("run", ["debug"], function()
{
OS.system(["open", FILE.join("Build", "Debug", "test", "index.html")]);
});
task ("run-release", ["release"], function()
{
OS.system(["open", FILE.join("Build", "Release", "test", "index.html")]);
});
task ("deploy", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Deployment", "test"));
OS.system(["press", "-f", FILE.join("Build", "Release", "test"), FILE.join("Build", "Deployment", "test")]);
printResults("Deployment")
});
task ("desktop", ["release"], function()
{
FILE.mkdirs(FILE.join("Build", "Desktop", "test"));
require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", "test"), FILE.join("Build", "Desktop", "test", "test.app"));
printResults("Desktop")
});
task ("run-desktop", ["desktop"], function()
{
OS.system([FILE.join("Build", "Desktop", "test", "test.app", "Contents", "MacOS", "NativeHost"), "-i"]);
});
function printResults(configuration)
{
print("----------------------------");
print(configuration+" app built at path: "+FILE.join("Build", configuration, "test"));
print("----------------------------");
}
File diff suppressed because one or more lines are too long
@@ -1,927 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1050</int>
<string key="IBDocument.SystemVersion">10J869</string>
<string key="IBDocument.InterfaceBuilderVersion">804</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">804</string>
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="372"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1050">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{335, 571}, {571, 179}}</string>
<int key="NSWTFlags">1946157056</int>
<string key="NSWindowTitle">Window</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{1.79769e+308, 1.79769e+308}</string>
<object class="NSView" key="NSWindowView" id="439893737">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTextField" id="306506021">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{38, 34}, {321, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="786364694">
<int key="NSCellFlags">68288064</int>
<int key="NSCellFlags2">272630784</int>
<string key="NSContents">Result:</string>
<object class="NSFont" key="NSSupport" id="180276567">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<reference key="NSControlView" ref="306506021"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
</object>
<object class="NSPopUpButton" id="831737273">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{302, 127}, {100, 26}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="502372116">
<int key="NSCellFlags">-2076049856</int>
<int key="NSCellFlags2">2048</int>
<reference key="NSSupport" ref="180276567"/>
<reference key="NSControlView" ref="831737273"/>
<int key="NSButtonFlags">109199615</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
<object class="NSMenuItem" key="NSMenuItem" id="396781444">
<reference key="NSMenu" ref="438705379"/>
<string key="NSTitle">To</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<int key="NSState">1</int>
<object class="NSCustomResource" key="NSOnImage" id="102193233">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuCheckmark</string>
</object>
<object class="NSCustomResource" key="NSMixedImage" id="364966873">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuMixedState</string>
</object>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="502372116"/>
</object>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="438705379">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="396781444"/>
<object class="NSMenuItem" id="435766921">
<reference key="NSMenu" ref="438705379"/>
<string key="NSTitle">om</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="502372116"/>
</object>
<object class="NSMenuItem" id="422515943">
<reference key="NSMenu" ref="438705379"/>
<string key="NSTitle">Tomb</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="502372116"/>
</object>
<object class="NSMenuItem" id="1055002259">
<reference key="NSMenu" ref="438705379"/>
<string key="NSTitle">boy</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="502372116"/>
</object>
</object>
<reference key="NSMenuFont" ref="180276567"/>
</object>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
<int key="NSArrowPosition">2</int>
</object>
</object>
<object class="NSPopUpButton" id="226492283">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{153, 127}, {129, 26}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="485690623">
<int key="NSCellFlags">-2076049856</int>
<int key="NSCellFlags2">2048</int>
<reference key="NSSupport" ref="180276567"/>
<reference key="NSControlView" ref="226492283"/>
<int key="NSButtonFlags">109199615</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
<object class="NSMenuItem" key="NSMenuItem" id="241755795">
<reference key="NSMenu" ref="671309887"/>
<string key="NSTitle">beginsWith</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<int key="NSState">1</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="485690623"/>
</object>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="671309887">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="241755795"/>
<object class="NSMenuItem" id="573953194">
<reference key="NSMenu" ref="671309887"/>
<string key="NSTitle">endsWith</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="485690623"/>
</object>
</object>
<reference key="NSMenuFont" ref="180276567"/>
</object>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
<int key="NSArrowPosition">2</int>
</object>
</object>
<object class="NSButton" id="986079495">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{424, 128}, {77, 25}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="820767418">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Search</string>
<reference key="NSSupport" ref="180276567"/>
<reference key="NSControlView" ref="986079495"/>
<int key="NSButtonFlags">-2038152961</int>
<int key="NSButtonFlags2">163</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
</object>
</object>
<object class="NSPopUpButton" id="148001902">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{32, 127}, {100, 26}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="884253365">
<int key="NSCellFlags">-2076049856</int>
<int key="NSCellFlags2">2048</int>
<reference key="NSSupport" ref="180276567"/>
<reference key="NSControlView" ref="148001902"/>
<int key="NSButtonFlags">109199615</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">400</int>
<int key="NSPeriodicInterval">75</int>
<object class="NSMenuItem" key="NSMenuItem" id="17817692">
<reference key="NSMenu" ref="15076045"/>
<string key="NSTitle">To</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<int key="NSState">1</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="884253365"/>
</object>
<bool key="NSMenuItemRespectAlignment">YES</bool>
<object class="NSMenu" key="NSMenu" id="15076045">
<string key="NSTitle">OtherViews</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="17817692"/>
<object class="NSMenuItem" id="232326310">
<reference key="NSMenu" ref="15076045"/>
<string key="NSTitle">Tom</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="884253365"/>
</object>
<object class="NSMenuItem" id="874646600">
<reference key="NSMenu" ref="15076045"/>
<string key="NSTitle">Tomb</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="884253365"/>
</object>
<object class="NSMenuItem" id="358035610">
<reference key="NSMenu" ref="15076045"/>
<string key="NSTitle">Tomboy</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="102193233"/>
<reference key="NSMixedImage" ref="364966873"/>
<string key="NSAction">_popUpItemAction:</string>
<reference key="NSTarget" ref="884253365"/>
</object>
</object>
<reference key="NSMenuFont" ref="180276567"/>
</object>
<int key="NSPreferredEdge">1</int>
<bool key="NSUsesItemFromMenu">YES</bool>
<bool key="NSAltersState">YES</bool>
<int key="NSArrowPosition">2</int>
</object>
</object>
<object class="NSButton" id="979095863">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{39, 87}, {109, 18}}</string>
<reference key="NSSuperview" ref="439893737"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="847409339">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Use new code</string>
<reference key="NSSupport" ref="180276567"/>
<reference key="NSControlView" ref="979095863"/>
<int key="NSButtonFlags">1211912703</int>
<int key="NSButtonFlags2">2</int>
<object class="NSCustomResource" key="NSNormalImage">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSSwitch</string>
</object>
<object class="NSButtonImageSource" key="NSAlternateImage">
<string key="NSImageName">NSSwitch</string>
</object>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
</object>
</object>
<string key="NSFrameSize">{571, 179}</string>
<reference key="NSSuperview"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string>
</object>
<object class="NSCustomObject" id="635946545">
<string key="NSClassName">AppController</string>
</object>
<object class="NSObjectController" id="680044224">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>useNewCode</string>
</object>
<bool key="NSEditable">YES</bool>
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="635946545"/>
</object>
<int key="connectionID">451</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">resultsField</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="306506021"/>
</object>
<int key="connectionID">474</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">nameMenu</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="831737273"/>
</object>
<int key="connectionID">475</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">search:</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="986079495"/>
</object>
<int key="connectionID">476</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">theWindow</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="972006081"/>
</object>
<int key="connectionID">477</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">comparisonMenu</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="226492283"/>
</object>
<int key="connectionID">484</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dataMenu</string>
<reference key="source" ref="635946545"/>
<reference key="destination" ref="148001902"/>
</object>
<int key="connectionID">498</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">content</string>
<reference key="source" ref="680044224"/>
<reference key="destination" ref="635946545"/>
</object>
<int key="connectionID">503</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.useNewCode</string>
<reference key="source" ref="979095863"/>
<reference key="destination" ref="680044224"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="979095863"/>
<reference key="NSDestination" ref="680044224"/>
<string key="NSLabel">value: selection.useNewCode</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">selection.useNewCode</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">505</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<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="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="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="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">371</int>
<reference key="object" ref="972006081"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="439893737"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">372</int>
<reference key="object" ref="439893737"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="986079495"/>
<reference ref="226492283"/>
<reference ref="831737273"/>
<reference ref="148001902"/>
<reference ref="979095863"/>
<reference ref="306506021"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">450</int>
<reference key="object" ref="635946545"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">464</int>
<reference key="object" ref="831737273"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="502372116"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">465</int>
<reference key="object" ref="502372116"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="438705379"/>
</object>
<reference key="parent" ref="831737273"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">466</int>
<reference key="object" ref="438705379"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="396781444"/>
<reference ref="435766921"/>
<reference ref="422515943"/>
<reference ref="1055002259"/>
</object>
<reference key="parent" ref="502372116"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">467</int>
<reference key="object" ref="396781444"/>
<reference key="parent" ref="438705379"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">468</int>
<reference key="object" ref="435766921"/>
<reference key="parent" ref="438705379"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">469</int>
<reference key="object" ref="422515943"/>
<reference key="parent" ref="438705379"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">470</int>
<reference key="object" ref="986079495"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="820767418"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">471</int>
<reference key="object" ref="820767418"/>
<reference key="parent" ref="986079495"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">472</int>
<reference key="object" ref="306506021"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="786364694"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">473</int>
<reference key="object" ref="786364694"/>
<reference key="parent" ref="306506021"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">478</int>
<reference key="object" ref="226492283"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="485690623"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">479</int>
<reference key="object" ref="485690623"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="671309887"/>
</object>
<reference key="parent" ref="226492283"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">480</int>
<reference key="object" ref="671309887"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="573953194"/>
<reference ref="241755795"/>
</object>
<reference key="parent" ref="485690623"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">482</int>
<reference key="object" ref="573953194"/>
<reference key="parent" ref="671309887"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">483</int>
<reference key="object" ref="241755795"/>
<reference key="parent" ref="671309887"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">485</int>
<reference key="object" ref="1055002259"/>
<reference key="parent" ref="438705379"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">491</int>
<reference key="object" ref="148001902"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="884253365"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">492</int>
<reference key="object" ref="884253365"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="15076045"/>
</object>
<reference key="parent" ref="148001902"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">493</int>
<reference key="object" ref="15076045"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="358035610"/>
<reference ref="874646600"/>
<reference ref="232326310"/>
<reference ref="17817692"/>
</object>
<reference key="parent" ref="884253365"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">494</int>
<reference key="object" ref="358035610"/>
<reference key="parent" ref="15076045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">495</int>
<reference key="object" ref="874646600"/>
<reference key="parent" ref="15076045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">496</int>
<reference key="object" ref="232326310"/>
<reference key="parent" ref="15076045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">497</int>
<reference key="object" ref="17817692"/>
<reference key="parent" ref="15076045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">499</int>
<reference key="object" ref="979095863"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="847409339"/>
</object>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">500</int>
<reference key="object" ref="847409339"/>
<reference key="parent" ref="979095863"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">502</int>
<reference key="object" ref="680044224"/>
<reference key="parent" ref="0"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-3.IBPluginDependency</string>
<string>371.IBEditorWindowLastContentRect</string>
<string>371.IBPluginDependency</string>
<string>371.IBWindowTemplateEditedContentRect</string>
<string>371.NSWindowTemplate.visibleAtLaunch</string>
<string>371.editorWindowContentRectSynchronizationRect</string>
<string>372.IBPluginDependency</string>
<string>464.IBPluginDependency</string>
<string>464.IBViewBoundsToFrameTransform</string>
<string>465.IBPluginDependency</string>
<string>466.IBEditorWindowLastContentRect</string>
<string>466.IBPluginDependency</string>
<string>467.IBPluginDependency</string>
<string>468.IBPluginDependency</string>
<string>469.IBPluginDependency</string>
<string>470.IBPluginDependency</string>
<string>471.IBPluginDependency</string>
<string>472.IBPluginDependency</string>
<string>472.IBViewBoundsToFrameTransform</string>
<string>473.IBPluginDependency</string>
<string>478.IBPluginDependency</string>
<string>478.IBViewBoundsToFrameTransform</string>
<string>479.IBPluginDependency</string>
<string>480.IBEditorWindowLastContentRect</string>
<string>480.IBPluginDependency</string>
<string>482.IBPluginDependency</string>
<string>483.IBPluginDependency</string>
<string>485.IBPluginDependency</string>
<string>491.IBPluginDependency</string>
<string>491.IBViewBoundsToFrameTransform</string>
<string>492.IBPluginDependency</string>
<string>493.IBEditorWindowLastContentRect</string>
<string>493.IBPluginDependency</string>
<string>494.IBPluginDependency</string>
<string>495.IBPluginDependency</string>
<string>496.IBPluginDependency</string>
<string>497.IBPluginDependency</string>
<string>499.IBPluginDependency</string>
<string>500.IBPluginDependency</string>
<string>502.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{441, 973}, {571, 179}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{441, 973}, {571, 179}}</string>
<integer value="1"/>
<string>{{33, 99}, {480, 360}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDlwAAwzQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{732, 1043}, {122, 83}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCAAAAwiwAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABDAgAAwzIAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{560, 1083}, {142, 43}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABCLAAAwzEAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{462, 1043}, {122, 83}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">505</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<object class="NSMutableDictionary" key="outlets">
<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">IBProjectSource</string>
<string key="minorKey">./Classes/AppController.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">AppController</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">search:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">search:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">search:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>comparisonMenu</string>
<string>dataMenu</string>
<string>nameMenu</string>
<string>resultsField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>comparisonMenu</string>
<string>dataMenu</string>
<string>nameMenu</string>
<string>resultsField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">comparisonMenu</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">dataMenu</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">nameMenu</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">resultsField</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<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>
<nil key="IBDocument.LastKnownRelativeProjectPath"/>
<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>
<string>NSSwitch</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{9, 8}</string>
<string>{7, 2}</string>
<string>{15, 15}</string>
</object>
</object>
</data>
</archive>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,103 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index-debug.html
test
Created by aparajita on May 25, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>test</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
OBJJ_INCLUDE_PATHS = ["Frameworks/Debug", "Frameworks", "SomethingElse"];
</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:
// 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);
</script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
@@ -1,77 +0,0 @@
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!--
index.html
test
Created by aparajita on May 25, 2011.
Copyright 2011, Victory-Heart Productions All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
<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>test</title>
<script type="text/javascript">
OBJJ_MAIN_FILE = "main.j";
</script>
<script type="text/javascript" src="Frameworks/Objective-J/Objective-J.js" charset="UTF-8"></script>
<style type="text/css">
body{margin:0; padding:0;}
#container {position: absolute; top:50%; left:50%;}
#content {width:800px; text-align:center; margin-left: -400px; height:50px; margin-top:-25px; line-height: 50px;}
#content {font-family: "Helvetica", "Arial", sans-serif; font-size: 18px; color: black; text-shadow: 0px 1px 0px white; }
#loadgraphic {margin-right: 0.2em; margin-bottom:-2px;}
</style>
<!--[if lt IE 7]>
<STYLE type="text/css">
#container { position: relative; top: 50%; }
#content { position: relative;}
</STYLE>
<![endif]-->
</head>
<body style="">
<div id="cappuccino-body">
<div id="loadingcontainer" style="background-color: #eeeeee; overflow:hidden; width:100%; height:100%; position: absolute; top: 0; left: 0;">
<script type="text/javascript">
document.write("<div id='container'><p id='content'>" +
"<img id='loadgraphic' width='16' height='16' src='Resources/spinner.gif' /> " +
"Loading test...</p></div>");
</script>
<noscript>
<div id="container">
<div style="width: 440px; padding: 10px 25px 20px 25px; font-family: sans-serif; background-color: #ffffff; position: relative; left: -245px; top: -120px; text-align: center; -moz-border-radius: 20px; -webkit-border-radius: 20px; color: #555555">
<p style="line-height: 1.4em;">JavaScript is required for this site to work correctly but is either disabled or not supported by your browser.</p>
<p style="font-size:120%; padding:10px;"><a href="http://cappuccino.org/noscript">Show me how to enable JavaScript</a></p>
<p style="font-size:80%;">You may want to upgrade to a newer browser while you're at it:</p>
<ul style="margin:0;padding:0; text-align: center; font-size:80%;" >
<li style="display: inline;"><a href="http://www.apple.com/safari/download/">Safari</a></li>
<li style="display: inline;"><a href="http://www.mozilla.com/en-US/firefox/">Firefox</a></li>
<li style="display: inline;"><a href="http://www.google.com/chrome/">Chrome</a></li>
<li style="display: inline;"><a href="http://www.opera.com/download/">Opera</a></li>
<li style="display: inline;"><a href="http://www.microsoft.com/windows/downloads/ie/getitnow.mspx">Internet Explorer</a></li>
</ul>
</div>
</div>
</noscript>
</div>
</div>
</body>
</html>
-18
View File
@@ -1,18 +0,0 @@
/*
* AppController.j
* test
*
* Created by aparajita on May 25, 2011.
* Copyright 2011, Victory-Heart Productions All rights reserved.
*/
@import <Foundation/Foundation.j>
@import <AppKit/AppKit.j>
@import "AppController.j"
function main(args, namedArgs)
{
CPApplicationMain(args, namedArgs);
}
+1 -1
View File
@@ -1280,7 +1280,7 @@ MAN_LINKS = NO
# generate an XML file that captures the structure of
# the code including all documentation.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+7 -7
View File
@@ -265,7 +265,7 @@ div.contents hr {
}
td.indexkey {
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
border-bottom: 1px solid #eee;
padding: .25em 0 .25em .5em;
}
@@ -275,7 +275,7 @@ table tr.indexkey:first-child td {
}
td.indexvalue {
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
border-bottom: 1px solid #eee;
padding: .25em 0 .25em .5em;
}
@@ -285,7 +285,7 @@ table tr.memlist > td {
}
tr.memlist td {
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
padding: .25em 0;
border-bottom: 1px solid #eee;
}
@@ -425,7 +425,7 @@ hr.footer {
/* @group Member Descriptions */
table.memberdecls {
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
border-spacing: 0px;
padding: 0px;
margin: 0 !important;
@@ -485,7 +485,7 @@ table.memberdecls {
.memname {
white-space: nowrap;
font: bold 105% Consolas, Menlo, "Lucida Console";
font: bold 105% Consolas, "Lucida Console";
margin: .25em 0 .1em .25em;
}
@@ -495,7 +495,7 @@ table.memberdecls {
padding: 6px 15px;
color: #253554;
background-color: #f7f7f7;
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
font-weight: bold;
}
@@ -526,7 +526,7 @@ table.memberdecls {
}
.memdoc dl dd td em {
font-family: Consolas, Menlo, "Lucida Console";
font-family: Consolas, "Lucida Console";
font-weight: bold;
white-space: nowrap;
}
@@ -3,188 +3,28 @@
* __project.name__
*
* Created by __user.name__ on __project.date__.
*
* Copyright __project.year__, __organization.name__. All rights reserved.
*
* 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
* Copyright __project.year__, __organization.name__ All rights reserved.
*/
//===========================================================
// DO NOT REMOVE
//===========================================================
var SYS = require("system"),
ENV = SYS.env,
var ENV = require("system").env,
FILE = require("file"),
OS = require("os");
//===========================================================
// USER CONFIGURABLE VARIABLES
//===========================================================
/*
The directory in which the project will be built. By default
it is built in a "Build" directory within the project directory.
To use your $CAPP_BUILD directory, change the declaration to:
var buildDir = ENV["CAPP_BUILD"];
*/
var buildDir = "Build";
//===========================================================
// AUTOMATICALLY GENERATED
//
// Do not edit! (unless you know what you are doing)
//===========================================================
var stream = require("narwhal/term").stream,
JAKE = require("jake"),
task = JAKE.task,
FileList = JAKE.FileList,
CLEAN = require("jake/clean").CLEAN,
CLOBBER = require("jake/clean").CLOBBER,
task = require("jake").task,
FileList = require("jake").FileList,
blend = require("cappuccino/jake").blend,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug",
productName = "__project.nameasidentifier__",
debugBlendKitPath = FILE.join("Frameworks", "Debug", "BlendKit"),
releaseBlendKitPath = FILE.join("Frameworks", "BlendKit"),
buildPath = FILE.canonical(FILE.join(buildDir, productName + ".build"));
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug";
blend (productName + ".blend", function(themeBlendTask)
blend ("__project.nameasidentifier__.blend", function(__project.nameasidentifier__Task)
{
themeBlendTask.setBuildIntermediatesPath(FILE.join(buildPath, configuration))
themeBlendTask.setBuildPath(FILE.join(buildDir, configuration));
__project.nameasidentifier__Task.setBuildIntermediatesPath(FILE.join("Build", "__project.nameasidentifier__.build", configuration))
__project.nameasidentifier__Task.setBuildPath(FILE.join("Build", configuration));
themeBlendTask.setThemeDescriptors(new FileList("ThemeDescriptors.j"));
themeBlendTask.setIdentifier("__project.identifier__");
themeBlendTask.setResources(new FileList("Resources/*"));
__project.nameasidentifier__Task.setThemeDescriptors(new FileList("ThemeDescriptors.j"));
__project.nameasidentifier__Task.setIdentifier("com.280n.__project.identifier__");
__project.nameasidentifier__Task.setResources(new FileList("Resources/*"));
});
task ("debug", function()
{
ENV["CONFIGURATION"] = "Debug";
JAKE.subjake(["."], "build", ENV);
task ("default", ["__project.nameasidentifier__.blend"]);
symlinkBlendKit(debugBlendKitPath);
});
task ("build", ["default"]);
task ("release", function()
{
ENV["CONFIGURATION"] = "Release";
JAKE.subjake(["."], "build", ENV);
symlinkBlendKit(releaseBlendKitPath);
});
task ("default", ["release"]);
task ("build", [productName + ".blend"]);
task ("all", ["debug", "release"]);
task ("test", ["debug"], function()
{
OS.system(["open", "index-debug.html"]);
});
task ("test-release", ["release"], function()
{
OS.system(["open", "index.html"]);
});
CLEAN.include(buildPath);
CLOBBER.include(FILE.join(buildDir, "Debug"))
.include(FILE.join(buildDir, "Release"));
task ("help", function()
{
var app = JAKE.application().name();
colorPrint("--------------------------------------------------------------------------", "bold+green");
colorPrint("__project.name__ - Theme Blend", "bold+green");
colorPrint("--------------------------------------------------------------------------", "bold+green");
describeTask(app, "debug", "Builds a debug version at " + FILE.join(buildDir, "Debug", productName));
describeTask(app, "release", "Builds a release version at " + FILE.join(buildDir, "Release", productName));
describeTask(app, "all", "Builds a debug and release version");
describeTask(app, "test", "Builds a debug version, symlinks to the installed BlendKit framework,\nand opens the theme showcase in the default browser");
describeTask(app, "test-release", "Builds a release version, symlinks to the installed BlendKit framework,\nand opens the theme showcase in the default browser");
describeTask(app, "clean", "Removes the intermediate build files");
describeTask(app, "clobber", "Removes the intermediate build files and the built theme");
colorPrint("--------------------------------------------------------------------------", "bold+green");
});
var describeTask = function(application, task, description)
{
colorPrint("\n" + application + " " + task, "violet");
description.split("\n").forEach(function(line)
{
print(" " + line);
});
}
var symlinkBlendKit = function(destinationPath)
{
if (FILE.exists(destinationPath))
return;
var blendKitPath = null,
path = FILE.join(SYS.prefix, "packages", "cappuccino", "Frameworks", "BlendKit");
if (FILE.isDirectory(path))
blendKitPath = path;
if (!blendKitPath)
{
cappBuild = ENV["CAPP_BUILD"];
if (cappBuild)
{
var buildTypes = ["Release", "Debug"];
for (var i = 0; i < buildTypes.length; ++i)
{
var path = FILE.join(cappBuild, buildTypes[i], "BlendKit");
if (FILE.isDirectory(path))
{
blendKitPath = path;
break;
}
}
}
}
if (blendKitPath)
FILE.symlink(blendKitPath, destinationPath);
}
function colorPrint(message, color)
{
var matches = color.match(/(bold(?: |\+))?(.+)/);
if (!matches)
return;
message = "\0" + matches[2] + "(" + message + "\0)";
if (matches[1])
message = "\0bold(" + message + "\0)";
stream.print(message);
}
@@ -3,13 +3,15 @@
* __project.name__
*
* Created by __user.name__ on __project.date__.
* Copyright __project.year__, __organization.name__. All rights reserved.
* Copyright __project.year__, __organization.name__ All rights reserved.
*/
@import <BlendKit/BKThemeDescriptor.j>
@implementation __project.nameasidentifier__ThemeDescriptor : BKThemeDescriptor
{
}
+ (CPString)themeName
{
@@ -19,7 +21,7 @@
+ (CPButton)themedButton
{
var button = [[CPButton alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 20.0)];
[button setValue:[CPColor blueColor] forThemeAttribute:@"bezel-color"];
[button setValue:[CPColor greenColor] forThemeAttribute:@"bezel-color" inState:CPThemeStateHighlighted];
@@ -27,7 +29,7 @@
[button setValue:[CPColor yellowColor] forThemeAttribute:@"text-color" inState:CPThemeStateHighlighted];
[button setTitle:@"Yikes!"];
return button;
}
@@ -7,7 +7,7 @@
__project.name__
Created by __user.name__ on __project.date__.
Copyright __project.year__, __organization.name__. All rights reserved.
Copyright __project.year__, __organization.name__ All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
@@ -7,7 +7,7 @@
__project.name__
Created by __user.name__ on __project.date__.
Copyright __project.year__, __organization.name__. All rights reserved.
Copyright __project.year__, __organization.name__ All rights reserved.
-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7, chrome=1" />
@@ -1,9 +1,9 @@
/*
* main.j
* __project.name__
* __Product__
*
* Created by __user.name__ on __project.date__.
* Copyright __project.year__, __organization.name__. All rights reserved.
* Created by __Me__ on __Date__.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*/
@import <Foundation/Foundation.j>
+8 -7
View File
@@ -40,16 +40,18 @@ ConverterConversionException = @"ConverterConversionException";
@implementation Converter : CPObject
{
CPString inputPath @accessors(readonly);
CPString outputPath @accessors;
CPString resourcesPath @accessors;
NibFormat format @accessors(readonly);
CPArray themes @accessors(readonly);
CPArray userNSClasses @accessors;
CPString inputPath @accessors(readonly);
CPString outputPath @accessors;
CPString resourcesPath @accessors;
NibFormat format @accessors(readonly);
CPArray themes @accessors(readonly);
}
+ (Converter)sharedConverter
{
if (!SharedConverter)
SharedConverter = [[Converter alloc] init];
return SharedConverter;
}
@@ -59,7 +61,6 @@ ConverterConversionException = @"ConverterConversionException";
if (self)
{
SharedConverter = self;
inputPath = aPath;
format = nibFormat;
themes = themeList;
+1
View File
@@ -46,6 +46,7 @@
@import "NSMenu.j"
@import "NSMenuItem.j"
@import "NSNibConnector.j"
@import "NSNumberFormatter.j"
@import "NSObjectController.j"
@import "NSOutlineView.j"
@import "NSPopUpButton.j"
+4 -67
View File
@@ -1,26 +1,3 @@
/*
* NSClassSwapper.j
* nib2cib
*
* Created by Francisco Tolmasky
* Copyright 2009, 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
*/
@import "Converter.j"
var NSClassSwapperClassNames = {},
NSClassSwapperOriginalClassNames = {};
@@ -39,38 +16,15 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey",
if (!swapperClass)
{
// If this is a userland NS class, call its KVC methods directly
var nsClass = nil;
if ([[[Converter sharedConverter] userNSClasses] containsObject:aClassName])
nsClass = objj_lookUpClass("NS_" + aClassName);
var originalClass = nsClass || objj_lookUpClass(anOriginalClassName);
var originalClass = objj_lookUpClass(anOriginalClassName);
swapperClass = objj_allocateClassPair(originalClass, swapperClassName);
objj_registerClassPair(swapperClass);
/*
When calling userland KVC methods, they should think that the class is
the NS class (not the swapper class) so that they are in their userland space,
not in AppKit space. For example, this ensures that bundleForClass:[self class] will work correctly.
We can accomplish this safely by changing the class of self temporarily and sending directly
to self instead of to super. This swizzle is safe because NSClassSwapper and _CPCibClassSwapper
do not add any ivars.
*/
class_addMethod(swapperClass, @selector(initWithCoder:), function(self, _cmd, aCoder)
{
if (nsClass)
{
// Switch to userland temporarily
self.isa = nsClass;
self = objj_msgSend(self, _cmd, aCoder);
self.isa = swapperClass;
}
else
self = objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder);
self = objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder);
if (self)
{
@@ -90,26 +44,9 @@ var _CPCibClassSwapperClassNameKey = @"_CPCibClassSwapperClassNameKey",
class_addMethod(swapperClass, @selector(encodeWithCoder:), function(self, _cmd, aCoder)
{
if (nsClass)
{
// Switch to userland temporarily
self.isa = nsClass;
objj_msgSend(self, _cmd, aCoder);
self.isa = swapperClass;
}
else
objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder);
// If this is a custom NS class, lookup its archiver class so that
// the correct class is swapped during unarchiving.
if (nsClass)
{
var classForArchiver = objj_msgSend(nsClass, "classForKeyedArchiver");
if (classForArchiver)
aClassName = [classForArchiver className];
}
objj_msgSendSuper({super_class:originalClass, receiver:self}, _cmd, aCoder);
// FIXME: map class name as well?
[aCoder encodeObject:aClassName forKey:_CPCibClassSwapperClassNameKey];
[aCoder encodeObject:CP_NSMapClassName(anOriginalClassName) forKey:_CPCibClassSwapperOriginalClassNameKey];
}, "");
-6
View File
@@ -3,9 +3,3 @@
}
@end
@implementation NSNumberFormatter : CPObject
{
}
@end
-1
View File
@@ -24,5 +24,4 @@
@import "NSExpression.j"
@import "NSDictionary.j"
@import "NSMutableString.j"
@import "NSNull.j"
@import "NSSet.j"
+1
View File
@@ -58,6 +58,7 @@
_numberOfMajorTickMarks = [cell numberOfMajorTickMarks];
[self setEditable:[cell isEditable]];
[self setEnabled:[cell isEnabled]];
[self setContinuous:[cell isContinuous]];
return self;
+1 -47
View File
@@ -23,7 +23,6 @@
@import <AppKit/CPCibConnector.j>
@import <AppKit/CPCibControlConnector.j>
@import <AppKit/CPCibOutletConnector.j>
@import <AppKit/CPCibRuntimeAttributesConnector.j>
NIB_CONNECTION_EQUIVALENCY_TABLE = {};
@@ -54,8 +53,7 @@ NIB_CONNECTION_EQUIVALENCY_TABLE = {};
_destination = NIB_CONNECTION_EQUIVALENCY_TABLE[destinationUID];
}
if (_source && _destination)
CPLog.debug(@"NSNibConnector: connection: " + [_source description] + " " + [_destination description] + " " + _label);
CPLog.debug(@"NSNibConnector: connection: " + [_source description] + " " + [_destination description] + " " + _label);
}
return self;
@@ -169,47 +167,3 @@ var NSTransformers = [CPSet setWithObjects:
}
@end
@implementation CPCibRuntimeAttributesConnector (NSCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
{
self = [super NS_initWithCoder:aCoder];
if (self)
{
_source = [aCoder decodeObjectForKey:@"NSObject"];
_keyPaths = [aCoder decodeObjectForKey:@"NSKeyPaths"];
_values = [aCoder decodeObjectForKey:@"NSValues"];
var count = [_keyPaths count];
CPLog.debug(@"NSNibConnector: runtime attributes connector: " + [_source description]);
while (count--)
{
var value = _values[count],
type = typeof(value) === "boolean" ? "BOOL" : [value className];
CPLog.debug(@" %s (%s): %s", _keyPaths[count], type, value);
}
}
return self;
}
@end
@implementation NSIBUserDefinedRuntimeAttributesConnector : CPCibRuntimeAttributesConnector
- (id)initWithCoder:(CPCoder)aCoder
{
return [self NS_initWithCoder:aCoder];
}
- (Class)classForKeyedArchiver
{
return [CPCibRuntimeAttributesConnector class];
}
@end
+54
View File
@@ -0,0 +1,54 @@
/*
* NSNumberFormatter.j
* nib2cib
*
* Created by Alexander Ljungberg.
* Copyright 2011, WireLoad 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
*/
@import <Foundation/CPNumberFormatter.j>
@implementation CPNumberFormatter (CPCoding)
- (id)NS_initWithCoder:(CPCoder)aCoder
{
self = [super init];
if (self)
{
}
return self;
}
@end
@implementation NSNumberFormatter : CPNumberFormatter
{
}
- (id)initWithCoder:(CPCoder)aCoder
{
return [self NS_initWithCoder:aCoder];
}
- (Class)classForKeyedArchiver
{
return [CPNumberFormatter class];
}
@end
-1
View File
@@ -68,7 +68,6 @@ var NSViewAutoresizingMask = 0x3F,
_isHidden = vFlags & NSViewHiddenMask;
_opacity = 1.0;//[aCoder decodeIntForKey:CPViewOpacityKey];
_themeClass = [self themeClass];
_themeAttributes = {};
_themeState = CPThemeStateNormal;
[self _loadThemeAttributes];

Some files were not shown because too many files have changed in this diff Show More