Get file for DragPromise

Xojo has an example for getting promised files from Mail:

[code] declare function NSClassFromString lib “Foundation” ( name as CFStringRef ) as integer
declare function NSTemporaryDirectory lib “Foundation” () as CFStringRef
declare function fileURLWithPath lib “Foundation” selector “fileURLWithPath:” ( obj as integer, path as CFStringRef ) as integer
declare function namesOfPromisedFilesDroppedAtDestination lib “AppKit” selector “namesOfPromisedFilesDroppedAtDestination:” ( obj as integer,destination as integer ) as integer
declare function count lib “Foundation” selector “count” ( obj as integer ) as integer
declare function stringAtIndex lib “Foundation” selector “objectAtIndex:” ( obj as integer, index as integer ) as CFStringRef

// The destination is an NSURL that is where will write its eml files to.
dim destination as integer = fileURLWithPath( NSClassFromString( “NSURL” ), NSTemporaryDirectory() )

// namesOfPromisedFilesDroppedAtDestination: gives us an array of file names that
// wrote into our destination.
dim promisedFiles as integer = namesOfPromisedFilesDroppedAtDestination( item.Handle, destination )
for i as integer = 0 to count( promisedFiles ) - 1
dim filename as string = stringAtIndex( promisedFiles, i )

// This is normally where you would process the dropped file. We're just going
// to add it to our ListBox.
if i = 0 then Listbox1.DeleteAllRows()
listbox1.AddRow( filename )


How would I access the file itself? I need the path of the file and not the file name. And I’m totally declare-challenged. Any ideas?

Have you already tried the solutions/suggestions from this Thread?

Thanks, Sascha, I’m just having senior moments obviously.