Contextual Cut, Copy & Paste...?

2017-06-21 Thread Robert ListMail via 4D_Tech
Is there a way to use the contextual menu of the host OS (Mac or Windows) for 
Cut, Copy & Paste within 4D?

Thanks,

Robert

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

Compiled componets and different 4D versions

2017-06-21 Thread Chip Scheide via 4D_Tech
What are the implications of a component compiled for v13 being used in 
a database under higher version of 4D?

In other words, is it necessary to recompile/build for every (major) 
version of 4D?

Thanks
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ - component method parameters

2017-06-21 Thread Chip Scheide via 4D_Tech
Thanks.

The code runs, interpretably just fine.
I have to re-test, but I think the code runs fine when the component is 
compiled and built.

The method (from original code I posted, and this code posted below) : 
utl_sets_whatsets_Validate
does all of this validation and returns a boolean (true - everything is 
OK)
 
I do not do a parameter count check, in that I believe that 4D is 
*supposed* to do that
However, tracing this code, interpretedly it works correctly.

The problem is when I try to compile the test database. It is when 
compiling the test database that I get the invalid parameter errors, 
when making calls to (for example, and as previously posted) 
utl_sets_What_Sets.
 

code for utl_sets_whatsets_Validate
  //(m) utl_whatsets_Validate
  // $1 - pointer - to a table to determine what, if any sets exist
  // $2 - pointer - to text Array
  // $3 - pointer - to error text

  //RETURNS - boolean - are parameters valid
  // • Created 06-09-17 by Chip - 
C_POINTER($1;$2;$Table;$Array;$3;$Errors)
C_TEXT($Sets;$msg)
C_BOOLEAN($0)

$Table:=$1
$Array:=$2
$Errors:=$3

Case of 
: (Nil($Table))  //nil table pointer (nil passed, or nothing)
  $msg:="Table pointer is Nil."

: (Not(utl_type_Is_Table ($Table)))  // pointer passed, but not to a 
table
  $msg:="Table pointer does not point to a table."

: (Nil($Array))  //nil array pointer (nil passed, or nothing)
  $msg:="Array pointer is Nil."

: (Not(utl_type_Is_An_Array ($Array;"Text")))  // array is not text
  $msg:="Array pointer does not point to an Array."
Else   //everything is OK
  $0:=True
End case 

If (Not(utl_Is_Empty (->$msg)))  // there was an error above
utl_errtxt_Add ($msg)  //add it to the error handler
End if 
utl_errtxt_End (Current method name;$Errors)  //report the error
  //End utl_whatsets_Validate


On Wed, 21 Jun 2017 17:37:19 +0200, Arnaud de Montard via 4D_Tech wrote:
> 
>> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech 
>> <4d_tech@lists.4d.com> a écrit :
>> 
>> $Table:=$1
>> $Array:=$2
> 
> Hi Chip, 
> If you trace in the component code, nothing helps?
> 
> Some times it helps to "look into the pointer", for example:
> 
> case of
>  :(count parameters < 2)
>   //err 1
>  :(not(Ptr_isTable($1)))
>   //err 2
>  :(not(Ptr_isArray($2;is text array)))
>   //err 3
>  else
>   //run method
> end case
> 
> -- 
> Arnaud 
> 
> 
> 
> **
> 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: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)
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:4d_tech-unsubscr...@lists.4d.com
**

Re: v13+ - component method parameters

2017-06-21 Thread Arnaud de Montard via 4D_Tech

> Le 21 juin 2017 à 16:38, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> $Table:=$1
> $Array:=$2

Hi Chip, 
If you trace in the component code, nothing helps?

Some times it helps to "look into the pointer", for example:

case of
 :(count parameters < 2)
  //err 1
 :(not(Ptr_isTable($1)))
  //err 2
 :(not(Ptr_isArray($2;is text array)))
  //err 3
 else
  //run method
end case

-- 
Arnaud 



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

v13+ - component method parameters

2017-06-21 Thread Chip Scheide via 4D_Tech
I have been working on a component.
I am in the final(?) stages of completing the component.
Many of the component methods require 1 or more pointers as parameters.

I am testing, and in my testing database, I try to compile.
During this testing, the component is NOT compiled, or built.
I am getting errors on in many places where a pointer is a parameter. 
The error all of these cases is:
Invalid constant type : Pointer

Any Ideas??
Thanks!
Chip


