Hi,
I have an AS application that has been running fine on PPC/Tiger and uses the following open panel code to allow the user to select a file:
on selectFile(buttonName)
-- Setup the open panel properties
tell open panel
set can choose directories to true
set can choose files to true
set prompt to buttonName
end tell
set theResult to display open panel
if theResult is 1 then
set tempPath to path name of open panel
set tid to getTID()
setTID(".")
set extension to last text item of tempPath
setTID(tid)
ignoring case
if extension is equal to "gpx" then
set filePath to tempPath
else
set filePath to "file should have \".gpx\" extension"
display dialog filePath
end if
end ignoring
else
set filePath to "No file selected"
end if
return filePath
end selectFile
Under Tiger I can select a *.gpx (from gpsbabel) from open panel no problem (these are unicode text files).
When I copy a gpx file from the PPC/Tiger machine to the Intel/Leopard machine or create it directly on the Intel/Leopard machine (via gpsbabel) and use the AS app to try to navigate to it, the file does not shown in the dialog.
The terminal shows the file exists and it shows in the finder on the Intel/Leopard machine so as far as I can tell it is not ‘invisible’.
The file doesn’t show in either the PPC AS app (running in Rosetta) open panel dialog or an Intel compiled version.
Has something changed in ‘open panel’ between Tiger and Leopard?
Regards,
Brad