Open panel - Tiger vs. Leopard

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

Hi,

Mystery solved.

I finally realized that I had two similar directories with similar content (one a backup of the other) and had inadvertently navigated to the backup while creating new files in the original. Once I had done this, open-panel kept defaulting to the backup directory.

Question:
Is it possible to delete a ‘recent’ item in an open-panel dialog (e.g. via some keystroke - you can clear recent items in the finder but this doesn’t affect the open panel dialog - maybe there is a preference file that could be deleted)?

Regards,
BJM