• 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
Re: Issue with files passed to subroutines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with files passed to subroutines


  • Subject: Re: Issue with files passed to subroutines
  • From: Timothy Bates <email@hidden>
  • Date: Sun, 09 Sep 2001 01:05:56 +1000

On 9/9/01 12:43 AM, "Irwin Poche" <email@hidden> wrote:
> why doesn't this work?
> tell application "Finder"
> 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

you have to address the finder inside your handler

on check_file(the_file)
tell application "Finder "
set itemComment to comment of the_file
log itemComment
end
end check_file


PS: One way to spot this kind of error is that key words like "comment" are
formatted as it they were user variables instead of object names: the
handler does not know about the Finder and so has no idea that the_file has
a "comment" property or what this might even mean.

tim

Dr Timothy Bates <mailto:email@hidden>
Macquarie Centre for Cognitive Science (MACCS)
Macquarie University
Ph 61 (2) 9850 8623
Fx 61 (2) 9850 6059


References: 
 >Issue with files passed to subroutines (From: Irwin Poche <email@hidden>)

  • Prev by Date: Re: Issue with files passed to subroutines
  • Next by Date: Re: Success: Re: can i 'store script' as stay open applet?
  • Previous by thread: Issue with files passed to subroutines
  • Next by thread: Re: Issue with files passed to subroutines
  • Index(es):
    • Date
    • Thread