Chip,
This is how we manage dragging form a listbox in one process to a listbox
in another process:
1. In the source listbox:
*Case of*
*:* (*Form event*=On Begin Drag Over)
*RESOLVE POINTER*(*Self*;tSourceObjectName;$Table;$field)
*ARRAY LONGINT*($aiItemsSelected;0)
$lElementPos:=*Selected list items*(CategoryList;$aiItemsSelected;*)
*ARRAY TEXT*($atCategoryUUIDs;*Size of array*($aiItemsSelected))
*For* ($i;1;*Size of array*($aiItemsSelected))
*GET LIST ITEM PARAMETER*(CategoryList;$aiItemsSelected{$i};"recordnumber";
$DestCategoryUUID)
$atCategoryUUIDs{$i}:=$DestCategoryUUID
*End for*
$tSource:="CategoryList"
*SET BLOB SIZE*($blob;0)
*VARIABLE TO BLOB*($tSource;$blob;*)
*VARIABLE TO BLOB*($aiItemsSelected;$blob;*)
*VARIABLE TO BLOB*($atCategoryUUIDs;$blob;*)
*CLEAR PASTEBOARD*
* APPEND DATA TO PASTEBOARD*(Text data;$blob)
*End Case*
2. In the destination listbox:
*Case of*
*:* ($event=On Drop)
*GET PASTEBOARD DATA*(Text data;$blob)
$ioffset:=0
*BLOB TO VARIABLE*($blob;$var;$ioffset)
*End Case*
*Then deal with the data according to the content of $var ("CategoryList"
in this case).*
*HTH*
*PB*
On Mon, 12 Aug 2019 at 22:43, Douglas von Roeder via 4D_Tech <
[email protected]> wrote:
> Chip:
>
> Here’s some ALP code that uses that command - it might give you some ideas…
>
> *Case of*
>
> *:* ($formEvent_L=On Drop)
>
>
> *Case of*
>
> *:* ($currentObjectName_T="Lock_CustomerName”)
>
>
> *C_BLOB*($blob_X)
>
> *GET PASTEBOARD DATA*("net.e-node.alp.object";$blob_X)
>
>
> *If* (OK=1)
>
> *C_LONGINT*($eList)
>
> $eList:=*BLOB to longint*($blob_X;Native byte ordering)
>
>
> *C_LONGINT*($row_L)
>
> $row_L:=*AL_GetAreaLongProperty* ($eList;ALP_Area_DragSrcRow)
>
> $text_T:=*AL_GetAreaTextProperty* ($eList;ALP_Area_Name)
>
>
> *Case of*
>
> *:* ($eList=eLineItem)
>
> *GOTO SELECTED RECORD*([Line Items];$row_L)
>
> *OBJ_GPBN* ($currentObjectName_T)->:=[Line Items]Product Name
>
> *UNLOAD RECORD*([Line Items])
>
>
> *:* ($text_T="theOne_List_eList_01")
>
> *C_TEXT*($id_T)
>
> $id_T:=*AL_GetCellTextProperty* ($eList;$row_L;1;ALP_Cell_Value)
>
>
> *OBJ_GPBN* ($currentObjectName_T)->:=*AL_GetCellTextProperty*
> ($eList;$row_L;2;ALP_Cell_Value)
>
> *PROC_FormEvent_Set* ($h_;On Data Change)
>
> *PROPOSALS_FC* ($h_)
>
>
> *End case*
>
>
> *End if*
>
>
> *End case*
>
>
> *End case*
>
>
> --
> Douglas von Roeder
> 949-910-4084
>
>
> On Mon, Aug 12, 2019 at 2:39 PM Douglas von Roeder <[email protected]>
> wrote:
>
> > Chip:
> >
> > Check out the docs for “Managing Pasteboards”. I’ve used this feature
> only
> > with ALP but ALP uses the same drag and drop events that 4D does so there
> > will be some overlap.
> >
> > 4 bytes could well be a longint representing the process ID where the
> drag
> > was initiated - that’s a WAG. The bigger payload could be a BLOB of a
> fair
> > amount of text or perhaps a record that was put into the clipboard when
> the
> > On drag sequence started.
> >
> > Have you checked the knowlegebase or perhaps looked in the Summit
> > materials?
> >
> > --
> > Douglas von Roeder
> > 949-910-4084
> >
> >
> > On Mon, Aug 12, 2019 at 2:06 PM Chip Scheide via 4D_Tech <
> > [email protected]> wrote:
> >
> >> I am dragging and dropping 1 or more records from 1 process onto a
> >> listbox in a second process.
> >>
> >> I see that I can use the pasteboard to mange the data during this
> >> action.
> >>
> >> However....(dragging 1 record)
> >> I am looking at the data types returned by GET PASTEBOARD DATA TYPE
> >> com.4d.private.pid & com.4d.private.Form.Object -- neither of these
> >> makes much sense to me.
> >>
> >> By using GET PASTEBOARD DATA i get a blob which is either
> >> 4 bytes (com.4d.private.pid)
> >> or
> >> 524 bytes (com.4d.private.object.form)
> >>
> >> I do not know what to do with either of these blocks of data... can
> >> someone point me in the right direction.
> >>
> >> The drop area is allowed to accept data from 5 different tables.
> >> I need to be able to differentiate which table the data is from, &
> >> which record(s) were dropped.
> >>
> >> Once I have which ever of the above data types hand, what do I do with
> >> them to extract the needed information.
> >>
> >> Thanks
> >> Chip
> >>
> >> ---------------
> >> Gas is for washing parts
> >> Alcohol is for drinkin'
> >> Nitromethane is for racing
> >> **********************************************************************
> >> 4D Internet Users Group (4D iNUG)
> >> Archive: http://lists.4d.com/archives.html
> >> Options: https://lists.4d.com/mailman/options/4d_tech
> >> Unsub: mailto:[email protected]
> >> **********************************************************************
> >
> >
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive: http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub: mailto:[email protected]
> **********************************************************************
--
*************************************************
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************