• 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
Type coercion question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>
-----------------


  • Prev by Date: Re: Repeat Loop Skipping Items
  • Next by Date: Re: Repeat Loop Skipping Items
  • Previous by thread: Re: Scripting in OSX: Classic osaxen for Classic apps?
  • Next by thread: Applets running in Classic
  • Index(es):
    • Date
    • Thread