more on records, properties and labels
more on records, properties and labels
- Subject: more on records, properties and labels
- From: Richard 23 <email@hidden>
- Date: Tue, 2 Jan 2001 15:23:18 -0800
>
>>BTW, it looks like you'll have to change the names of the "state" and
>
>>"month" fields because they are already used by Applescript.
>
>
>
>Perhaps not...
>
>copy {state:"a", month:"b"} to x
>
>x's month
>
>
>
>seems to work.
>
>
You're right, but I don't understand why.
month (dunno about state) is a label which functions as a property of
a value whose class happens to be date.
If your direct parameter (get is implied if no command is supplied)
the object/value you're referring to probably doesn't have a month
property unless its a script object or record that you provided with
a month property.
if month isn't found in the direct parameter the last place AppleScript
will check is the current script...perhaps a good place for a default.
This may generate more answers or more questions but here goes:
--------------------
property month : "none"
script DateObj
property month : "pseudo"
end script
script FateObj
end script
month of (current date)
--> January
month of DateObj
--> "pseudo"
FateObj's month
--> "none"
get month
--> month
get my month
--> "none"
--------------------
I use terminology from Standard Additions or the AppleScript Extension
for script or record properties whenever I want them to stand out.
It's legal and its free!
Plus since they're already core AppleScript terms so there's unlikely
to be an osax conflict.
R23