I started a thread over on Apple Discussions about this problem, but nobody there has been able to help me as of yet .
I have a really large script that I’ve been working on for quite some time: 7899 lines, over 192k characters. Unfortunately, it seems that I can’t make it any bigger. There is some sort of limit to how much code I can have in the script-- any more, and Smile (my editor of choice, although Script Editor 2 will do this as well) will report an Internal table overflow (-2707) error when trying to save the script. It compiles OK, however. Furthermore, to even get this script to compile in the first place it is necessary to tweak the AppleScript formatting from the Formatting pane in Script Editor so that all styles except for “New text (uncompiled)” are formatted the same. (The reason for this is that otherwise the script would have more than 32765 style changes-- not allowed.)
I can’t find any documentation on this error or cases like mine, but I don’t think that it’s my code. The script works fine, but if I copy over one of my larger handlers and rename it-- which doesn’t add any complexity except one more handler-- it will go over this limit and break. Comments do not seem to be included in this limit.
Splitting it up isn’t an option: Most of the handlers need to have read-write access to a set of global properties, in addition to calling other handlers. I tried using load script and the parent property to create a working inheritance model, but it seemed broken (see this other thread at Apple discussions).
I relayed my concerns to the developer of Smile (Emmanuel). He gave me the fix for the styles problem (see above), but he couldn’t figure out what was causing the -2707 error. He reported that he’d seen scripts larger than mine run in Smile.
Yes, I have heard all the wonderful things Script Debugger can do-- I downloaded the demo but was unable to determine that it worked because I couldn’t save. Besides, I’m not ready to plunk down that much money on an editor. Maybe AppleScript Studio can make it work, but somehow I doubt it.
The script is too big to post here, although I’ll email it when asked. If anyone has any insight… This board is probably my last hope for future development of my script.
System: 10.3.2, current on updates as of today. Smile 2.5.9, Script Editor 2.0. B & W G3, 320 MB of RAM total.