Re: what is the best way to 'unset' a variable
Re: what is the best way to 'unset' a variable
- Subject: Re: what is the best way to 'unset' a variable
- From: Arthur J Knapp <email@hidden>
- Date: Sun, 24 Mar 2002 11:40:38 -0500
>
Date: Sun, 24 Mar 2002 00:38:09 +0000
>
From: has <email@hidden>
>
Subject: Re: what is the best way to 'unset' a variable
>
Arthur J Knapp wrote:
>
>
> script o
>
> ...
>
> end script
>
>
>
> set o to missing value --> "o" no longer points to the script
>
Careful with that sort of construct... for it may lead to self-destructing
>
scripts, and much wailing and wringing of hands shall surely follow.
Yeah, I should have been clear that I was only making a point about
variables and other "name-space" identifiers. If I wanted to be able to
"delete" a script object, I would never create it as a top-level object
in the first place, ie:
on run
set myObject to newObject()
...
set myObject to missing value
end run
on newObject()
script ObjectTemplate
...
end script
return ObjectTemplate
end newObject
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.esglabs.com/>
on error number -128
end try
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.