Drag and Drop File Names

Hopefully someone in here can help with this…
I am rewriting an app I wrote in Facespan 3.5.2 in XCode 1.5. No big deal but - the drop returns the POSIX path, not an alias. The class of the drop is Unicode Text and I can’t seem to coerce it into something the Finder or InDesign CS (3.0.1) wants to deal with.

I want to avoid doing funky string manipulations like stripping out the first “/”, adding the name of the startup disk to the front, and converting the remaining slashes to colons.

Anyone have any suggestions? The rest of the code is idiot simple, it’s just this little thing that’s driving me crazy. It’s like having a splinter in your finger or a piece of popcorn stuck in a molar! I know it’s there and I can’t stop picking at it but I just can’t seem to work it out. Anyways…

Here’s my return >> /Users/BLUEFROG/Desktop/TestTHIS.eps
I need >> (alias) MyMac:Users:BLUEFROG:Desktop:TestTHIS.eps

Any help is appreciated,
Jim Neumann
BLUEFROG

Try this:

Jon


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!

Jon:

That’s exactly what I was looking for. I resorted to some string manipulations before reading your reply (which did give me a chance to exercise my delimiters a bit) but this is pure elegance.

Jim Neumann
BLUEFROG

P.S. Did I remember to thank you?