realbasic-nug
[Top] [All Lists]

Re: Drag and Drop: How to receive a promised FolderItem?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Drag and Drop: How to receive a promised FolderItem?
From: "Joseph J. Strout" <joe at strout dot net>
Date: Thu, 29 Dec 2005 21:33:58 -0700
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BFDA1E8A dot F83F%alexander dot traud at macnews dot de>
At 11:15 PM +0100 12/29/05, Alexander Traud wrote:

Has anyone ever tried to receive a promised FolderItem in REALbasic?

Yes, I have, but it's rather tricky...

At the moment I guess I have to create a DragReceiveHandlerProcPtr then a
DragReceiveHandlerUPP, use it with AddressOf/::InstallReceiveHandler,
duplicate the code of the technical node's snippet 12-14 and then play with
a FSSpec struct to get my data.

Well, no, it's not THAT tricky. IIRC, if you AcceptRawData("phfs"), then REALbasic will automatically tell the promiser to create the file if needed (in the temporary items folder), and then give that to you as DragItem.FolderItem (or whatever). Have you tried that?

Of course it's up to you to notice that the given file is in the temporary items folder, and then delete it when you no longer need it.

Best,
- Joe

--

Joseph J. Strout
joe at strout dot net
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>