]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/mac/M8xml2mcp.applescript
Applied patched for combo box SELECTED events (no
[wxWidgets.git] / docs / mac / M8xml2mcp.applescript
index b0733cd8146b96fccfe642bc74f72f1848f1f975..7fdd1dfce0507bbabc74394d0116a9f3dc34add9 100755 (executable)
@@ -42,13 +42,10 @@ on ImportProjects(inFolder)
        
        tell application "Finder" to update 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
                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
                                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
        
        tell application "Finder" to set theSubFolders to every folder of inFolder whose name does not end with " Data"
        repeat with theFolder in theSubFolders