• 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
Partial recursion strangeness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Partial recursion strangeness


  • Subject: Partial recursion strangeness
  • From: James Yost <email@hidden>
  • Date: Sun, 25 Mar 2001 23:13:01 -0800

Hello all.
I believe I am having a Finder problem with the following script. It
should change the window views of every folder and sub folder in a
folder. It does not. Only the root folder's view and the views of
every folder in the root level are changed. Folders deeper in the
hierarchy remain unchanged. None of the folder's windows are open
when the script runs.

However,uncommenting the two commented out lines to open and close
Finder windows makes the script perform as expected. That is so ugly
that it's not a solution I can use.

Why does it work on only two levels of a folder? Why not all, or none
if windows must be opened? This script has caused me considerable
head banging today.

I also tried Jon's "walk folders" with exactly the same result. I
don't get it. Can anyone else confirm this behavior, or provide
a reason for the seeming weirdness? I'm on OS 9.1.

Thank You
James Yost

on open (theItems)
repeat with anItm in theItems
doSomeRecursion(anItm)
end repeat
end open

on doSomeRecursion (someFolder)
tell application "Finder"
--open someFolder
set view of window of someFolder to name
--close someFolder
set folderList to every folder of someFolder
if folderList is not {} then
repeat with thisItm in folderList
my doSomeRecursion (thisItm)
end repeat
end if
end tell
end doSomeRecursion


  • Prev by Date: Re: PDF automation
  • Next by Date: Re: Q U A R K * printing postscript file
  • Previous by thread: Re: PDF automation
  • Next by thread: ANNOUNCE: Dialog Studio 1.1.1
  • Index(es):
    • Date
    • Thread