can't continue error?

From: Jason Frankovitz (jason.frankovitz@INFORMIX.COM)
Date: Thu May 17 2001 - 07:08:48 AEST


Hi,

i'm writing a small script to monitor a folder for changes. here's the script:

property myfolder : choose folder
property folder_check_delay_time : 1
property busy_items : {}

on idle
        tell application "Finder"
                if (count of (list folder myfolder)) is equal to 2
then -- shared vols have 2 invisible files
                        say "nothing in folder, waiting..."
                        return 3
                end if
                if (count of (list folder myfolder)) is greater than 2 then
                        say "hey!"
        problem ---->  repeat until check_busy_status() is "done"
<-------- problem
                        end repeat
                        -- now everything is quiescent
                        say "no busy files in the folder"
                end if
        end tell
        return 5
end idle

on check_busy_status()
        set current_list to {}
        tell application "Finder"
                repeat until current_list is equal to (list folder myfolder)
                        -- look for any files within the folder that
are still transferring
                        set current_list to list folder myfolder
                        say "current list is set"
                        if (current_list is not equal to (list folder
myfolder)) then
                                say "waiting for content"
                                delay the folder_check_delay_time
                        else
                                say "current list is equal to list folder"
                        end if
                end repeat
                say "folder done"
        end tell
        return "done"
end check_busy_status


At the line marked "problem" i get an error during runtime saying
"can't continue check_busy_status".

Anyone know what is going wrong here? Am I not allowed to have
subroutine calls as a repeat conditional?


Many thanks in advance,

-Jason

------------------------------



This archive was generated by hypermail 2b29 : Sun May 27 2001 - 12:00:28 AEST