Alan,
follows code I use to get a list of file(s) dragged from desktop (or
wherever) to 'attach' to a parent record . The file is eventually
copied to the 4D server machine, in a preference specified location.
The drag n drop occurs onto a listbox.
<Code>
//Project Method: atchfile_Manage_Drag_n_Drop
// $1 - pointer - to parent record ID field
// (parent for attached files, i.e. Experiment, samples, project)
// ∙ Created 4/27/10 by Chip -
C_POINTER($1;$Parent_ID)
C_TEXT($File_Path)
C_LONGINT($i;$Items_to_Process)
ARRAY TEXT($Dropped_Files;0)
$Parent_ID:=$1
$i:=1
Repeat
$File_Path:=Get file from pasteboard($i)
If ($File_Path#"")
APPEND TO ARRAY($Dropped_Files;$File_Path)
$i:=$i+1
End if
Until ($File_Path="")
$Items_to_Process:=Size of array($Dropped_Files)
If ($Items_To_Process>0) //there was at least one valid path -
For ($i;1;$Items_to_Process)
$File_Path:=$Dropped_Files{$i}
If ($File_Path[[Length($File_Path)]]=":") //this is a directory
utl_File_Upload_Folder ($Parent_ID;$File_Path;"Start Here")
Else
utl_File_Upload_File ($Parent_ID;$File_Path)
End if
End for
lstbox_Incld_Display_Current
End if
//End atchfile_Manage_Drag_n_Drop
On Wed, 25 Jan 2017 09:11:10 -0500, Alan Tilson wrote:
> Hello everyone,
>
> I'm actually using v13 and I am getting the On Drop event to occur, but I
> don't understand how to capture the data that is dropped?
>
> And I couldn't find a place to change the settings, probably because this
> db was created in v11 (I believe).
>
> I've tried using DRAG AND DROP PROPERTIES($vpSrcObj;$vlSrcElem;$vlPID) but
> $vpSrcObj is a nul pointer (is this just for dropping 4D objects?).
>
> Any suggestions would be appreciated!
>
> Alan Tilson
>
> On Thu, Apr 21, 2016 at 5:11 PM, Chip Scheide <[email protected]>
> wrote:
>
>>
>> THANKS!
>>
>> On Thu, 21 Apr 2016 22:54:28 +0200, Keisuke Miyako wrote:
>>> you have to enable the feature for converted dbs, in db settings
>>>
>>>
>>>
>>>
>>> **********************************************************************
>>> 4D Internet Users Group (4D iNUG)
>>> FAQ: http://lists.4d.com/faqnug.html
>>> Archive: http://lists.4d.com/archives.html
>>> Options: http://lists.4d.com/mailman/options/4d_tech
>>> Unsub: mailto:[email protected]
>>> **********************************************************************
>> **********************************************************************
>> 4D Internet Users Group (4D iNUG)
>> FAQ: http://lists.4d.com/faqnug.html
>> Archive: http://lists.4d.com/archives.html
>> Options: http://lists.4d.com/mailman/options/4d_tech
>> Unsub: mailto:[email protected]
>> **********************************************************************
>>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ: http://lists.4d.com/faqnug.html
> Archive: http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ: http://lists.4d.com/faqnug.html
Archive: http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************