I’ve been having some problems lately with my script that were not problems before…perhaps because of version upgrades and all.
I need to have access to a complete list of AppleScript codes and their meanings so I can have an idea what errors I need to look for in my codes.
Anybody knows where I can download such file? I tried to google this bulletin board but found no lead.
I’ll be darned. I went to the developer’s website, made the search and still did not find it.
Your URL just took me directly where I wanted to go.
Thanks a lot. I’ve got what I need now.
Note that Apple changed a lot of the numbers and added a few. For instance, there is no error number -1762 Apple event error listed. This is the same list in the AppleScriptLanguageGuide.
I doubt Apple have changed any error numbers as those are system-level codes and changing their meaning now would cause major breakage all over the place, not just in AS.
The error code list in the ASLG isn’t meant to be a comprehensive list of Mac OS error codes, only those that ASers are likely to encounter. Error -1762 (errOSACantOpenComponent) has been around forever, for example, but it’s not listed in the ASLG because you’re unlikely to encounter it in AS itself. Though if you do need a comprehensive list of classic Mac OS error codes, just Google for it.
Probably the main annoyance is that Cocoa doesn’t use classic Mac error codes itself, so most Cocoa-based apps return various NSError messages that AppleScript (which predates Cocoa) doesn’t know how to translate to more readable descriptions. The ASLG also predates Cocoa, hence the additional links to Cocoa Scripting error codes.
Thanks for the info!
I’m quite sure I came upon an error last week, looked up the error number and it changed, but maybe they just changed the message or something. If I get it again I’ll post it.
Lots of thanks for the additional information.
Error -1762, I noted too, is not in the list that I looked at. I was zeroing in on that particular error code because it kept popping up in my little app; the entire list is useful for further info in case I do run into more troubles (hopefully, not).
Now, may I ask further how I can deal with this particular error code? I need some help in deciphering these Cocoa error messages. Does it mean that some component of my script cannot be opened? (just my little try at literal translation of the message).
Bad thing is my app (AS Studio) compiles successfully but fails on some aspects (the Quit part), making it difficult to debug. Wish I know a lot more how to use Xcode’s debug feature.
Thank you for your kind attention.
Here’s a quick update on the problem with the missing component that generated the Error Code -1762.
It is related to some windows in my AS Studio application that had “Released when closed” checked or activated. By unchecking them, it resolved my problem and does not generate any Error -1762 anymore.
Better still, the application is working well right now.
Thanks for the kind help.