Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More renaming

  • Loading branch information...
commit 630d4307a4ee5618148978272aa60eefb7e093a5 1 parent b7248cf
@ccgus authored
View
20 jstalk.xcodeproj/project.pbxproj
@@ -140,8 +140,8 @@
CC3A9B6315BCB82C0075F377 /* MochaRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36AF15BA5E44008D8460 /* MochaRuntime.m */; };
CC3A9B6415BCB82E0075F377 /* Mocha.m in Sources */ = {isa = PBXBuildFile; fileRef = CCEC36AC15BA5E44008D8460 /* Mocha.m */; };
CC41432E0F25257C00E46669 /* JSTalk_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = CCC5B8CB0F1EFAAA00126722 /* JSTalk_Prefix.pch */; settings = {ATTRIBUTES = (Private, ); }; };
- CC41433B0F25259400E46669 /* JSTalk.h in Headers */ = {isa = PBXBuildFile; fileRef = CC5FB7D60F1FDDE900F4ECC2 /* JSTalk.h */; settings = {ATTRIBUTES = (Public, ); }; };
- CC41433C0F25259400E46669 /* JSTalk.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7D70F1FDDE900F4ECC2 /* JSTalk.m */; };
+ CC41433B0F25259400E46669 /* COScript.h in Headers */ = {isa = PBXBuildFile; fileRef = CC5FB7D60F1FDDE900F4ECC2 /* COScript.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ CC41433C0F25259400E46669 /* COScript.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7D70F1FDDE900F4ECC2 /* COScript.m */; };
CC41433D0F25259500E46669 /* JSTListener.h in Headers */ = {isa = PBXBuildFile; fileRef = CCC5B95A0F1EFCFE00126722 /* JSTListener.h */; settings = {ATTRIBUTES = (Private, ); }; };
CC41433E0F25259500E46669 /* JSTListener.m in Sources */ = {isa = PBXBuildFile; fileRef = CCC5B95B0F1EFCFE00126722 /* JSTListener.m */; };
CC4143500F25261000E46669 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC1323840F24FF9D0032FEB8 /* Carbon.framework */; };
@@ -154,7 +154,7 @@
CC4143C30F2529F200E46669 /* JSTExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4143C10F2529F200E46669 /* JSTExtras.h */; settings = {ATTRIBUTES = (Public, ); }; };
CC5EDD4D1237F6DF00E0D965 /* JSTalkStatusIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5EDD4C1237F6DF00E0D965 /* JSTalkStatusIcon.png */; };
CC5EDD531237F71300E0D965 /* JSTalkStatusIconAlt.png in Resources */ = {isa = PBXBuildFile; fileRef = CC5EDD521237F71300E0D965 /* JSTalkStatusIconAlt.png */; };
- CC5FB7DB0F1FDE2500F4ECC2 /* JSTalk.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7D70F1FDDE900F4ECC2 /* JSTalk.m */; };
+ CC5FB7DB0F1FDE2500F4ECC2 /* COScript.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7D70F1FDDE900F4ECC2 /* COScript.m */; };
CC5FB7DC0F1FDE2600F4ECC2 /* JSTListener.m in Sources */ = {isa = PBXBuildFile; fileRef = CCC5B95B0F1EFCFE00126722 /* JSTListener.m */; };
CC5FB7DD0F1FDE2900F4ECC2 /* jstalkmain.m in Sources */ = {isa = PBXBuildFile; fileRef = CC5FB7C70F1FDD0B00F4ECC2 /* jstalkmain.m */; };
CC5FB7DF0F1FDE3800F4ECC2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A7FEA54F5311CA2CBB /* Cocoa.framework */; };
@@ -414,8 +414,8 @@
CC5EDD521237F71300E0D965 /* JSTalkStatusIconAlt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = JSTalkStatusIconAlt.png; path = res/images/JSTalkStatusIconAlt.png; sourceTree = "<group>"; };
CC5FB7C20F1FDCCC00F4ECC2 /* jstalk */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jstalk; sourceTree = BUILT_PRODUCTS_DIR; };
CC5FB7C70F1FDD0B00F4ECC2 /* jstalkmain.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = jstalkmain.m; path = src/jstalkmain.m; sourceTree = "<group>"; };
- CC5FB7D60F1FDDE900F4ECC2 /* JSTalk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSTalk.h; path = src/JSTalk.h; sourceTree = "<group>"; };
- CC5FB7D70F1FDDE900F4ECC2 /* JSTalk.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSTalk.m; path = src/JSTalk.m; sourceTree = "<group>"; };
+ CC5FB7D60F1FDDE900F4ECC2 /* COScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = COScript.h; path = src/COScript.h; sourceTree = "<group>"; };
+ CC5FB7D70F1FDDE900F4ECC2 /* COScript.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = COScript.m; path = src/COScript.m; sourceTree = "<group>"; };
CC725EB71238026D00EA83BF /* TETextUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TETextUtils.h; path = src/TETextUtils.h; sourceTree = "<group>"; };
CC725EB81238026D00EA83BF /* TETextUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TETextUtils.m; path = src/TETextUtils.m; sourceTree = "<group>"; };
CC7576B20F6DF3B7003AE279 /* JSTFileWatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSTFileWatcher.h; path = src/JSTFileWatcher.h; sourceTree = "<group>"; };
@@ -661,8 +661,8 @@
CCEC369615BA5E44008D8460 /* mocha */,
CC5064DE0F4A155000F4A952 /* UIWidgets */,
CC1C7D200F48BB2C007A2941 /* todparsekit */,
- CC5FB7D60F1FDDE900F4ECC2 /* JSTalk.h */,
- CC5FB7D70F1FDDE900F4ECC2 /* JSTalk.m */,
+ CC5FB7D60F1FDDE900F4ECC2 /* COScript.h */,
+ CC5FB7D70F1FDDE900F4ECC2 /* COScript.m */,
CC4143C10F2529F200E46669 /* JSTExtras.h */,
CC4143C00F2529F200E46669 /* JSTExtras.m */,
CCC5B95A0F1EFCFE00126722 /* JSTListener.h */,
@@ -986,7 +986,7 @@
buildActionMask = 2147483647;
files = (
CC41432E0F25257C00E46669 /* JSTalk_Prefix.pch in Headers */,
- CC41433B0F25259400E46669 /* JSTalk.h in Headers */,
+ CC41433B0F25259400E46669 /* COScript.h in Headers */,
CC41433D0F25259500E46669 /* JSTListener.h in Headers */,
CC4143C30F2529F200E46669 /* JSTExtras.h in Headers */,
CCEC36F815BA5E44008D8460 /* MOJavaScriptObject.h in Headers */,
@@ -1182,7 +1182,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- CC41433C0F25259400E46669 /* JSTalk.m in Sources */,
+ CC41433C0F25259400E46669 /* COScript.m in Sources */,
CC41433E0F25259500E46669 /* JSTListener.m in Sources */,
CC4143C20F2529F200E46669 /* JSTExtras.m in Sources */,
CC975BC90F47E5BD00097108 /* JSTPreprocessor.m in Sources */,
@@ -1277,7 +1277,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- CC5FB7DB0F1FDE2500F4ECC2 /* JSTalk.m in Sources */,
+ CC5FB7DB0F1FDE2500F4ECC2 /* COScript.m in Sources */,
CC131C0B16BC8B5C004F5117 /* MOPointerValue.m in Sources */,
CC5FB7DC0F1FDE2600F4ECC2 /* JSTListener.m in Sources */,
CC131C0C16BC8B62004F5117 /* MOPointer.m in Sources */,
View
6 plugins/imagetools/JSTCodeSketcher.h
@@ -7,12 +7,12 @@
//
#import <Foundation/Foundation.h>
-#import <JSTalk/JSTalk.h>
+#import <JSTalk/COScript.h>
#import <JSTalk/MOJavaScriptObject.h>
@interface JSTCodeSketcher : NSView {
- JSTalk *_jstalk;
+ COScript *_jstalk;
MOJavaScriptObject *_drawRect;
MOJavaScriptObject *_setup;
@@ -44,7 +44,7 @@
}
@property (assign) CGFloat frameRate;
-@property (retain) JSTalk *jstalk;
+@property (retain) COScript *jstalk;
@property (assign) NSPoint mouseLocation;
@property (assign) NSPoint pmouseLocation;
@property (assign, getter=isMousePressed) BOOL mousePressed;
View
4 plugins/imagetools/JSTCodeSketcher.m
@@ -8,7 +8,7 @@
#import "JSTCodeSketcher.h"
-@interface JSTalk (Private)
+@interface COScript (Private)
@end
@@ -55,7 +55,7 @@ + (id)codeSketcherWithName:(NSString*)name {
[cs stop];
- [cs setJstalk:[JSTalk currentJSTalk]];
+ [cs setJstalk:[COScript currentCOScript]];
dispatch_async(dispatch_get_main_queue(),^ {
[cs start];
View
2  plugins/imagetools/JSTImageTools.h
@@ -7,7 +7,7 @@
//
#import <Cocoa/Cocoa.h>
-#import <JSTalk/JSTalk.h>
+#import <JSTalk/COScript.h>
@interface JSTImageTools : NSObject {
View
2  plugins/imagetools/JSTQuickCIFilter.h
@@ -8,7 +8,7 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
-#import <JSTalk/JSTalk.h>
+#import <JSTalk/COScript.h>
#import <JSTalk/MOJavaScriptObject.h>
@interface JSTQuickCIFilter : CIFilter {
View
8 plugins/imagetools/JSTQuickCIFilter.m
@@ -65,7 +65,7 @@ - (void)addKernelArgument:(id)obj {
- (CGRect)xxregionOf:(int)sampler destRect:(CGRect)rect userInfo:(id)ui {
- NSValue *v = [[JSTalk currentJSTalk] callJSFunction:[_roiMethod JSObject] withArgumentsInArray:nil];
+ NSValue *v = [[COScript currentCOScript] callJSFunction:[_roiMethod JSObject] withArgumentsInArray:nil];
return [v rectValue];
}
@@ -76,12 +76,12 @@ - (CIImage*)applyWithArguments:(NSArray *)args options:(NSDictionary *)dict {
- (CIImage *)outputImage {
- if (_roiMethod && [JSTalk currentJSTalk]) {
+ if (_roiMethod && [COScript currentCOScript]) {
[_theKernel setROISelector:@selector(regionOf:destRect:userInfo:)];
}
- if (_outputImageMethod && [JSTalk currentJSTalk]) {
- CIImage *i = [[JSTalk currentJSTalk] callJSFunction:[_outputImageMethod JSObject] withArgumentsInArray:nil];
+ if (_outputImageMethod && [COScript currentCOScript]) {
+ CIImage *i = [[COScript currentCOScript] callJSFunction:[_outputImageMethod JSObject] withArgumentsInArray:nil];
return i;
}
View
14 src/JSTalk.h → src/COScript.h
@@ -10,7 +10,8 @@
#import <JavaScriptCore/JavaScriptCore.h>
@class Mocha;
-@class JSTalk;
+@class COScript;
+
@interface COScript : NSObject {
Mocha *_mochaRuntime;
@@ -38,17 +39,14 @@
+ (void)setShouldLoadJSTPlugins:(BOOL)b;
+ (id)application:(NSString*)app;
+ (id)app:(NSString*)app;
-+ (JSTalk*)currentJSTalk;
++ (COScript*)currentCOScript;
@end
@interface NSObject (COScriptErrorControllerMethods)
-- (void)coscript:(COScript*)coscript hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url;
+- (void)coscript:(id)coscript hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url;
@end
+@interface JSTalk : COScript // compatibility
-@interface JSTalk : COScript {
-
-}
-
-@end
+@end
View
35 src/JSTalk.m → src/COScript.m
@@ -6,7 +6,7 @@
// Copyright 2009 Flying Meat Inc. All rights reserved.
//
-#import "JSTalk.h"
+#import "COScript.h"
#import "JSTListener.h"
#import "JSTPreprocessor.h"
#import <ScriptingBridge/ScriptingBridge.h>
@@ -28,7 +28,7 @@ - (JSValueRef)callJSFunction:(JSObjectRef)jsFunction withArgumentsInArray:(NSArr
- (id)objectForJSValue:(JSValueRef)value;
@end
-@interface JSTalk (Private)
+@interface COScript (Private)
- (void) print:(NSString*)s;
@end
@@ -216,18 +216,18 @@ + (void)loadBridgeSupportFileAtURL:(NSURL*)url {
}
}
-NSString *currentJSTalkThreadIdentifier = @"org.jstalk.currentJSTalkHack";
+NSString *currentCOScriptThreadIdentifier = @"org.jstalk.currentCOScriptHack";
-+ (JSTalk*)currentJSTalk {
- return [[[NSThread currentThread] threadDictionary] objectForKey:currentJSTalkThreadIdentifier];
++ (COScript*)currentCOScript {
+ return [[[NSThread currentThread] threadDictionary] objectForKey:currentCOScriptThreadIdentifier];
}
-- (void)pushAsCurrentJSTalk {
- [[[NSThread currentThread] threadDictionary] setObject:self forKey:currentJSTalkThreadIdentifier];
+- (void)pushAsCurrentCOScript {
+ [[[NSThread currentThread] threadDictionary] setObject:self forKey:currentCOScriptThreadIdentifier];
}
-- (void)popAsCurrentJSTalk {
- [[[NSThread currentThread] threadDictionary] removeObjectForKey:currentJSTalkThreadIdentifier];
+- (void)popAsCurrentCOScript {
+ [[[NSThread currentThread] threadDictionary] removeObjectForKey:currentCOScriptThreadIdentifier];
}
- (void)pushObject:(id)obj withName:(NSString*)name {
@@ -242,14 +242,14 @@ - (void)deleteObjectWithName:(NSString*)name {
- (id)executeString:(NSString*)str {
if (!JSTalkPluginList && JSTalkShouldLoadJSTPlugins) {
- [JSTalk loadPlugins];
+ [COScript loadPlugins];
}
if ([self shouldPreprocess]) {
str = [JSTPreprocessor preprocessCode:str];
}
- [self pushAsCurrentJSTalk];
+ [self pushAsCurrentCOScript];
id resultObj = nil;
@@ -277,7 +277,7 @@ - (id)executeString:(NSString*)str {
//
}
- [self popAsCurrentJSTalk];
+ [self popAsCurrentCOScript];
return resultObj;
}
@@ -299,7 +299,7 @@ - (id)callFunctionNamed:(NSString*)name withArguments:(NSArray*)args {
@try {
- [self pushAsCurrentJSTalk];
+ [self pushAsCurrentCOScript];
returnValue = [_mochaRuntime callFunctionWithName:name withArgumentsInArray:args];
@@ -312,14 +312,14 @@ - (id)callFunctionNamed:(NSString*)name withArguments:(NSArray*)args {
[self printException:e];
}
- [self popAsCurrentJSTalk];
+ [self popAsCurrentCOScript];
return returnValue;
}
- (id)callJSFunction:(JSObjectRef)jsFunction withArgumentsInArray:(NSArray *)arguments {
- [self pushAsCurrentJSTalk];
+ [self pushAsCurrentCOScript];
JSValueRef r = nil;
@try {
r = [_mochaRuntime callJSFunction:jsFunction withArgumentsInArray:arguments];
@@ -330,7 +330,7 @@ - (id)callJSFunction:(JSObjectRef)jsFunction withArgumentsInArray:(NSArray *)arg
[self printException:e];
}
- [self popAsCurrentJSTalk];
+ [self popAsCurrentCOScript];
if (r) {
return [_mochaRuntime objectForJSValue:r];
@@ -473,7 +473,8 @@ + (id)proxyForApp:(NSString*)app {
@end
+
+
@implementation JSTalk
@end
-
View
12 src/JSTAppDelegate.m
@@ -7,7 +7,7 @@
//
#import "JSTAppDelegate.h"
-#import "JSTalk.h"
+#import "COScript.h"
@interface JSTAppDelegate (PrivateStuff)
- (void)restoreWorkspace;
@@ -43,8 +43,8 @@ - (void)awakeFromNib {
[self restoreWorkspace];
}
- [JSTalk setShouldLoadJSTPlugins:YES];
- [JSTalk listen];
+ [COScript setShouldLoadJSTPlugins:YES];
+ [COScript listen];
NSSetUncaughtExceptionHandler(JSTUncaughtExceptionHandler);
@@ -55,7 +55,7 @@ - (void)awakeFromNib {
// have all the services menus get updated.
//NSUpdateDynamicServices();
- [JSTalk loadPlugins]; // some guys will setup custom UI in the app.
+ [COScript loadPlugins]; // some guys will setup custom UI in the app.
}
- (IBAction)showPrefs:(id)sender {
@@ -216,7 +216,7 @@ - (NSFont*)defaultEditorFont {
return defaultFont;
}
-- (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
+- (void)JSTalk:(COScript*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
_serviceError = error;
}
@@ -238,7 +238,7 @@ - (void)runAsJSTalkScript:(NSPasteboard *)pb userData:(NSDictionary *)userData e
@try {
- JSTalk *jstalk = [[JSTalk alloc] init];
+ COScript *jstalk = [[COScript alloc] init];
[jstalk setErrorController:self];
View
6 src/JSTDocument.m
@@ -9,7 +9,7 @@
#import "JSTDocument.h"
#import "JSTAppDelegate.h"
#import "JSTListener.h"
-#import "JSTalk.h"
+#import "COScript.h"
#import "JSTPreprocessor.h"
@interface JSTDocument (SuperSecretItsPrivateDontEvenThinkOfUsingTheseMethodsOutsideThisClass)
@@ -140,7 +140,7 @@ - (void)print:(NSString*)s {
}
-- (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
+- (void)JSTalk:(COScript*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
if (!error) {
return;
@@ -169,7 +169,7 @@ - (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger
- (void)runScript:(NSString*)s {
- JSTalk *jstalk = [[JSTalk alloc] init];
+ COScript *jstalk = [[COScript alloc] init];
[[[NSThread currentThread] threadDictionary] setObject:jstalk forKey:@"org.jstalk.currentJSTalkContext"];
View
4 src/JSTExtras.m
@@ -7,10 +7,10 @@
//
#import "JSTExtras.h"
-#import "JSTalk.h"
+#import "COScript.h"
#import <ScriptingBridge/ScriptingBridge.h>
-@implementation JSTalk (JSTExtras)
+@implementation COScript (JSTExtras)
- (void)exit:(int)termCode {
exit(termCode);
View
4 src/JSTPluginMover.m
@@ -7,7 +7,7 @@
//
#import "JSTPluginMover.h"
-#import <JSTalk/JSTalk.h>
+#import <JSTalk/COScript.h>
@implementation JSTPluginMover
@@ -77,7 +77,7 @@ - (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)docType {
}
else {
- [JSTalk resetPlugins];
+ [COScript resetPlugins];
NSRunAlertPanel(NSLocalizedString(@"Plug-in Installed.", @"Plug-in Installed."), @"", nil, nil, nil);
View
8 src/jstalkmain.m
@@ -1,6 +1,6 @@
#import <Cocoa/Cocoa.h>
#import "JSTListener.h"
-#import "JSTalk.h"
+#import "COScript.h"
BOOL JSCErrorHandlerExitOnError = YES;
@@ -11,7 +11,7 @@ @interface JSCErrorHandler : NSObject {
@implementation JSCErrorHandler
-- (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
+- (void)JSTalk:(COScript*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger)lineNumber atSourceURL:(id)url {
printf("Error line %d, %s\n", (int)lineNumber, [[error description] UTF8String]);
@@ -24,7 +24,7 @@ - (void)JSTalk:(JSTalk*)jstalk hadError:(NSString*)error onLineNumber:(NSInteger
@end
-void runREPL(JSTalk *t) {
+void runREPL(COScript *t) {
// thanks http://tlrobinson.net/blog/2008/10/10/command-line-interpreter-and-repl-for-jscocoa/ !
@@ -55,7 +55,7 @@ void runREPL(JSTalk *t) {
int main(int argc, char *argv[]) {
- JSTalk *t = [[JSTalk alloc] init];
+ COScript *t = [[COScript alloc] init];
[t setErrorController:[[JSCErrorHandler alloc] init]];
Please sign in to comment.
Something went wrong with that request. Please try again.