RE: AppleScript error, overflow.
RE: AppleScript error, overflow.
- Subject: RE: AppleScript error, overflow.
- From: "Scott Babcock" <email@hidden>
- Date: Fri, 8 Jul 2005 11:24:30 -0700
- Thread-topic: AppleScript error, overflow.
I've encountered this issue as well. In my case, it turned out that I
was duplicating my libraries when I thought I was merely storing
references.
The way I solved this is to have my core library manage the loading of
all the other libraries, storing them in properties in the core library
itself. A script or library that needs a particular library sends a
request to the core library to load it. The core library then checks to
see if the requested library is already stored in its cache. If not, the
library is loaded and cached. Once the core library has the requested
library cached, it sends a reference to the cached library back to the
script or library that requested it:
on LoadLibrary(libraryName)
<snip>
return a reference to my libraryProperty
end LoadLibrary
This is obviously grossly simplified, since it doesn't deal with
managing a list of libraries. The critical pieces, though, are the
phrase 'a reference to' and storing the libraries in properties. This
ensures that you don't duplicate your libraries, which wastes table
space.
-----Original Message-----
Date: Fri, 8 Jul 2005 11:34:13 -0400
From: Hanaan Rosenthal <email@hidden>
Subject: AppleScript error, overflow.
To: Users AppleScript <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Hi,
My AppleScript system is encountering the following error:
Internal Table Overflow -2707
It is happening when loading script libraries.
Possible courses of action:
1. Increase RAM. This may be completely dumb, but the G5 is running
on 1GB and has 8 apps running, some are RAM-hungry.
2. Change library structure:
Right now, a main script is running. It loads sub scripts, each
1000-3000 lines long. Each of these runs and then being destroyed.
Each of these scripts, however, loads its own set of 15 libraries,
some are quite large.
How can I change the loading/unloading structure to avoid the
Internal Table Overflow issue?
Right now the structure is:
1. Main script loads set of libraries
2. Main script loads single large script to run
3. This single large script loads same set of libraries
4. Single script destroyed and replaced by another.
Would it be better to have the loaded script 'refer' to the libraries
that are already used by the Main Processor script (tell
script_library_x of parent)?
Thanks,
Hanaan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden