Problem with Open Dictionary OSAX

I use Open Dictionary - OSAXen written by Nigel Garvey. When I open it from the Apple Scripter it works well, but when I open it as an application I get this error message:

Impossible to design �class appf� id {} of application “Finder” as item

What can I do about this ???

Hello, Robert.

I have to admit that I’m puzzled by this problem. On an English-language system, the error message would actually be: “Can’t make «class appf» id {} of application “Finder” into a item.” This would mean that the Finder was trying to identify an application file from the application’s creator type - but had been given an empty list instead instead of a creator type. This might happen if there was no editor open when the script was trying to decide which editor to use. The mystery is that the ‘application file id …’ construction isn’t used anywhere in the current versions of either of the “Open Dictionary” scripts!

I assume, since you’re posting to this forum, that you’re not using Mac OS X. Could you please tell me what OS you are using, which version of the script you’re using, and whether or not an editor is open when you get the error message? (What should happen when no editor is open is that the script displays its own message, asking you to open an editor first.) Does the error occur with the “Running Applications” script too?

Same with you, Billary. That shouldn’t happen - and doesn’t happen here. Could you provide more details of the circumstances? If this is a common problem with the scripts, I’d obviously love to track it down.

Hello Nigel,

I am working with OS 9.2.2 french universal version. The error message that I gave you was translated from french and may not represent the exact actual english version.

The error message occurs whether or not the Apple Script editor is open. The only way I don’t get any error message is if I first open the script in the editor and the ask to execute it. Otherwise I always get an error massage. Before getting the error message, I first get the display of all the available application/scripting’s dictionnary list. Then when I click on OK, I get this error message. I work with the 1.7 editor version, and your script indicates in the description field “Incorporating improvements suggested by Rainer Erich Scheichelbauer, 8th December 1999”.

If you need other informations, please feel free to ask … :slight_smile: :slight_smile: :slight_smile: Hope this can help.

Hi, Robert.

It sounds as though you may be using the original versions of the scripts. I no longer have copies of these and I can’t think off-hand why they may be erroring. But I do remember that they used the ‘application file id …’ construction and did so after the display of the available items. If you update to the latest version, maybe the error will disappear for you. The scripts are available from the “ScriptBuilders” section of this site:

http://files.macscripter.net/scriptbuilders/ScriptTools/OpenDictionaries_2.1.2

I hope that’s the answer to the problem, but if not, please let me know. (Please let me know if it is the answer too!) :slight_smile:

The link doesn’t work ???

Try:

[url=http://files.macscripter.net/scriptbuilders/ScriptTools/OpenDictionaries_2.1.2.sit]http://files.macscripter.net/scriptbuilders/ScriptTools/OpenDictionaries_2.1.2.sit[/url]

Jon

I have not upgraded to Apple Script 1.8.3 because it is not available in french. When I tried to install the english version, the installer stoped the installation because my system was french. Is there a way around this limitation or maybe is there a french version of 1.8.3 that I didn’t find ??

Thanks for looking … :wink: :wink: :wink:

I have downloaded the 2.1.2 version and everything is OK. The execution speed of this version is quite slower and I don’t know why. But everythings works … Thanks !!!

Hi, Robert.

Firstly, I must apologise for the faulty link I gave you the other day. It was a quarter to three in the morning here when I posted that - way past my bed time! Thanks to Jon for providing the correction.

I’m glad (and relieved!) that everything’s now working as it should. The “OSAXen” script is a bit slower than it was, since it now groups Apple OSAXen separately from scripting applications and third-party OSAXen in the ‘choose from list’ display. This seemed like a good idea at the time - and still does - but unfortunately, it takes three disk reads to arrange. I’ll have another look at it some time and see if I can speed it up. (Hmmm. I’ve just had an idea about that…) It’s noticeably slow on my older machine, but isn’t such an issue on my more recent one.

If you’re running the script itself as an application, you’ll also have to wait for the time it takes the script to launch. I use a utility called “OSA Menu”, which adds a menu to the menu bar from which you can execute scripts directly. There may be a “Lite” version of it on one of your Mac OS installation CD’s, but the “full” version of it is free as well.

Hi, Billary. Happy New Year to you too. :slight_smile:

I can’t see anything in the scripts that might cause major system errors, so I suspect some instability in your own system. Have you tried the “usual culprit” measures like rebuilding the desktop, resetting the PRAM, etc.?

But as I hinted in a earlier reply, the “version 2” scripts are not actually [i]meant[/] to operate if there’s no editor open. This was initially what seemed the most convenient and most sensible way to deal with a problem I’ve encountered with one of my machines, which has both OS 9.2.2 and OS X on the same partition. When I double-click a Script Editor file in OS 9, the machine tries to open the OS X Script Editor - which “owns” the application code “ToyS” in the machine’s desktop file. However, if the OS 9 editor is already open - ie. it’s a running process in the Finder - it claims the code before the desktop file gets a look in. The same processes are involved when trying to open Script Editor with a script. It would be possible to ask the user to locate Script Editor itself on the first run of the script, but this seemed unnecessarily inconvenient given the likely use of the scripts.

Now that the scripts are once again compatible with Smile and Script Debugger, having an editor already open is a great help to the scripts in deciding which editor should open the dictionaries! :wink:

Thanks to you both for the feedback. Please let me know if you encounter any other problems with the scripts. :slight_smile: