tags:

views:

40

answers:

1

I discovered that if I try to access a field in a record, e.g.:

set track_album to (|Album| of t)

And that field does not exist, AppleScript throws an error. How can I check if that field exists first? Or how to let it fail silently? (Whichever is the best practice.)

+2  A: 
set track_album to album of (t & {album:default})

it will be set to album if it exists or default if not.

or

try
album of t
on error -1728
default
end try
jspcal