This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[importButton setBordered:NO]; | |
[importButton setImagePosition:CPImageLeft]; | |
[importButton setTitle:@"blah"]; | |
[importButton setTextColor:[CPColor blackColor]]; | |
[importButton setFont:[CPFont systemFontOfSize:16.0]]; | |
[importButton setImage:[[CPImage alloc] initWithContentsOfFile:path1 size:CGSizeMake(32.0, 32.0)]]; | |
[importButton setAlternateImage:[[CPImage alloc] initWithContentsOfFile:path2 size:CGSizeMake(32.0, 32.0)]]; | |
[importButton setAlignment:CPLeftTextAlignment]; | |
[importButton setDelegate:self]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation TheCell : CPView | |
{ | |
id myRepresentedObject | |
} | |
- (void)mouseDragged:(CPEvent)anEvent | |
{ | |
var dragView = [[TheCell alloc] initWithFrame:[self bounds]]; | |
[dragView setRepresentedObject:myRepresentedObject]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CPString)stringByDeletingLastPathComponent | |
{ | |
var path = self, | |
start = length - 1; | |
while (path.charAt(start) === '/') | |
start--; | |
path = path.substr(0, path.lastIndexOf('/', start)); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(; index < count; ++index) | |
{ | |
var lhs = self[index], | |
rhs = anArray[index]; | |
if (lhs !== rhs && (!lhs.isa || !rhs.isa || ![lhs isEqual:rhs])) | |
return NO; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(; index < count; ++index) | |
{ | |
var lhs = self[index], | |
rhs = anArray[index]; | |
if (lhs === rhs || lhs.isa && rhs.isa && [lhs isEqual:rhs]) | |
continue; | |
return NO; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/Foundation/CPTimer.j | |
+++ b/Foundation/CPTimer.j | |
@@ -243,13 +243,13 @@ var _CPTimerBridgeTimer = function(codeOrFunction, aDelay, shouldRepeat, functio | |
theFunction = nil; | |
if (typeof codeOrFunction === "string") | |
- theFunction = function() { new Function(codeOrFunction)(); CPTimersForTimeoutIDs[timeoutID] = nil; } | |
+ theFunction = function() { new Function(codeOrFunction)(); if (!shouldRepeat) CPTimersForTimeoutIDs[timeoutID] = nil; } | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>Name</key> | |
<string>YouKit</string> | |
<key>Targets</key> | |
<array> | |
<dict> | |
<key>Name</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>CPBundleIdentifier</key> | |
<string>com.You.YouKit</string> | |
<key>CPBundleInfoDictionaryVersion</key> | |
<string>6.0</string> | |
<key>CPBundleName</key> | |
<string>YouKit</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.setTimeout(function() { alert(); window.setTimeout(alert(), 100); }, 100); | |
window.setTimeout(function() { alert(); window.setTimeout(alert(), 100); }, 100); | |
alert(); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation Shape : CPObject | |
{ | |
CGRect mRect; | |
CPColor mColor; | |
} | |
- (void)encodeWithCoder:(CPCoder)aCoder | |
{ | |
[aCoder encodeRect:mRect forKey:"rect"]; | |
[aCoder encodeObject:mColor forKey:"color"]; |
OlderNewer