Re: How to 'load' osaxen
Re: How to 'load' osaxen
- Subject: Re: How to 'load' osaxen
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 17 Jun 2001 14:24:25 -0700
On 6/17/01 1:20 PM, "Chris Nebel" <email@hidden> wrote:
>
Greg Strange wrote:
>
>
>> The easiest way to do the latter is to call "run script" with something
>
>> trivial, e.g., "1+1". A faster but somewhat underhanded way to do it is
>
>> to tell yourself to <<event ascrgdut>>. That's the internal event that
>
>> AppleScript uses to update scripting additions.
>
>
>
> Would this trick help us when we are taking out osaxen for testing purposes?
>
>
It's a start, but it's not the whole story in most cases. (Unfortunately.)
>
For PowerPC-native additions, this trick is all you need. 68K additions,
>
however, are unloaded in a very lazy and somewhat unpredictable manner. What
>
you have to do is remove the addition, send the event as above, and then purge
>
the addition code from the system heap. There's no way I know of to do this
>
from AppleScript, but you can do it using Metrowerks' ZoneRanger's "purge"
>
command, or using MacsBug. In general, restarting is the simplest way to
>
reliably get rid of an addition, though of course it's also the most
>
disruptive.
>
Jon Pugh has several times recommended an alternate method to restarting,
which always seems to work and is less disruptive:
1. _Duplicate_ (option-drag) the osax in Scripting Additions folder to the
desktop (or anywhere outside the System folder).
2. Drag the original from SA folder to the trash.
3. Empty the trash.
Now your SA folder is clean of this osax, an you'll see raw codes in any
script that calls it, when compiled. When done with testing, put the saved
copy into the SA folder, call it or "run script" or now your new method of
<<event ascrgdut>> in a try block, to use it again.
--
Paul Berkowitz