Locally Declared Variables & Recursive Handlers

Rob Cozens rcozens at pon.net
Sat Nov 6 09:40:21 CST 2004

Hi All,

Rob Gould's thread on compression/decompression has motivated me to 
invest a little time on folder compression.

While working on my own variation of directoryWalker, I was not 
getting the results I expected.  After some testing I ascertained 
that the value of a local variable declared inside my handler does 
not persist when the handler calls itself.  The problem is solved by 
placing the declaration outside the handler.  This is not too 
surprising when one thinks about it; but it wasn't immediately 
obvious to me.

BTW, my sdbFolderContents handler returns a file named ".DS_Store" 
for each folder on Mac OS X.  Am I correct that that file should NOT 
be stored or decompressed?  Are there similar files in Windows and/or 
Rob Cozens, Staff Conservator
Mendonoma Marine Life Conservancy

"It is contrary to human welfare to contribute in any way...
  to the degradation of the sea's capacity to support life."

  -- Walter Hickel, U. S. Secretary of the Interior, 1971
     in "From Abundance to Scarcity" by Michael L. Weber

More information about the use-livecode mailing list