Issue with files passed to subroutines
Issue with files passed to subroutines
- Subject: Issue with files passed to subroutines
- From: Irwin Poche <email@hidden>
- Date: Sat, 08 Sep 2001 09:43:09 -0500
Can anyone tell me why this simple script works...
tell application "Finder"
activate
set sFiles to files in selection
set itemComment to comment of item 1 of sFiles
log itemComment
end tell
but attempting to do the same thing with a subroutine does not...
tell application "Finder"
activate
set sFiles to files in selection
my check_file(item 1 of sFiles)
end tell
on check_file(the_file)
set itemComment to comment of the_file
log itemComment
end check_file
After the error the word "comment" in the first line of the check_file
handler is hilighted. The error reads
--> Finder got an error: Can't get comment of file "..." of
folder "..." of startup disk.