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
#!/usr/bin/env ruby | |
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') | |
require 'rubygems' | |
require 'sinatra' | |
set :app_file, __FILE__ | |
require 'socratic' |
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 OpenPanel (WebScripting) | |
+ (NSString *)webScriptNameForSelector:(SEL)aSelector | |
{NSLog(@"asdf"); | |
if (aSelector == @selector(beginForDirectory:file:types:callback:)) | |
return @"begin"; | |
if (aSelector == @selector(runModalForDirectory:file:types:)) | |
return @"runModal"; | |
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)initialize | |
{ | |
if (self == MyClass) | |
return; | |
unsigned int count; | |
objc_property_t * properties = class_copyPropertyList(self, &count); | |
while (count--) | |
{ |
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
//this is the view i use to show the selection: | |
_toolbarSelection = [[CPImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 50.0, 57.0)]; | |
[_toolbarSelection setImage:MediaWindowControllerToolbarSelectionImage]; | |
[_toolbarSelection setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin]; | |
// Here comes the hack: | |
[myWindow._toolbarView addSubview:_toolbarSelection]; |
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)close | |
{ | |
var count=[_windowControllers count]; | |
while(count--) | |
[[_windowControllers objectAtIndex:count] close]; | |
[[CPDocumentController sharedDocumentController] removeDocument: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
- (void)close | |
{ | |
var count=[_windowControllers count]; | |
while(count--) | |
[[_windowControllers objectAtIndex:count] close]; | |
[[CPDocumentController sharedDocumentController] removeDocument: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
- (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]; |