Skip to content
Browse files

Fixes a dumb bug in loading Applescript scripts.

  • Loading branch information...
1 parent a6afb6a commit 9a8d061238b081a7e0ff4e84e808e079e29773bc @Grayson committed Mar 13, 2009
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/ApplescriptPluginManager.m
View
4 src/ApplescriptPluginManager.m
@@ -64,6 +64,7 @@ -(void)build
NSAppleEventDescriptor *desc = [NSAppleEventDescriptor appleEventWithEventClass:ASPluginAppClassCode() eventID:ASPluginPropertyEventCode targetDescriptor:procDesc returnID:kAutoGenerateReturnID transactionID:kAnyTransactionID];
id err = nil;
NSAppleEventDescriptor *ret = [as executeAppleEvent:desc error:&err];
+ NSLog(@"%s %@", _cmd, err);
if (ret)
{
NSString *property = [ret stringValue];
@@ -79,7 +80,7 @@ -(NSString *)name { return @"Applescript"; }
-(NSArray *)extensions { return [NSArray arrayWithObject:@"scpt"]; }
-(NSArray *)pluginsForProperty:(NSString *)property forValue:(id)forValue withValue:(id)withValue
{
- if ([self plugins]) [self build];
+ if (![self plugins]) [self build];
NSArray *arr = [[self plugins] objectForKey:property];
if (!arr || ![arr count]) return nil;
@@ -94,6 +95,7 @@ -(NSArray *)pluginsForProperty:(NSString *)property forValue:(id)forValue withVa
while (as = [e nextObject])
{
NSAppleEventDescriptor *enabledDesc = [as executeEvent:ASPluginEnableEventCode eventClass:ASPluginAppClassCode() parameters:parameters];
+ NSLog(@"%s %@", _cmd, enabledDesc);
if (enabledDesc && [enabledDesc booleanValue])
{
NSAppleEventDescriptor *desc = [as executeEvent:ASPluginTitleEventCode eventClass:ASPluginAppClassCode() parameters:parameters];

0 comments on commit 9a8d061

Please sign in to comment.
Something went wrong with that request. Please try again.