I try to use ASOC in an AppleScript, using a regular scpt and scptd file. I also try to use an scptd file where the hook for ASOC library is checked off in the drawer.
I know I have had this working when I have copied code from Shane. I guess my code isn’t as welformed as his, or at I have some other bugs, in my code that leads to this error. But I need really a confirmation, that it is usual to get those kind of errors when there are bugs (probably bad) in my code.
Of course if I should have used a template, or done something else to avoid this, then the answer is most greatfully appreciated. ( I have used AppleScript Editor).
Edit
I’ll let this one stand.
I am not sure of the problem here, because I had had both Xcode 5 and Xcode 3.2 open. I guess the problem was that Xcode 3.2 had done something to the Frameworks/Foundation/A or something in line with that, setting the address to one of the old frameworks.
You have to save the library as an ASOC library, by saving it as a bundle in the Script Libraries, and check off for ASOC Library in the drawer, then you should be able to call your handlers in that file, from that file.
It should work all right then, when calling the library from a script where you don’t have to include the framework “Foundation” clause. (But of course you’ll include the use library line, and the Use AS 2.3 line, and the use scripting addtions line.)
Weird. The exact same scripts ” same files, with code straight from the book ” are working now. I haven’t rebooted, relaunched ASEditor or anything. I guess the computer just needed a good night’s sleep (like its owner).