example:
(Testing database code)
ARRAY LONGINT($testing;0)
C_TEXT($errors)

// test passing pointer to wrong type of array
$Errors:=utl_sets_What_Sets (->[Table_2];->$testing)

(Component code)
  //(m) utl_sets_What_Sets
  // $1 - pointer - to a table to determine what, if any sets exist
  // $2 - pointer - to text array for setnames

  //Array will be cleared(sized to 0)
  //Setnames are added to Array ($2), a size zero array=no sets

  //RETURNS - text - errors if any
  // ∙ Created 06-06-17 by Chip - 
C_POINTER($1;$2;$Table;$Array)
C_TEXT($0;$Errors)
C_LONGINT($Loc)

$Table:=$1
$Array:=$2

utl_errtxt_Init  //error handler init

// validate incoming parameters - requires 3 pointers.
//  a table pointer, a Text Array pointer, and a error text pointer
If (utl_sets_whatsets_Validate ($Table;$Array;->$Errors))
 $Errors:=utl_array_Resize_Array (0;$Array)  // Clear incomming array

 If (utl_Is_Empty (->$Errors))  // If no errors
  $Start:=1

  Repeat 
   $Loc:=Find in array(<>aptr_Set_Tables;$Table;$Start)

   If ($Loc>0) & ($Loc<=Size of array(<>ax_Set_Setnames))
INSERT IN ARRAY($Array->;1;1)
$Array->{1}:=<>ax_Set_Setnames{$Loc}
$Start:=$Loc+1
   End if 
  // loop until not found, or processed entire array
  Until ($Loc<=0) | ($$Start>Size of array(<>ax_Set_Setnames))
 End if 
End if 
// report any errors encountered
utl_errtxt_End (Current method name;->$Errors)
$0:=$Errors
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Array Summary Sum Utility Method

2017-06-21 Thread John DeSoi via 4D_Tech

> On Jun 21, 2017, at 2:59 AM, Nigel Greenlee via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> You don’t say if you are displaying these arrays on screen-obviously the 2D 
> arrays can’t be displayed on screen.

Each array of a 2D array can be a column in a listbox.

John DeSoi, Ph.D.

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

Re: Best solution for printing Enterable PDF docs from 4D v15

2017-06-21 Thread Ingo Wolf via 4D_Tech
Chuck,

we create the PDFs with Adobe Acrobat, not from within 4D. Here's an example of 
an xdp file:







Firmenakte
$PrimaryKey$
  
 $Kundenname$
 $Strasse$
 $Ort$
 $PLZ$
 http://www.xfa.org/schema/xfa-data/1.0/; 
xfa:contentType="image/gif">
  



http://ns.adobe.com/xdp/pdf/;>
   



Table name and primary key are right after . These tags will be 
returned 1:1. All xml tags between  and  correspond to 
form fields in the pdf form (case sensitive). If the same form field has to 
appear multiple times in the pdf form, the corresponding xml tag has to appear 
the same number of times in the xdp (and can have different values!). Use 
CDATA, when the content of the field can have "xml forbidden" characters (e.g. 
"&", "<", ">"). These tags will be returned with whatever content the user has 
entered in the pdf form. You can even fill picture fields (BASE64 encoded).
The pdf file (converted to BASE64) itself has to be placed between  and 
.
In Adobe Lifecycle Designer we add a button to the pdf form with the action 
"send via email". This sends the form fields as xml (xdp, can even include the 
pdf with user modified form fields as BASE64) to a predefined mail address, 
where a 4D process periodically checks the mails and parses the xml attachments 
for updating the records. In Adobe Lifecycle Designer one can also add 
validation code (javascript), e.g. for the email button to be hidden until all 
required fields have been entered.

Sorry, no documentation links at hand, most of this found out by trial

HTH
Ingo Wolf

4d_tech-requ...@lists.4d.com schrieb am Tue, 20 Jun 2017 08:59:58 -0700:
>Ingo,
>
>Thanks for your response.
>
>Can you point me to any documentation that will explain what tools I need to
>use to implement the workflow you described in your response?
>
>Are you able to generate the Enterable PDF forms within 4D?  OR Do you have
>to create the PDF with Adobe Acrobat first?
>
>If you can generate the PDF within 4D, please direct me to documentation
>specific to that process.
>
>Thanks so much,
>
>Chuck Morris


