]> git.saurik.com Git - wxWidgets.git/commitdiff
convert all M8.mcp files in a folder, not just the first one
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 28 Apr 2004 22:03:15 +0000 (22:03 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 28 Apr 2004 22:03:15 +0000 (22:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/mac/M8xml2mcp.applescript

index b0733cd8146b96fccfe642bc74f72f1848f1f975..7fdd1dfce0507bbabc74394d0116a9f3dc34add9 100755 (executable)
@@ -42,13 +42,10 @@ on ImportProjects(inFolder)
        
        tell application "Finder" to update inFolder
        
-       try
-               tell application "Finder" to set theXml to ((the first file of inFolder whose name ends with gXmlSuffix) as string)
-       on error
-               set theXml to ""
-       end try
+       tell application "Finder" to set theXmlList to (every file of inFolder whose name ends with gXmlSuffix)
        
-       if theXml is not "" then
+       repeat with theXml in theXmlList
+               set theXml to theXml as string
                set theXmlCount to theXmlCount + 1
                
                -- save the current text delimiters
@@ -78,7 +75,7 @@ on ImportProjects(inFolder)
                                tell me to display dialog "Error " & errnum & " importing " & theXml & " to " & theImport
                        end try
                end tell
-       end if
+       end repeat
        
        tell application "Finder" to set theSubFolders to every folder of inFolder whose name does not end with " Data"
        repeat with theFolder in theSubFolders