Hi,
I have a applescript routine that I need to speed up so to make it C.
I’m trying then to call a ObjC Method that would optimize my AppleScript routines.
In despite of reading the AppleScriptObjC Release Notes and some tutorials and forum on this subject I 'm still failing.
I have made a simple class to start with.
RawTestFile.h
#import <Cocoa/Cocoa.h>
@interface RawTestFile : NSObject {
}
// Methods
-(void) create;
@end
RawTestFile.m
#import “RawTestFile.h”
@implementation RawTestFile
-(void) create {
NSLog(@“Hi !!”);
}
@end
and in my AppleScriptObjC application delegate
script FooAppDelegate
property parent : class "NSObject"
property myRawTestFile : class "RawTestFile"
...
on bench_(sender)
myRawTestFile's create_()
end bench_
end script
when myRawTestFile’s create_() executes I got an error
+[RawTestFile create:]: unrecognized selector sent to class 0x1000010a0 (error -10000)
Looks like I have no instance, so I assume property does not instantiate my class.
I also tried this
set myRawTestFile to RawTestFile()
myRawTestFile's create_()
thinking that myRawTestFile would be an instance of RawTestFile.
so how to I instantiateRawTestFile class within applescript ?
Thanks