-- 
ViELMAC Ingo Wolf
Rheinhessenring 53A
D 55597 Wöllstein
Tel. +49 (0)6703 3070320
Fax  +49 (0)6703 3070321
e-mail i...@vielmac.de
**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Array Summary Sum Utility Method

2017-06-21 Thread Nigel Greenlee via 4D_Tech
Sannyassin

Surely here you could be utilizing  2D arrays? 

e.g
Array (aInvoices)-1D
array (aInvoiceItems)-1D
array (ainvoiceValue)-1D

Array (ainvoiceItemNumbers)-2D)-on row per invoice one column per item
array (ainvoiceitemDescription)-2D Ditto
Array(aInvoiceItemQuantitySold)-2D Ditto
Array(aItemSoldAmount-2D

You don’t say if you are displaying these arrays on screen-obviously the 2D 
arrays can’t be displayed on screen.

With the above representation in a listbox on screen the ‘summarisation’ column 
could be a formula based column
eg. Sum(aItemSoldAmount{rownumber}. You can insert the ‘summary’ column in 
dynamically. 

The following brief(unrelated) example shows how to insert a formula based 
column in a listbox

$Formula:=“LB_SUMMARISE(->”+aItemSoldAmount+”)”)
LISTBOX INSERT COLUMN 
FORMULA($area->;$ColumnNumber;$ColumnName;$Formula;$Type;$HeaderName;$ptr3->)

There are a couple of limitations of formula based listbox columns though-cant 
have a footer and cant sort on them.







> On 20 Jun 2017, at 23:25, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Aloha,
> 
> Does anyone have a utility method for summarizing (and summing) a set of 
> arrays?
> 
> For example with Invoice Line Items:
> 
> Arrays:
> aItemNumbers
> aItemDescription
> aQuantitySold
> aExtendedSoldAmount
> 
> Of course, with invoice line items there are multiple records with item 
> numbers. I want a summary array where there is only 1 element with an item 
> number, and the aQuantitySold, and aExtendedSoldAmount gets summed.
> 
> I know there’s lots of ways to do this, but didn’t want to reinvent the wheel 
> if possible.
> 
> Thanks!
> 
> Sannyasin Siddhanathaswami
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **

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

Re: OBJECT SET EVENTS

2017-06-21 Thread Christian Sakowski via 4D_Tech
This is a very long feature request. What you actually suggest is: FORM SAVE.
--

Grüße/Regards,
[heubach-media] | Christian Sakowski
christian.sakow...@heubach-media.de
iChat/AIM: SakowskiF
Tel: +49/(0)40/52 10 59-23



> Am 21.06.2017 um 00:08 schrieb Jim Medlen via 4D_Tech <4d_tech@lists.4d.com>:
> 
> 
> Can Form Events for an object be permanently changed via a method ?
> 
> Is it possible to write a method that will loop through all forms and clear
> the
> On Clicked event for every instance of a specific variable permanently  ?
> 
> (incomplete method as an example idea)
> 
> FORM GET NAMES(atForm_Names)
> 
> For(vi1;1;Size of Array(atForm_Names))
> FORM LOAD([tableName]; atForm_Names{vi1})
> ARRAY LONGINT(MyEvents;0)
> Append to Array(MyEvents;On Clicked)
> OBJECT SET EVENTS("srKeyword";MyEvents;Disable events others unchanged)
> FORM UNLOAD
> End for
> 
> 
> 
> Thanks,
> 
> Jim Medlen
> Computer & Information Systems
> Functional Devices, Inc.
> j.med...@functionaldevices.com
> phone (765) 883-5538 x 428
> fax (765) 883-4262
> http://www.functionaldevices.com
> 
> This email was transmitted on 100 percent recycled electrons
> 
> 
> 
> **
> 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:4d_tech-unsubscr...@lists.4d.com
> **


--
heubach media
Osterfeldstr. 12-14 | Haus 1 | Eingang Nord
22529 Hamburg
tel: 040 / 52 10 59 - 10 | fax: -99
mail: i...@heubach-media.de
home: www.heubach-media.de
Geschäftsführer|CEO: Matthias Heubach

Mieten Sie Ihre Computer, iPads & Drucker für Ihre Events bei:
http://www.milo-rental.com

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen.
Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten 
haben,
informieren Sie bitte sofort den Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht 
gestattet.
 
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
**
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:4d_tech-unsubscr...@lists.4d.com
**