Re: script object properties: seeking confirmation
Re: script object properties: seeking confirmation
- Subject: Re: script object properties: seeking confirmation
- From: Arthur J Knapp <email@hidden>
- Date: Tue, 05 Mar 2002 17:36:51 -0500
>
Date: Tue, 5 Mar 2002 13:04:51 +0000
>
From: has <email@hidden>
>
Subject: Re: script object properties: seeking confirmation
>
Bill Hoffman wrote:
>
>
> I can't dynamically create a new property of an object at
>
> runtime in this manner (like I could in JavaScript, for example, with
>
> "this.income = 500;")
>
Don't think so. I'm curious though why you'd want to avoid declaring your
>
object's properties at compile time.
>
A couple of reasons I could think of for doing this might be:
>
>
1. if you've got a bunch of old objects already in existence...
>
2. if you want to trap runtime errors caused by the user trying...
I am surprised at you, has. ;-)
(Given that you are amoung the most vocal advocates for AppleScript to
have dynamically settable properties in records).
A script object is, (conceptually), nothing more than a record of
property/value pairs, with the addition of handlers. There are at
least as many good reasons for an object to have dynamically set
properties as there are for an AppleScript record.
{ Arthur J. Knapp, of <
http://www.STELLARViSIONs.com>
<
mailto:email@hidden>
try
<
http://www.MacScripter.net/>
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.