Type coercion question
Type coercion question
- Subject: Type coercion question
- From: Giorgio Valoti <email@hidden>
- Date: Sat, 09 Jun 2001 12:59:36 +0200
- Organization: MMNet
Hi all,
I can't explain why:
repeat with i from 1 to count of folderList
set test to (item i of folderList) as string
copyFiles(solutionFolder, (intFolder & (item i of folderList) as
string) as alias)
...
end repeat
works fine, while:
repeat with i from 1 to count of folderList
copyFiles(solutionFolder, (intFolder & (item i of folderList) as
string) as alias)
...
end repeat
gives a coercion error. If this helps the variable folderList gets its
values from this sub:
on createCDFolders(folderPath, codAgenti, agenti)
set CDFolderList to {}
tell application "Finder"
delete every item of folderPath
repeat with i from 1 to count of codAgenti
set thisFolderName to my createFileNameFromList({item i of codAgenti,
" - ", item i of agenti})
set CDFolderList to CDFolderList & thisFolderName
try
make new folder at folderPath with properties ,
{name:thisFolderName}
end try
end repeat
end tell
return CDFolderList
end createCDFolders
Surely I'm missing something....
TIA
--
Giorgio Valoti
Magnetic Media Network <
http://www.magneticmedia.com>
-----------------