I’m trying to get a value from a NSPathControl in my XIB and change it into a POSIX file, so I can manipulate it in the Finder (make a copy, rename, etc). My code works, but not if there are any spaces in the path. Any spaces are returned as %20, which doesn’t translate into a POSIX file. Any ideas?
on clicked theObject
set theFile to (string value of control "sourceXML" of window "main")
set theFile to (theFile as POSIX file)
tell application "Finder"
reveal theFile
end tell
end clicked