• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Issue with files passed to subroutines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Issue with files passed to subroutines
      • From: Timothy Bates <email@hidden>
  • Prev by Date: Anyone know how to set an arbitrary subset of record elements? (another reason that associative arrays would be nice)
  • Next by Date: Re: Issue with files passed to subroutines
  • Previous by thread: Re: Anyone know how to set an arbitrary subset of record elements? (another reason that associative arrays would be nice)
  • Next by thread: Re: Issue with files passed to subroutines
  • Index(es):
    • Date
    • Thread