Re: Reading Lists and Records from Disk Files
Re: Reading Lists and Records from Disk Files
- Subject: Re: Reading Lists and Records from Disk Files
- From: Richard 23 <email@hidden>
- Date: Sun, 7 Jan 2001 14:42:40 -0800
>
Hello Richard, in the past i tried to use the same method but it didn't work
>
correctly. I don't remember the exact errors but one of the problems was
>
that the prefs file obvious contained the whole parent script (about 250
>
Kb).
Hi cris.
I'd be interested to see what you did that didn't work if you wanted
to send me something offline. At any rate at least you have a working
example that will encourage you to try again. I'll bet the parent
property inserted into that script you mention would work better than
dexatrim to slim down that file...
>
Your example works very well, but it makes no difference if i remove the
>
line:
>
property parent : AppleScript
>
No matter how large i make the parent script, the resulting prefs file has
>
always the same size, so it seems the parent is never saved in your
>
example!?
It will under the right conditions. Being that it was such a simple
example makes it less than a real-world script where any number of
factors can contribute to the result.
I'll file away that nugget of info that in this case...no bloat.
But most likely it's due to one or more of these:
1. No variables are referenced which are properties of the parent.
2. The script object itself was generated within a handler and its
scope ends there. In fact the script object is generated every
time the handler is called and no part of it persists.
3. Ths script object was not in the top level where I believe the
one where I first noted the bloat occurred.
Someone who knows about this ought to speak up!
I wonder how much of the parent is sucked into a script object saved
with store script. Is is all or nothing? Or can subsets of the parent
be stored, if the child makes references to one or more of the parent's
properties and those properties have no further dependencies.
And why can't I load a script object inline, that is have a script
object function in the same scope as a similar one which was originally
part of the script. No matter what I seem to do it always takes a
hurculean effort which makes me less than anxious to try again.
If any "experts" on script objects (if there are any) would like to
spend a little time explaining this, perhaps offline I would really
like to get a handle on this. I've got tons of library files just
waiting for a reliable system. Mine's nearly there but still too
inconvenient to hassle with most of the time. Cut and paste is no
way to script.
R23