PosixPath to quoted form of posix path

Hi,

my app have a tableview, where i can drop quarkxpress files and when i double click on a row, i want to open the file in quarkxpress.
I want to dropped files from a server-volume (name of the Servervolume is “STB/MTB”) to the tableview, but when i double click to a row, quarkxpress can not find the file. I think the problem is the name of the server “STB/MTB”, because when i dropped files from another server without a “/” in the name quarkxpress can open the file.

I read something about “quoted form of” but i dont know how i can do this

please help me!

Many thanks!

on double clicked the_object
	if name of the_object is "dropped_files" then
		set tableView to table view "dropped_files" of scroll view "dropped_files" of window "main"
		set theRows to selected data rows of tableView
		tell table view "dropped_files" of scroll view "dropped_files" of window "main"
			set theDataRow to item 1 of theRows
			set fileName to contents of data cell of theDataRow as alias
			set fileName to POSIX path of fileName
		end tell
		tell application "QuarkXPress Passport"
			activate
			open file fileName use doc prefs yes remap fonts ask do auto picture import ask
		end tell

Browser: Safari 312
Operating System: Mac OS X (10.4)

This is not a “quoted form” issue. You are doing lots of things wrong here. The easiest solution is for you to once again look at my “dropper” project which includes code for getting the currently selected row from a table and coercing the contents to a file reference (from either an HFS-style path or a POSIX path). This even includes doing this by double clicking on the table, just like you want:

http://homepage.mac.com/jonn8/as/dist/dropper.zip

For your needs, just change the code in the “reveal_item” handler to:

on reveal_item()
	set the_item to my get_selected_path()
	if the_item = false then return
	tell application "QuarkXPress Passport"
		activate
		try
			open (the_item as alias) use doc prefs yes remap fonts ask do auto picture import ask
		on error
			open (the_item as POSIX file) use doc prefs yes remap fonts ask do auto picture import ask
		end try
	end tell
end reveal_item

Jon

Model: PowerBook 1.25MHz
AppleScript: 1.10
Browser: Safari 412
Operating System: Mac OS X (10.4)

jonn8
many thanks!!! now it works…

Browser: Safari 312
Operating System: Mac OS X (10.4)