Re: osaxen loaded into memory
Re: osaxen loaded into memory
- Subject: Re: osaxen loaded into memory
- From: email@hidden
- Date: Fri, 6 Jul 2001 11:22:49 -0400
On Fri, 06 Jul 2001 15:08:03 +0200, JJ <email@hidden> asked,
>
I was re-studying "Jon's Commands" (up to six hours!) and readed the
>
documentation from 2.1.2 version about command "load embedded scripting
>
additions".
[...]
You may want to read Apple's Tech Note 1164, on Native Scripting Additions. I
don't know if Jon's "load embedded scripting additions" can work for native
scripting additions, since they don't have their code in an osax resource, but
in the data fork.
>
So, I understand:
>
>
1. Build the following aplet and then copy into it resources (from
>
"password" osaxen):
>
- "osax", the code.
>
- "DITL" & "DLOG", needed by "osax"
>
to display the password interface.
>
>
2. Kill coercions:
>
Copy "password" osaxen to desktop, delete the original & empty trash
You will probably need to restart to get the in-memory copy to go away, unless
"password" is a native scripting addition (in which case it won't have an osax
resource. Unless its "fat", with both 68k code in its resource fork and PowerPC
code in its data fork.)
>
3. Run aplet:
>
-- START SCRIPT --
>
>
load embedded scripting additions
>
--> loads embedded "osax" rsrc into memory and install it
>
>
user password
>
--> display correctly the password interface
>
--> uninstall "osax" rsrc
No. The osax resource loads when needed, and can be purged if the system needs
the memory back. But the purging is under control of the system, not the osax
or script itself. (Native scripting additions can be unloaded when their file
is removed from the Scripting Additions folder, according to TN 1164. Does this
happen? I haven't experimented.)
>
-- END SCRIPT --
>
>
So, have we these loading-osax types?:
>
1. "Always-running" (busy files). At my computer:
>
> AppleScript Formatting
>
> RegEx Commands
>
> Standard Additions
>
> Satimage
>
2. Persistent coercions: (loaded into memory but not installed until
>
they are required/called?)
>
3. Punctual coercions: (the ones generated by, i. e., Jon's Commands?)
Its not that complicated. Coercions and command handlers are both event
handlers; its just that the system calls coercions automatically when needed
while commands are explicitly called by your script.
The busy files are probably native scripting additions, which load their code
fragments (and lock the data forks) on initialization, and unload when directed.
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden