Closed wildthink closed 10 years ago
Assume project! Just starting to have fun and...
The trick code enclosed errors with
-[MOJavaScriptObject copyWithZone:]: unrecognized selector sent to instance 0x600000621b40
var url = [NSURL URLWithString:"http://slashdot.com"];
var session = [NSURLSession sharedSession]; [[session dataTaskWithURL:url completionHandler: function (data, response, error) { [[COScript application:"Cocoa Script Editor"] displayDialog:message]; }] resume];
Cocoa Script can't pass JS functions where objc blocks go. It would certainly be nice to have though.
Assume project! Just starting to have fun and...
The trick code enclosed errors with
-[MOJavaScriptObject copyWithZone:]: unrecognized selector sent to instance 0x600000621b40
var url = [NSURL URLWithString:"http://slashdot.com"];
var session = [NSURLSession sharedSession]; [[session dataTaskWithURL:url completionHandler: function (data, response, error) { [[COScript application:"Cocoa Script Editor"] displayDialog:message]; }] resume];