Re: Handler joy
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. |
----------------------------------------------------------------------