Re: Drag n drop (between processes)

2019-08-12 Thread Chip Scheide via 4D_Tech
I'll reply in more detail tomorrow, as I am at home.


> I throw the data i want dropped into an object for dragndrop. Then 
> when i drop I know what iam getting as i include the table and record 
> numbers. Where i dragged it from(process,form,object) are also 
> included. Made my listbox drag an drop so much easier to handle and 
> very generic.
> 
> Sent from my iPhone
> 
>> On Aug 12, 2019, at 3:06 PM, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **

Hell is other people 
 Jean-Paul Sartre
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag n drop (between processes)

2019-08-12 Thread Adam Bevan via 4D_Tech
I throw the data i want dropped into an object for dragndrop. Then when i drop 
I know what iam getting as i include the table and record numbers. Where i 
dragged it from(process,form,object) are also included. Made my listbox drag an 
drop so much easier to handle and very generic.

Sent from my iPhone

> On Aug 12, 2019, at 3:06 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> 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:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag n drop (between processes)

2019-08-12 Thread Pat Bensky via 4D_Tech
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 <
4d_tech@lists.4d.com> 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 
> 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 <
> > 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
> >> **
> >
> >
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> 

Re: Drag n drop (between processes)

2019-08-12 Thread Douglas von Roeder via 4D_Tech
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 
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 <
> 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
>> **
>
>
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag n drop (between processes)

2019-08-12 Thread Douglas von Roeder via 4D_Tech
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 <
4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Drag n drop (between processes)

2019-08-12 Thread Chip Scheide via 4D_Tech
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:4d_tech-unsubscr...@lists.4d.com
**

Re: printing listboxes

2019-08-12 Thread Chip Scheide via 4D_Tech
thanks

Ill play with it some more
Chip

On Mon, 12 Aug 2019 14:30:30 -0600, Adam Bevan via 4D_Tech wrote:
> Hi Chip,
> 
> I know that 'calculated' columns do print in v12 and v16. The only thing I
> haven't done is use relate one in my 'calculated' column methods.
> 
> Adam Bevan
> Developer & CEO, Argus Productions Inc.
> 
> 
> On Mon, 12 Aug 2019 at 13:28, Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com>
> wrote:
> 
>> I have code which allows me to print a listbox using Print object.
>> 
>> I dynamically build a listbox for use on screen.
>> If a user wants to print the listbox, I use the same process to build a
>> separate listbox for reporting (as this is generic code for printing
>> list boxes).
>> 
>> What I am observing is complex data gathering fails when printing which
>> works correctly when displayed.
>> The code (see below for an example) is placed into the listbox as a
>> calculation column, in a selection listbox.
>> When the listbox is displayed on screen, the data (description) is
>> properly displayed.
>> 
>> However, the same data is NOT printed, the column where the description
>> is to be displayed, is empty of any text. Which leads me to believe
>> that the calculation in the calculated column is not being executed.
>> 
>> Any Ideas on how to go about getting this to function correctly?
>> 
>> 
>> Example calculated column code, the below code is in a method call, and
>> is the "calculation" when inserting the calculation column.
>> 
>> 
>> 
QUERY([Lab_Adjustments];[Lab_Adjustments]Adjustment_ID=[Adjustments]Adjustment_ID)
>> RELATE ONE([Lab_Adjustments]Lab_Inventory_ID)  //gets the laboratory
>> inventory record
>> RELATE ONE([Lab_Inventory]Inventory_Item_ID)  //gets the inventory item
>> record
>> $0:=[Inventory_Items]Description
>> 
>> 
>> 4D v13
>> 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:4d_tech-unsubscr...@lists.4d.com
>> **
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
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:4d_tech-unsubscr...@lists.4d.com
**

Re: printing listboxes

2019-08-12 Thread Adam Bevan via 4D_Tech
Hi Chip,

I know that 'calculated' columns do print in v12 and v16. The only thing I
haven't done is use relate one in my 'calculated' column methods.

Adam Bevan
Developer & CEO, Argus Productions Inc.


On Mon, 12 Aug 2019 at 13:28, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> I have code which allows me to print a listbox using Print object.
>
> I dynamically build a listbox for use on screen.
> If a user wants to print the listbox, I use the same process to build a
> separate listbox for reporting (as this is generic code for printing
> list boxes).
>
> What I am observing is complex data gathering fails when printing which
> works correctly when displayed.
> The code (see below for an example) is placed into the listbox as a
> calculation column, in a selection listbox.
> When the listbox is displayed on screen, the data (description) is
> properly displayed.
>
> However, the same data is NOT printed, the column where the description
> is to be displayed, is empty of any text. Which leads me to believe
> that the calculation in the calculated column is not being executed.
>
> Any Ideas on how to go about getting this to function correctly?
>
>
> Example calculated column code, the below code is in a method call, and
> is the "calculation" when inserting the calculation column.
>
>
> QUERY([Lab_Adjustments];[Lab_Adjustments]Adjustment_ID=[Adjustments]Adjustment_ID)
> RELATE ONE([Lab_Adjustments]Lab_Inventory_ID)  //gets the laboratory
> inventory record
> RELATE ONE([Lab_Inventory]Inventory_Item_ID)  //gets the inventory item
> record
> $0:=[Inventory_Items]Description
>
>
> 4D v13
> 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:4d_tech-unsubscr...@lists.4d.com
> **
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

printing listboxes

2019-08-12 Thread Chip Scheide via 4D_Tech
I have code which allows me to print a listbox using Print object.

I dynamically build a listbox for use on screen.
If a user wants to print the listbox, I use the same process to build a 
separate listbox for reporting (as this is generic code for printing 
list boxes).

What I am observing is complex data gathering fails when printing which 
works correctly when displayed.
The code (see below for an example) is placed into the listbox as a 
calculation column, in a selection listbox. 
When the listbox is displayed on screen, the data (description) is 
properly displayed.

However, the same data is NOT printed, the column where the description 
is to be displayed, is empty of any text. Which leads me to believe 
that the calculation in the calculated column is not being executed.

Any Ideas on how to go about getting this to function correctly?


Example calculated column code, the below code is in a method call, and 
is the "calculation" when inserting the calculation column.

QUERY([Lab_Adjustments];[Lab_Adjustments]Adjustment_ID=[Adjustments]Adjustment_ID)
RELATE ONE([Lab_Adjustments]Lab_Inventory_ID)  //gets the laboratory 
inventory record
RELATE ONE([Lab_Inventory]Inventory_Item_ID)  //gets the inventory item 
record
$0:=[Inventory_Items]Description


4D v13
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:4d_tech-unsubscr...@lists.4d.com
**