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
- (void)setRepresentedObject:(JSObject)anObject | |
{ | |
[self registerForDraggedTypes:[v]]; | |
//... | |
} | |
- (void)performDragOperation:(x)x | |
{ | |
alert("yes!"); | |
} |
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
- (CPWindow)window | |
{ | |
if (!_window) | |
{ | |
[self windowWillLoad]; | |
[_document windowControllerWillLoadCib:self]; | |
[self loadWindow]; | |
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
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "null" from undefined | |
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3659) | |
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3637) | |
at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3665) | |
at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3684) | |
at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3697) | |
at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1371) | |
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1415) | |
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:845) | |
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164) |
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
[do it]; |
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
NSRect rect = [self bounds]; | |
CGRect bounds = CGRectInset(*(CGRect *)&rect, SHADOW_HORIZONTAL_INSET - 0.5, SHADOW_VERTICAL_INSET - 0.5); | |
NSShadow * shadow = [[NSShadow alloc] init]; | |
[shadow setShadowColor:[NSColor colorWithCalibratedWhite:0.0 alpha:0.5]]; | |
[shadow setShadowOffset:NSMakeSize(0.0, -10.0)]; | |
[shadow setShadowBlurRadius:100.0]; | |
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
NSWindow * ontop = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 300.0, 400.0) styleMask:NSTitledWindowMask | NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
NSWindow * onback = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 500.0, 400.0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
[onback setContentView:[[View alloc] init]]; | |
[ontop makeKeyAndOrderFront:self]; | |
[ontop addChildWindow:onback ordered:NSWindowBelow]; | |
[ontop setLevel:3]; |
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
NSWindow * window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 300.0, 400.0) styleMask:NSTitledWindowMask | NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
NSWindow * windowp = [[NSWindow alloc] initWithContentRect:NSMakeRect(100.0, 100.0, 500.0, 400.0) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]; | |
[windowp setContentView:[[View alloc] init]]; | |
[window addChildWindow:windowp ordered:NSWindowBelow]; | |
[windowp orderFront:self]; | |
[window makeKeyAndOrderFront: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
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; | |
CGRect bounds = CGRectInset(*(CGRect *)&aRect, OUTlINE_HORIZONTAL_INSET - 0.5, OUTlINE_VERTICAL_INSET - 0.5); | |
CGColorRef shadowColor = CGColorCreateGenericGray(0.0, 0.5); | |
CGContextSetShadowWithColor (context, CGSizeMake(0.0, -10.0), 30.0, shadowColor); | |
CGColorRelease(shadowColor); | |
CGColorRef fillColor = CGColorCreateGenericGray(1.0, 1.0); | |
CGColorRef strokeColor = CGColorCreateGenericGray(0.0, 0.2); |
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
/* | |
* AppController.j | |
* takeTwo | |
* | |
* Created by Stefan Wallström on November 17, 2009. | |
* Copyright 2009, 280 North, Inc. All rights reserved. | |
*/ | |
@import <Foundation/CPObject.j> |
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
/* | |
By default, a JavaScript method name is produced by concatenating the | |
components of an ObjectiveC method name, replacing ':' with '_', and | |
escaping '_' and '$' with a leading '$', such that '_' becomes "$_" and | |
'$' becomes "$$". For example: | |
ObjectiveC name Default JavaScript name | |
moveTo:: moveTo__ | |
moveTo_ moveTo$_ | |
moveTo$_ moveTo$$$_ |