Re: How to 'load' osaxen
Re: How to 'load' osaxen
- Subject: Re: How to 'load' osaxen
- From: Chris Nebel <email@hidden>
- Date: Sun, 17 Jun 2001 13:20:27 -0700
- Organization: Apple Computer, Inc.
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.
--Chris Nebel
AppleScript Engineering