Re: script object properties: seeking confirmation
Re: script object properties: seeking confirmation
- Subject: Re: script object properties: seeking confirmation
- From: Andy Wylie <email@hidden>
- Date: Tue, 12 Mar 2002 13:44:19 +1300
on 12/3/02 5:22 AM, Jon Pugh at email@hidden wrote:
>
At 11:14 AM -0800 3/5/02, Bill Hoffman wrote:
>
> I just wanted to clarify whether AS allows dynamic creation of properties of
>
> a script object at runtime, or requires that all possible properties of an
>
> object be declared on creation of the script object.
>
>
Once again invoking Donald's Commands, I must mention that AppleScript
>
provides this capability via the OSA API to code (i.e. not AppleScript code)
>
but the "set property" osax provides that aspect.
>
>
Here's a sample:
>
>
script foo
>
property bar : "bar"
>
end script
>
set foo to set property "xyzzy" of foo to "it's magic"
>
xyzzy of foo
>
has anyone used this enough to know the true color/kind of it's magic?
>
You can get Donald's Commands from here:
>
>
<ftp://mirror.apple.com//mirrors/gaea.scriptweb.com/applescript/osaxen/Donalds
>
Commands.sit.hqx>
>
What an ancient treasure, thanks!
"-- Add a new handler
set y to set handler "hello" of x to grob"
could Arthur Knapp be Donald's long lost bastard son?
>
I was having more fun skiing and drinking. ;)
>
so what did you do at night} shelter in an ice cave feasting on ski bunnies,
burning rope and rendering ski dog feats of daring do on the walls?
I hope you got some nice [1]conditions.
____________________________ Andy
[1]
http://www.stg.brown.edu/~sjd/mymusings/eskimo.html
_______________________________________________
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.