From 5815231d5a35ca9ff5fbdb33b1ec2819850afde2 Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Sun, 11 Jan 2009 03:32:04 +0000 Subject: [PATCH] Removing ITKit dependencies on F-Script framework. Currently working on ITBridging framework that satisfies this capability for applications. --- ITApplicationController.m | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/ITApplicationController.m b/ITApplicationController.m index f2ba7d5..b52b7ef 100644 --- a/ITApplicationController.m +++ b/ITApplicationController.m @@ -1,17 +1,6 @@ #import "ITApplicationController.h" #import "ITCategory-NSApplication.h" -@protocol _ITKitITApplicationControllerFSInterpreterResultCompatibility -- (NSRange)errorRange; -- (NSString *)errorMessage; -- (BOOL)isOK; -@end - -@protocol _ITKitITApplicationControllerFSInterpreterCompatibility -- (void)setObject:(id)object forIdentifier:(NSString *)identifier; -- (id <_ITKitITApplicationControllerFSInterpreterResultCompatibility>)execute:(NSString *)command; -@end - @implementation ITApplicationController - (id)init { @@ -59,30 +48,6 @@ } } } - - 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 { -- 2.20.1