Thursday, December 1, 2022

#1 2005-10-13 02:14:44 pm

From:: Malasaña, Madrid
Registered: 2002-11-20
Posts: 2014

What is a "record"?

A record is a collection of keys and values. You access such values invoking its keys (or labels):


set theRecord to {a:1, b:"string", c:{1, 2, 3}, d:{a:1, b:2}}

tell theRecord
   its a --> a number: 1
   b of it --> a string: "string"
end tell

c of theRecord --> a list: {1,2,3}
theRecord's d --> a record: {a:1, b:2}

Keys can be also properties defined by developers:


display dialog "Hello!" giving up after 5
--> {button returned:"OK", gave up:false}

Here we get some info after we display a dialog: the button pressed by the user (if any) and if it was gave up.



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)