Removing ITKit dependencies on F-Script framework. Currently working on ITBridging...
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Sun, 11 Jan 2009 03:32:04 +0000 (03:32 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Sun, 11 Jan 2009 03:32:04 +0000 (03:32 +0000)
ITApplicationController.m

index f2ba7d5..b52b7ef 100644 (file)
@@ -1,17 +1,6 @@
 #import "ITApplicationController.h"
 #import "ITCategory-NSApplication.h"
 
-@protocol _ITKitITApplicationControllerFSInterpreterResultCompatibility <NSObject>
-- (NSRange)errorRange;
-- (NSString *)errorMessage;
-- (BOOL)isOK;
-@end
-
-@protocol _ITKitITApplicationControllerFSInterpreterCompatibility <NSObject>
-- (void)setObject:(id)object forIdentifier:(NSString *)identifier;
-- (id <_ITKitITApplicationControllerFSInterpreterResultCompatibility>)execute:(NSString *)command;
-@end
-
 @implementation ITApplicationController
 
 - (id)init {
                        }
                }
        }
-       
-       Class fsinterpreterClass;
-       if (fsinterpreterClass = NSClassFromString(@"FSInterpreter")) {
-               NSArray *fscriptPaths = [NSBundle pathsForResourcesOfType:@"fscriptplugin" inDirectory:[[NSBundle mainBundle] builtInPlugInsPath]];
-               NSEnumerator *fscriptPathEnumerator = [fscriptPaths objectEnumerator];
-               id fscriptPath;
-               
-               while (fscriptPath = [fscriptPathEnumerator nextObject]) {
-                       NSString *fscriptSource = [NSString stringWithContentsOfFile:fscriptPath];
-                       if (fscriptSource) {
-                               id fscriptInterpreter = [(id <_ITKitITApplicationControllerFSInterpreterCompatibility>)[fsinterpreterClass alloc] init];
-                               id result;
-                               [fscriptInterpreter setObject:self forIdentifier:@"applicationController"];
-                               [fscriptInterpreter setObject:fscriptInterpreter forIdentifier:@"hostInterpreter"];
-                               result = [fscriptInterpreter execute:fscriptSource];
-                               if (![result isOK]) {
-                                       NSRunAlertPanel(@"F-Script Plugin Error",[NSString stringWithFormat:@"Plugin: %@\nRange: %@\nMessage:%@", fscriptPath, NSStringFromRange([result errorRange]), [result errorMessage]],@"Dismiss",nil,nil);
-                                       [fscriptInterpreter release];
-                               } else {
-                                       [_plugins addObject:[fscriptInterpreter autorelease]];
-                               }
-                       }
-               }
-       }
 }
 
 - (NSArray *)plugins {