• 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: Handler joy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Handler joy


  • Subject: Re: Handler joy
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 27 Feb 2001 16:21:04 -0800

On 2/27/01 2:56 PM, Jeff Davison <email@hidden> wrote:

>Why am I having this problem?
>
>if I run this line outside of the handler
>
> get the number of items of ProcessedFolder
>
>(where ProcessedFolder is the alias "Hard Disk:Desktop Folder:Test
>II:Masters:Processed:")
>everything works fine and it returns the # of items inside the Processed
>folder. Even if there is nothing in the folder (what I want) But if I simply
>place this line inside a handler and send it the ProcessedFolder alias like
>this...
>
>on CheckProcessed (pFolder)
> get the number of items of pFolder
>end CheckProcessed
>
>It gives me an error "Can't get every item of alias "Hard Disk:Desktop
>Folder:Test II:Masters:Processed:"
>???
>
>What am I missing?

I bet that outside of the handler, it is wrapped in a tell application
"Finder" wrapper. This will work.

set aFolder to (choose folder)
CheckProcessed(aFolder)

on CheckProcessed(pFolder)
tell application "Finder"
get the number of items of pFolder
end tell
end CheckProcessed

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: Re: Write to file
  • Next by Date: Re: Network Setup Scripting error
  • Previous by thread: Re: Handler joy
  • Next by thread: Re: Handler joy
  • Index(es):
    • Date
    • Thread