AW: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Flury Olivier via 4D_Tech
Works interpreted, but not compiled.

  https://flury-software.ch/

-Ursprüngliche Nachricht-
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von Keisuke Miyako via 
4D_Tech
Gesendet: Freitag, 27. Juli 2018 01:32
An: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: Keisuke Miyako 
Betreff: Re: Memory leak with dynamic variables in list boxes?

correction:

since it is a form local variable,

you should be able to retype it simply by calling C_REAL ($footerPtr->)

2018/07/27 8:30、Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
dynamic variables create for footers are typed as text by default.
you need to change it to numeric by replacing it using VARIABLE TO VARIABLE.



**
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
**

AW: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Flury Olivier via 4D_Tech
Hi Michael,

Absolutely, dynamic footer variables are typed as text, but footer sum requires 
a numeric variable.

Changing the type of a dynamic variable does not work in compiled mode. Only 
changing the type of dynamic arrays.

Would be great if 4D would extend LISTBOX INSERT COLUMN with an additional 
optional parameter:

LISTBOX INSERT COLUMN ( {* ;} object ; colPosition ; colName ; colVariable ; 
headerName ; headerVar {; footerName ; footerVar} ) 

LISTBOX INSERT COLUMN ( {* ;} object ; colPosition ; colName ; colVariable ; 
headerName ; headerVar {; footerName ; footerVar};{footerDataType}) 

Allowing us to do something like this:

LISTBOX INSERT COLUMN ( * ; MyListbox ; 1 ; "Col1" ; $Nil ; "Header1" ; $Nil; 
"Footer1" ; $Nil ; Is Real)

Olivier

  https://flury-software.ch/

-Ursprüngliche Nachricht-
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von mferguson--- via 
4D_Tech
Gesendet: Freitag, 27. Juli 2018 00:34
An: 4D iNug Technical <4d_tech@lists.4d.com>
Cc: mfergu...@myofficelink.com
Betreff: Re: Memory leak with dynamic variables in list boxes?

Hi,

I converted it to use dynamic variables for the listbox columns insert, passing 
in nil pointers for the header and footer variables. It works great for regular 
columns but I can’t get it to work for footers.

Specifically:

LISTBOX SET FOOTER CALCULATION(*;Object name;listbox footer sum)

where the object name is either the column name or footer name, gives me 
incompatible type.

And
LISTBOX SET FOOTER CALCULATION(variable_Ptr->;listbox footer sum)

where variable_Ptr-> is a pointer to the the column name, column variable 
pointer, or footer

variable_Ptr:=OBJECT Get pointer(Object named;name returned by dynamic variable 
assignment obtained via listbox get arrays) gives incompatible type even though 
column is real or $ColumnPtr:=OBJECT Get pointer(Object named;column name) etc.

Footers are turned on in the listbox properties.

I can’t get any combination to work.

Seems like it should be simple, but I’m missing something.

I’d appreciate an example from anyone who has this working.

Michael





> On Jul 26, 2018, at 7:48 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Michael,
> 
> On Thu, Jul 26, 2018 at 6:32 AM mferguson--- via 4D_Tech < 
> 4d_tech@lists.4d.com> wrote:
> 
>> We have a memory leak in our v15.6 Windows database and have narrowed 
>> it down to a listbox where the columns are dynamically added using 
>> LISTBOX INSERT COLUMN.
>> The header and footer variables are nil pointers, in accordance with 
>> the documentation.
>> And to reference these variables for the assignment of properties, 
>> per the
>> documentation:
>> 
>> $FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx}) 
>> $HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})
>> 
>> However, the get object pointer above returns nil pointers, so we 
>> can’t assign properties.
>> 
> ​I was just writing about using Listbox get arrays for this purpose 
> when I saw Olivier's post. I suggest this approach as well. ​
> 
> 
>> So, we set up our own variable manager that declares and reuses 
>> header and footer variables for the listbox, using execute formula.  
>> The variable manager has been tested and the number of variables for 
>> the form does not grow. However, the apparent search speed preceding 
>> the display gets slower and slower. The queries themselves are fast, 
>> but the re-display seems to be the culprit eating up memory.
>> 
> 
> Using EXECUTE ... is probably not the best solution for what you are 
> attempting to do. ​4D is pretty good at managing these variables. It 
> sounds like you're working with 4D interpreted. There are a lot of 
> tricks you can get away with using Execute in an interpreted db that 
> fail if you plan on compiling it later.
> 
> A few weeks ago another developer was having speed issues with 
> listboxes as well. In that case he was rebuilding the listboxes every 
> time there was a change and found the LISTBOX INSERT ARRAY command was 
> slow. When I build listboxes dynamically I handle the chores of 
> configuring the listbox (that is, inserting the columns, headers and 
> footers) and populating them independently. Changes in the data may 
> require a REDRAW command but usually not re-configuring the whole 
> listbox. The point is once he changed his approach he found the speed 
> issue disappeared and overall management was easier.
> 
> --
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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)

Re: 4D v11 on Windows Server 2016 (Win 10 Clients)

2018-07-26 Thread Tim Nevels via 4D_Tech
On Jul 26, 2018, at 8:15 PM, Robert ListMail wrote:

> Apparently, the client did some testing in that regard, everything seemed to 
> work except the printing from 4D failed. I’ll just keep them going on the old 
> hardware until I’m ready to make the change to the new v17 version.

This is a known issue. Trying to print with Windows 8 and later results in text 
being the wrong size. Very tiny. The fix is to upgrade to at least 4D v13. Then 
printing returns to the way it was with v11. Text is the correct size. 

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.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
**

v17 PDF-Manuals

2018-07-26 Thread Jörg Knebel via 4D_Tech
Hi,

When can we expect the PDF-version of the manuals for v17?

HTML-only is not exactable!

Thanks


Regards
Jörg Knebel, M.Eng. - 4D Developer since 1991
TTT Data Systems Pty Ltd
Phone: +61 (0)2 6601 7453
www.tttdatasystems.com.au 
**
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
Hi Miyako,

Perfect! Thanks, that makes sense and works well.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Jul 26, 2018, at 3:27 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> in your case, you could do something like
> 
> $cTest:=$cTest..filter("remove_null")
> 
> where the project method remove_null is
> 
> C_OBJECT($1)
> 
> $1.result:=($1.value#Null)
> 

**
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: standard action for design mode not working in 17.0

2018-07-26 Thread John DeSoi via 4D_Tech
Hi Jody,

The button had the action assigned to it, not done with code in any way. As you 
said, I think the name changed and that was reflected in the button action in 
the form editor. I never use the "user mode" features to access the database 
and find it rather annoying when that window shows up. I seem to recall having 
an issue like this in some previous versions but not with all structures. My 
speculation is that it has something to do with older structures brought 
forward from much earlier 4D versions.

Thanks,

John DeSoi, Ph.D.

> On Jul 26, 2018, at 5:17 PM, Jody Bevan via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I encountered this too. I believe the command changed from the v16R series to 
> a slight difference in v17. The constant had changed. I looked it up in v17 
> and just used the new command.

**
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: 4D v11 on Windows Server 2016 (Win 10 Clients)

2018-07-26 Thread Robert ListMail via 4D_Tech
Apparently, the client did some testing in that regard, everything seemed to 
work except the printing from 4D failed. I’ll just keep them going on the old 
hardware until I’m ready to make the change to the new v17 version.

Thanks,

Robert

> On Jul 26, 2018, at 2:19 PM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Anythings possible, but i would bet on some type of problems. If possible I
> would run with the latest version of v11 I could
> Regards
> Chuck

**
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: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Keisuke Miyako via 4D_Tech
correction:

since it is a form local variable,

you should be able to retype it simply by calling C_REAL ($footerPtr->)

2018/07/27 8:30、Keisuke Miyako via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
dynamic variables create for footers are typed as text by default.
you need to change it to numeric by replacing it using VARIABLE TO VARIABLE.



**
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: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Keisuke Miyako via 4D_Tech
dynamic variables create for footers are typed as text by default.

you need to change it to numeric by replacing it using VARIABLE TO VARIABLE.

2018/07/27 7:34、mferguson--- via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Seems like it should be simple, but I’m missing something.



**
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: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread mferguson--- via 4D_Tech
Hi,

I converted it to use dynamic variables for the listbox columns insert, passing 
in nil pointers for the header and footer variables. It works great for regular 
columns but I can’t get it to work for footers.

Specifically:

LISTBOX SET FOOTER CALCULATION(*;Object name;listbox footer sum)

where the object name is either the column name or footer name, gives me 
incompatible type.

And
LISTBOX SET FOOTER CALCULATION(variable_Ptr->;listbox footer sum)

where variable_Ptr-> is a pointer to the the column name, column variable 
pointer, or footer

variable_Ptr:=OBJECT Get pointer(Object named;name returned by dynamic variable 
assignment obtained via listbox get arrays) 
gives incompatible type even though column is real
or
$ColumnPtr:=OBJECT Get pointer(Object named;column name)
etc.

Footers are turned on in the listbox properties.

I can’t get any combination to work.

Seems like it should be simple, but I’m missing something.

I’d appreciate an example from anyone who has this working.

Michael





> On Jul 26, 2018, at 7:48 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Michael,
> 
> On Thu, Jul 26, 2018 at 6:32 AM mferguson--- via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> We have a memory leak in our v15.6 Windows database and have narrowed it
>> down to a listbox where the columns are dynamically added using LISTBOX
>> INSERT COLUMN.
>> The header and footer variables are nil pointers, in accordance with the
>> documentation.
>> And to reference these variables for the assignment of properties, per the
>> documentation:
>> 
>> $FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx})
>> $HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})
>> 
>> However, the get object pointer above returns nil pointers, so we can’t
>> assign properties.
>> 
> ​I was just writing about using Listbox get arrays for this purpose when I
> saw Olivier's post. I suggest this approach as well. ​
> 
> 
>> So, we set up our own variable manager that declares and reuses header and
>> footer variables for the listbox, using execute formula.  The variable
>> manager has been tested and the number of variables for the form does not
>> grow. However, the apparent search speed preceding the display gets slower
>> and slower. The queries themselves are fast, but the re-display seems to be
>> the culprit eating up memory.
>> 
> 
> Using EXECUTE ... is probably not the best solution for what you are
> attempting to do. ​4D is pretty good at managing these variables. It sounds
> like you're working with 4D interpreted. There are a lot of tricks you can
> get away with using Execute in an interpreted db that fail if you plan on
> compiling it later.
> 
> A few weeks ago another developer was having speed issues with listboxes as
> well. In that case he was rebuilding the listboxes every time there was a
> change and found the LISTBOX INSERT ARRAY command was slow. When I build
> listboxes dynamically I handle the chores of configuring the listbox (that
> is, inserting the columns, headers and footers) and populating them
> independently. Changes in the data may require a REDRAW command but usually
> not re-configuring the whole listbox. The point is once he changed his
> approach he found the speed issue disappeared and overall management was
> easier.
> 
> -- 
> Kirk Brooks
> San Francisco, CA
> ===
> 
> *We go vote - they go home*
> **
> 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: standard action for design mode not working in 17.0

2018-07-26 Thread Jody Bevan via 4D_Tech
John:

I encountered this too. I believe the command changed from the v16R series to a 
slight difference in v17. The constant had changed. I looked it up in v17 and 
just used the new command.

Jody
> On Jul 14, 2018, at 8:18 AM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I converted a structure from 16.3HF4 to 17.0. A button that worked in version 
> 16 to open design mode (standard action = design), does not work in version 
> 17. It shows the list of files application window, but keeps the startup 
> menubar set for the runtime environment. 
> 
> Anyone seen or solved this? For now, I changed the database setting to 
> startup in Design instead of Runtime as a work-around. 
> 
> Thanks
> 
> John DeSoi, Ph.D.

**
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: Objects without Stylesheets suddenly displayed as Wingdings!

2018-07-26 Thread Jody Bevan via 4D_Tech
Chuck:

That sounds like great code module to have in a developer tool kit. If you are 
willing to share, I would appreciate a copy.

Thanks

jody


> On Jul 12, 2018, at 8:12 AM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have code that will report on any object on forms with no font or style 
> sheets assigned
> Please advise if you want it
> 
> Regards 
> 
> Chuck 
> Sent from my iPhone

**
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: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Keisuke Miyako via 4D_Tech
that just sound like a recipe for headaches, never a good idea to use EXECUTE 
FORMULA to create process variables.

you should be able to confirm with a simple form and listbox
that nil pointer does indeed create a new form local variable
and that it can reliably be referenced using its object name.

could it be possible that 4D is assigning an altered object name to keep 
uniqueness?

2018/07/26 22:32、mferguson--- via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
So, we set up our own variable manager that declares and reuses header and 
footer variables for the listbox, using execute formula.


**
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: collection.min() Returns Null

2018-07-26 Thread Keisuke Miyako via 4D_Tech
one thing to keep in mind is that this (rules on sorting) does not apply to 
count() or average()

- count does NOT count null, object, collection

the doc. says that the method only counts  "non-null" values. non-null does not 
include object or collection

- average() does not include null, object, collection in calculation

date is converted to seconds.

Is this what others are expecting or is this a bug?



**
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: collection.min() Returns Null

2018-07-26 Thread Keisuke Miyako via 4D_Tech
it is documented.

min()

http://doc.4d.com/4Dv17/4D/17/collectionmin.301-3730928.en.html

says

If the collection contains different types of values, the collection.min( ) 
method will return the minimum value within the first element type in the type 
list order (see collection.sort( ) description).

and the page on sort() says:

If the collection contains elements of different types, they are first grouped 
by type and sorted afterwards. Types are returned in the following order:

• null
• booleans
• strings
• numbers
• objects
• collections
• dates

> 2018/07/27 4:59、Cannon Smith via 4D_Tech <4d_tech@lists.4d.com>のメール:
> Is this what others are expecting or is this a bug?




**
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: collection.min() Returns Null

2018-07-26 Thread Keisuke Miyako via 4D_Tech
query() is not the only member function to filter a collection.

in your case, you could do something like

$cTest:=$cTest..filter("remove_null")

where the project method remove_null is

C_OBJECT($1)

$1.result:=($1.value#Null)

2018/07/27 5:09、Cannon Smith via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Anyone know what I should be doing here?



**
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
Hi Christian,

Thanks. The values are a series that need to be graphed. Some values in a 
series may be null, indicating that the graph line should be skipped at that 
point since we don’t know what the value is. That’s why I decided to use 
C_COLLECTION instead of ARRAY REAL to hold the values. As I build the graph, I 
need to know the min and max values in the series.

Yes, I can loop through the collection, of course. I just figured the 
collection probably had a function that would allow me to reduce the collection 
to non-nulls before applying .min() or .max() without having to loop. Trying to 
learn how to use all the collection functions.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Jul 26, 2018, at 2:13 PM, Christian Sakowski 
>  wrote:
> 
> Yes, this is expected. You can only do a query() on a Collection with objects.
> Where do you get these values? You should select before to get only non-null 
> values or remove them from the collection with a For/Each-Loop.

**
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: picture of a form

2018-07-26 Thread Stephen J. Orth via 4D_Tech
Randy,

I think its FORM SCREENSHOT


Steve


-Original Message-
From: 4D_Tech [mailto:4d_tech-boun...@lists.4d.com] On Behalf Of Randy Jaynes 
via 4D_Tech
Sent: Thursday, July 26, 2018 3:38 PM
To: 4D iNug List <4d_tech@lists.4D.com>
Cc: Randy Jaynes 
Subject: picture of a form

My feeble mind says there is some fairly new command that lets us get a 
‘screenshot’ of the current window or form.

Can’t think of right words to search because I’m not finding anything on KB or 
searching documentation.

Am I off my rocker?

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to supp...@printpoint.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: picture of a form

2018-07-26 Thread Douglas von Roeder via 4D_Tech
Form screenshot


--
Douglas von Roeder
949-336-2902


On Thu, Jul 26, 2018 at 1:38 PM Randy Jaynes via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> My feeble mind says there is some fairly new command that lets us get a
> ‘screenshot’ of the current window or form.
>
> Can’t think of right words to search because I’m not finding anything on
> KB or searching documentation.
>
> Am I off my rocker?
>
> Randy
>
> --
> Randy Jaynes
> Senior Programmer and Customer Support
>
> http://printpoint.com  • 845.687.3741 •
> PrintPoint, Inc • 57 Ludlow Lane • Palisades, NY 10964
> Please send all email contacts to supp...@printpoint.com  supp...@printpoint.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
> **
**
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
**

picture of a form

2018-07-26 Thread Randy Jaynes via 4D_Tech
My feeble mind says there is some fairly new command that lets us get a 
‘screenshot’ of the current window or form.

Can’t think of right words to search because I’m not finding anything on KB or 
searching documentation.

Am I off my rocker?

Randy

--
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com  • 845.687.3741 • PrintPoint, Inc 
• 57 Ludlow Lane • Palisades, NY 10964 
Please send all email contacts to supp...@printpoint.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: collection.min() Returns Null

2018-07-26 Thread Christian Sakowski via 4D_Tech
Yes, this is expected. You can only do a query() on a Collection with objects.
Where do you get these values? You should select before to get only non-null 
values or remove them from the collection with a For/Each-Loop.
--

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



> Am 26.07.2018 um 22:09 schrieb Cannon Smith via 4D_Tech 
> <4d_tech@lists.4d.com>:
> 
> As a follow up, I thought I would try to remove the null’s from the 
> collection use collection.query(), but I don’t know what to use for the query 
> string since there are no named object properties in the collection.
> 
>   $cTest:=New collection(100;200;Null;80)
>   $lMin:=$cTest.query("#null").min() //<—What should the query string be? 
> Or should I be using a different function?
> 
> Anyone know what I should be doing here?
> 
> Thanks.
> 
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Hill Spring, AB Canada
> 403-626-3236
> 
> 
> 
> 
>> On Jul 26, 2018, at 1:59 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> I was surprised that the following code tries to return null instead of 80:
>> 
>> $cTest:=New collection(100;200;Null;80)
>> $lMin:=$cTest.min()
>> 
> 
> **
> 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
> **


--
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)
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: collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
As a follow up, I thought I would try to remove the null’s from the collection 
use collection.query(), but I don’t know what to use for the query string since 
there are no named object properties in the collection.

$cTest:=New collection(100;200;Null;80)
$lMin:=$cTest.query("#null").min() //<—What should the query string be? 
Or should I be using a different function?

Anyone know what I should be doing here?

Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




> On Jul 26, 2018, at 1:59 PM, Cannon Smith via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I was surprised that the following code tries to return null instead of 80:
> 
> $cTest:=New collection(100;200;Null;80)
> $lMin:=$cTest.min()
> 

**
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
**

collection.min() Returns Null

2018-07-26 Thread Cannon Smith via 4D_Tech
I was surprised that the following code tries to return null instead of 80:

$cTest:=New collection(100;200;Null;80)
$lMin:=$cTest.min()

I would have expected that a Null value in the collection would be ignored when 
looking for the minimum value.

Is this what others are expecting or is this a bug?

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236




**
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: Feature request thoughts

2018-07-26 Thread Timothy Penner via 4D_Tech
Command+Tab cannot be used for switching tabs because it is used by the OS for 
switching applications.

The shortcut for switching tabs is Control+Tab to go to the next tab and 
Control+Shift+Tab to go to the previous tab.

-Tim



**
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: 4D v11 on Windows Server 2016 (Win 10 Clients)

2018-07-26 Thread Charles Miller via 4D_Tech
Anythings possible, but i would bet on some type of problems. If possible I
would run with the latest version of v11 I could
Regards
Chuck

On Thu, Jul 26, 2018 at 3:13 PM, Robert ListMail via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> I have a new project that involves a v11-based system. A new system is in
> development but not ready for production, any possibility of running a v11
> system on a new Server OS (Windows Server 2016) with Windows 10 clients?
>
> Thanks,
>
> Robert
>
> **
> 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
> **




-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
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 v11 on Windows Server 2016 (Win 10 Clients)

2018-07-26 Thread Robert ListMail via 4D_Tech
I have a new project that involves a v11-based system. A new system is in 
development but not ready for production, any possibility of running a v11 
system on a new Server OS (Windows Server 2016) with Windows 10 clients?

Thanks,

Robert

**
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: Feature request thoughts

2018-07-26 Thread JOHN BAUGHMAN via 4D_Tech
Thanks Jeff.

For some reason I was ignoring General and going straight to Methods. 
Duh!

John

John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.com

> On Jul 26, 2018, at 8:59 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> It's in Preferences.
> 
>> On Jul 26, 2018, at 2:59 PM, JOHN BAUGHMAN via 4D_Tech 
>> <4d_tech@lists.4d.com> wrote:
>> 
>> First off thought there was a way to turn tabbing off, but cannot find it.
> 
> **
> 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: Feature request thoughts

2018-07-26 Thread Jeffrey Kain via 4D_Tech
It's in Preferences.

> On Jul 26, 2018, at 2:59 PM, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> First off thought there was a way to turn tabbing off, but cannot find it.

**
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
**

Feature request thoughts

2018-07-26 Thread JOHN BAUGHMAN via 4D_Tech
Working in 64bit on the Mac I am a bit frustrated with tabbed windows. Maybe 
it’s just me but I keep closing the window instead of the tab I am in. Also 
moving between multiple tabs is less than convenient when you do not remember 
where a tab you want  is located in the window with a lot of tabs.  I find my 
self having to go to the Windows menu a lot.

First off thought there was a way to turn tabbing off, but cannot find it.

As for using the tabbed window, I am think of posting a  couple of feature 
requests…

1. Throw an confirmation if a window is closed with multiple tabs. 
Either just confirming the close or offering the option to close the current 
tab or the whole window.

2. Provide some kind of back and forward capability. Something like 
Command-Tab does for Applications on the Mac

I don’t know if either is even possible. What do you all think. Would these be 
good feature requests?

John


John Baughman
1331 Auwaiku Street
Kailua, Hawaii  96734
(808) 262-0328
john...@hawaii.rr.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: Does MSC database compact work for large data files?

2018-07-26 Thread Timothy Penner via 4D_Tech
Are you opening the database first, or going directly into the MSC without 
opening the database first?
I don’t think the cache settings are taken into account unless the database is 
opened first :-/

I just did a quick test (I tested Windows first; still need to test Mac) and my 
used memory before the compact was 75 MB but once it started compacting the 
used memory went up to 5 GB. The default setting for DB cache on a new database 
is 200 MB and I am certainly using more than that.

Opening a case on TAOW will get you more direct help.

-Tim



**
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: Does MSC database compact work for large data files?

2018-07-26 Thread Jeffrey Kain via 4D_Tech
By "no longer needed" I was referring to Chip's suggestion of reindexing with 
SQL.  Prior to v15R-release indexes were built in creation order, which made 
horrible use of the cache.  Now it goes in table order which makes it MUCH 
faster on a large data file.

I think I understand the problem you're describing - it's not something I've 
experienced.  The cache should definitely be used once it gets to the indexing 
part. I don't think cache is used in the initial rebuilding part.

> On Jul 26, 2018, at 12:35 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What do you mean by "no longer needed in 16"? There is a Get table 
> fragmentation command that might be saying compaction is needed.

**
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: Does MSC database compact work for large data files?

2018-07-26 Thread John DeSoi via 4D_Tech
Chuck,

> On Jul 26, 2018, at 11:50 AM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I did not. I meanty sql calls, but you are correct, object fields need to
> be handled in a different way. That is why I never use object fields. I do
> not think 4D should ever create field types that work in 4D but not in SQL
> or vice versa. I will not use them no matter how cool they may be. There
> are also SQL data types that 4D does not know about. In case of table with
> object data type, I would export that table in 4D format in then import.

Yes, I agree. Type consistency across features and APIs continues to be a 
problem. ORDA in version 17 can't do anything with BLOB fields.


> 
> Whether you use import or sql calls to get at data, you can use database
> setting to turn off indexing while saving the data. I would do this and
> then turn on indexing between each table

Dealing with exporting/importing, manipulating indexes, and so on is a lot more 
work than what I outlined using compact. The key question is if the compacted 
database is viable after force quitting it during the compacting indexing 
process. I convinced myself it is by writing a method that exports the primary 
key and md5 hash of every record in the database. I compared this export before 
and after the compact and did not find any differences.

John DeSoi, Ph.D.


**
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: Does MSC database compact work for large data files?

2018-07-26 Thread Charles Miller via 4D_Tech
I did not. I meanty sql calls, but you are correct, object fields need to
be handled in a different way. That is why I never use object fields. I do
not think 4D should ever create field types that work in 4D but not in SQL
or vice versa. I will not use them no matter how cool they may be. There
are also SQL data types that 4D does not know about. In case of table with
object data type, I would export that table in 4D format in then import.

Whether you use import or sql calls to get at data, you can use database
setting to turn off indexing while saving the data. I would do this and
then turn on indexing between each table

Regards and thanks for the reminder about object fields

Chuck

On Thu, Jul 26, 2018 at 12:44 PM, John DeSoi via 4D_Tech <
4d_tech@lists.4d.com> wrote:

>
>
> > On Jul 26, 2018, at 11:21 AM, Chuck Miller via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> >
> > Sometimes it is better to use sql to recreate data file. Now that v16
> handles blob arrays it is very fast.
>
> If you mean SQL EXPORT DATABASE, it will not work if the database has
> object fields.
>
> John DeSoi, Ph.D.
>
> **
> 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
> **
>



-- 
-
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D, Sybase & SQL Server connectivity
  http://www.informed-solutions.com
-
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**
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: Does MSC database compact work for large data files?

2018-07-26 Thread John DeSoi via 4D_Tech


> On Jul 26, 2018, at 11:21 AM, Chuck Miller via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Sometimes it is better to use sql to recreate data file. Now that v16 handles 
> blob arrays it is very fast.

If you mean SQL EXPORT DATABASE, it will not work if the database has object 
fields.

John DeSoi, Ph.D.

**
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: Does MSC database compact work for large data files?

2018-07-26 Thread John DeSoi via 4D_Tech
Hi Jeff,

> On Jul 26, 2018, at 11:05 AM, Jeffrey Kain via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> No longer needed in v16.  A compact will reorganize the data file, and then 
> do a complete reindex.

This is what I'm trying to do that is not working without forcing 4D to quit 
and reindex separately after compacting. 

What do you mean by "no longer needed in 16"? There is a Get table 
fragmentation command that might be saying compaction is needed.

> 
> We do our compacts on 4D Server 64-bit on Windows. We do it on a machine that 
> has enough RAM so that the cache never gets used up. Since version 16 and the 
> latest new-and-improved cache manager on Windows, there's a huge performance 
> problem when 4D has to release memory from the cache.

So perhaps Windows does not have the same problem. This is 64-bit Mac (16 and 
17). Reindexing/cache is not a problem unless it is done as part of the compact 
process. It appears MSC does not use the cache at all when it opens for 
compacting mode.


Thanks,

John DeSoi, Ph.D.

**
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: Does MSC database compact work for large data files?

2018-07-26 Thread Chuck Miller via 4D_Tech
I do  not think this will work any longer because 
A. Indices that point to related records and on related records can not be 
turned off
B. A primary key or in fact any key that is set as unique must have indexing 
turned on

Sometimes it is better to use sql to recreate data file. Now that v16 handles 
blob arrays it is very fast.

Regards

Chuck

 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064   
 mailto:cjmillerinformed-solutions.com 
 Brookline, MA 02446 USA Registered 4D Developer
   Providers of 4D and Sybase connectivity
  http://www.informed-solutions.com  

This message and any attached documents contain information which may be 
confidential, subject to privilege or exempt from disclosure under applicable 
law.  These materials are intended only for the use of the intended recipient. 
If you are not the intended recipient of this transmission, you are hereby 
notified that any distribution, disclosure, printing, copying, storage, 
modification or the taking of any action in reliance upon this transmission is 
strictly prohibited.  Delivery of this message to any person other than the 
intended recipient shall not compromise or waive such confidentiality, 
privilege or exemption from disclosure as to this communication. 

> On Jul 26, 2018, at 11:31 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> it went something like this:
> - TURN OFF the indexes through out the database.
> - let compact do its job
> - TURN ON indexes through out the database
> - let database index

**
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: Does MSC database compact work for large data files?

2018-07-26 Thread Chip Scheide via 4D_Tech
the issue John brought up was the reindexing process.
the cache appeared NOT to be used, and not to be set to large values.

>From John
2. Wait for hours and the progress bar finally reaches the last table 
and is pixels away from the end. Wait for many more hours, nothing 
seems to be happening even though 4D is using 100% CPU. Finally 
discover that 4D is indexing the database, but the indexing progress 
window is hidden behind the MSC window.

3. Wait many more hours, progress bar for creation of a single index on 
a table with 40 million records has barely moved. Cache used in 
creation of the index shows 0%. The database memory setting is 4GB. 
Activity Monitor shows 4D is using 300MB. I suspect when 4D restarts to 
open the database for compacting that it ignores the database memory 
settings. Indexing will never complete under these conditions.


it seems to me that the issue here is the indexing process.
hanse the idea to turn off indexes, and index separately.
Chip


On Thu, 26 Jul 2018 12:05:25 -0400, Jeffrey Kain via 4D_Tech wrote:
> No longer needed in v16.  A compact will reorganize the data file, 
> and then do a complete reindex.
---
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: Does MSC database compact work for large data files?

2018-07-26 Thread Jeffrey Kain via 4D_Tech
No longer needed in v16.  A compact will reorganize the data file, and then do 
a complete reindex.

We do our compacts on 4D Server 64-bit on Windows. We do it on a machine that 
has enough RAM so that the cache never gets used up. Since version 16 and the 
latest new-and-improved cache manager on Windows, there's a huge performance 
problem when 4D has to release memory from the cache.

Another approach we took once when we didn't have enough RAM on the compacting 
machine to prevent a cache purge, since it was a very fast SSD we set the cache 
size to be far higher than the installed memory.  This forced some paging at 
the end of the process, but this was far faster on an SSD than letting 4D try 
to slowly release memory.

You might have better luck on a late R-release in v15, which has the old cache 
manager. Or on a Mac.

> On Jul 26, 2018, at 11:31 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have not had to do this, but I remember seeing others mention this 
> process.
> 
> it went something like this:
> - TURN OFF the indexes through out the database.
> - let compact do its job
> - TURN ON indexes through out the database
> - let database index
> 
> -- not sure if this is needed/helps but you might want to look at 
> turning off triggers too.
> Chip

**
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: Localization: Simulating another Language

2018-07-26 Thread John J Foster via 4D_Tech
Hi Miyako,

I’me sure I read that blog yars ago but had forgotten about it. Thanks for 
that!!!

I have a list of the other itesm from past conversations. Again thanks...

John…

> On Jul 26, 2018, at 7:22 AM, 4d_tech-requ...@lists.4d.com wrote:
> 
> the very first 4D blog post featured a 3rd party app called "App Language 
> Chooser"
> 
> https://blog.4d.com/define-language-start-4d-international-version/ 
> 
**
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: Does MSC database compact work for large data files?

2018-07-26 Thread Chip Scheide via 4D_Tech
I have not had to do this, but I remember seeing others mention this 
process.

it went something like this:
- TURN OFF the indexes through out the database.
- let compact do its job
- TURN ON indexes through out the database
- let database index

-- not sure if this is needed/helps but you might want to look at 
turning off triggers too.
Chip

On Thu, 26 Jul 2018 09:47:00 -0500, John DeSoi via 4D_Tech wrote:
> I  had a very stable 16 user database with 4D 15 32-bit Mac. After 
> upgrading to 4D 16 64-bit Mac (on 16.3HF4), 4D server has been 
> crashing about twice a month. There is no consistency on the process 
> or records involved in the crash. The only consistency is the 
> backtrace of the internal 4D routines involved. Here are some samples.
> 
> Thread 93 Crashed:: Import (id = 133091)
> 0   libsystem_kernel.dylib0x7fff7f337b6e __pthread_kill + 10
> 1   libsystem_pthread.dylib   0x7fff7f502080 pthread_kill + 333
> 2   libsystem_c.dylib 0x7fff7f2931ae abort + 127
> 3   libsystem_malloc.dylib0x7fff7f39cad4 szone_error + 596
> 4   libsystem_malloc.dylib0x7fff7f39e0eb 
> small_free_list_remove_ptr_no_clear + 790
> 5   libsystem_malloc.dylib0x7fff7f392061 
> small_malloc_from_free_list + 171
> 6   libsystem_malloc.dylib0x7fff7f390859 
> szone_malloc_should_clear + 1600
> 7   libsystem_malloc.dylib0x7fff7f3901bd 
> malloc_zone_malloc + 103
> 8   libsystem_malloc.dylib0x7fff7f38f4c7 malloc + 24
> 9   com.4d.component.db4d 0x00010f052e19 
> VDBCacheMgr::NewPtr(unsigned long, unsigned char, int, int) + 25
> 10  com.4d.component.db4d 0x00010f399c00 
> TreeMem::PutInto(int, int, void*, OccupableStack*) + 256
> 11  com.4d.component.db4d 0x00010f39e26c 
> TreeMemHeader::PutIntoTreeMem(int, int, void*, OccupableStack*) + 428
> 12  com.4d.component.db4d 0x00010f125e2d 
> DataTableRegular::LoadRecord(int, unsigned long long&, 
> DB4D_Way_of_Locking, BaseTaskInfo*, unsigned char, unsigned char, 
> ReadAheadBuffer*, unsigned char*) + 1053
> 
> 
> Thread 77 Crashed::  CWR Export (id = 170783)
> 0   com.4d.component.db4d 0x00010f95ea6b 
> TreeMem::RetainFrom(int, int, OccupableStack*) + 139
> 1   com.4d.component.db4d 0x00010f95ea9e 
> TreeMem::RetainFrom(int, int, OccupableStack*) + 190
> 2   com.4d.component.db4d 0x00010f9636eb 
> TreeMemHeader::RetainFromTreeMem(int, OccupableStack*) + 75
> 3   com.4d.component.db4d 0x00010f6eb7f7 
> DataTableRegular::LoadNotFullRecord(int, unsigned long long&, 
> DB4D_Way_of_Locking, BaseTaskInfo*, unsigned char, ReadAheadBuffer*, 
> unsigned char*, unsigned char*) + 583
> 4   com.4d.component.db4d 0x00010f6df737 
> DataTable::Search(unsigned long long&, RechNode*, Bittab*, 
> xbox::VProgressIndicator*, BaseTaskInfo*, DB4D_Way_of_Locking, 
> Bittab*, int, Bittab&, LocalEntityModel*) + 3239
> 5   com.4d.component.db4d 0x00010f8389d3 
> RechNode::Perform(OptimizedQuery*, Bittab**, Bittab*, 
> xbox::VProgressIndicator*, xbox::VValueBag*, BaseTaskInfo*, 
> DB4D_Way_of_Locking, Bittab*, int, Bittab&, RechNode*&) + 163
> 6   com.4d.component.db4d 0x00010f8469ca 
> RechNodeMultiOperator::Perform(OptimizedQuery*, Bittab**, Bittab*, 
> xbox::VProgressIndicator*, xbox::VValueBag*, BaseTaskInfo*, 
> DB4D_Way_of_Locking, Bittab*, int, Bittab&, RechNode*&) + 2058
> 7   com.4d.component.db4d 0x00010f84da5f 
> OptimizedQuery::Perform(Bittab*, xbox::VProgressIndicator*, 
> BaseTaskInfo*, unsigned long long&, DB4D_Way_of_Locking, int, 
> Bittab*) + 1903
> 8   com.4d.component.db4d 0x00010f6e0f12 
> DataTable::ExecuteQuery(SearchTab*, QueryOptions*, QueryResult&, 
> BaseTaskInfo*, xbox::VProgressIndicator*) + 322
> 9   com.4d.component.db4d 0x00010f690933 
> VDBMgr::ExecExecuteQuery(IRequestReply*, CDB4DBaseContext*) + 259
> 10  com.4d.component.db4d 0x00010f688253 
> VDBMgr::ExecuteRequest(short, IRequestReply*, CDB4DBaseContext*) + 
> 1475
> 11  com.4d.component.db4d 0x00010f697697 
> VDBMgr::ExecuteRequest(short, xbox::IStreamRequestReply*, 
> CDB4DContext*) + 311
> 12  com.4d.component.db4d 0x00010f9a4a64 
> DB4DConnectionHandler::Handle(unsigned long long&) + 2036
> 
> 
> So it appears that 4D is crashing shortly after loading a record 
> (DataTableRegular::LoadRecord, DataTableRegular::LoadNotFullRecord). 
> The database is validated every night and reports no errors. Manual 
> check in MSC reports no errors. With no other solution in sight, it 
> is time to compact the database (70+ GB) and see if it makes a 
> difference. Here is what happens.
> 
> 1. Open MSC, click on Compact, click on Advanced. Check "Force 
> updating of the records" and "Compact address table". Click the 
> 

Re: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Jeremy French via 4D_Tech
Hi Michael,

As pointed out by Oliver and Kirk, use LISTBOX GET ARRAYS to confirm the object 
names you think are present in the list box are in fact assigned as the object 
name to a header or footer. If not, you will get a nil pointer.

So, see if the value for "FTR_Names_aT{$Ndx}" is present in the footer object 
names returned by LISTBOX GET ARRAYS.

Similarly, verify that the value for "HDR_Names_aT{$Ndx}" is in fact the same 
as one of the header object names returned by LISTBOX GET ARRAYS.

- Jeremy French



> On Jul 26, 2018, at 9:32 AM, mferguson--- via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> $FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx})
> $HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})
> 
> ... returns nil pointers

**
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: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Kirk Brooks via 4D_Tech
Michael,

On Thu, Jul 26, 2018 at 6:32 AM mferguson--- via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> We have a memory leak in our v15.6 Windows database and have narrowed it
> down to a listbox where the columns are dynamically added using LISTBOX
> INSERT COLUMN.
> The header and footer variables are nil pointers, in accordance with the
> documentation.
> And to reference these variables for the assignment of properties, per the
> documentation:
>
> $FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx})
> $HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})
>
> However, the get object pointer above returns nil pointers, so we can’t
> assign properties.
>
​I was just writing about using Listbox get arrays for this purpose when I
saw Olivier's post. I suggest this approach as well. ​


> So, we set up our own variable manager that declares and reuses header and
> footer variables for the listbox, using execute formula.  The variable
> manager has been tested and the number of variables for the form does not
> grow. However, the apparent search speed preceding the display gets slower
> and slower. The queries themselves are fast, but the re-display seems to be
> the culprit eating up memory.
>

Using EXECUTE ... is probably not the best solution for what you are
attempting to do. ​4D is pretty good at managing these variables. It sounds
like you're working with 4D interpreted. There are a lot of tricks you can
get away with using Execute in an interpreted db that fail if you plan on
compiling it later.

A few weeks ago another developer was having speed issues with listboxes as
well. In that case he was rebuilding the listboxes every time there was a
change and found the LISTBOX INSERT ARRAY command was slow. When I build
listboxes dynamically I handle the chores of configuring the listbox (that
is, inserting the columns, headers and footers) and populating them
independently. Changes in the data may require a REDRAW command but usually
not re-configuring the whole listbox. The point is once he changed his
approach he found the speed issue disappeared and overall management was
easier.

-- 
Kirk Brooks
San Francisco, CA
===

*We go vote - they go home*
**
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
**

Does MSC database compact work for large data files?

2018-07-26 Thread John DeSoi via 4D_Tech
I  had a very stable 16 user database with 4D 15 32-bit Mac. After upgrading to 
4D 16 64-bit Mac (on 16.3HF4), 4D server has been crashing about twice a month. 
There is no consistency on the process or records involved in the crash. The 
only consistency is the backtrace of the internal 4D routines involved. Here 
are some samples.

Thread 93 Crashed:: Import (id = 133091)
0   libsystem_kernel.dylib  0x7fff7f337b6e __pthread_kill + 10
1   libsystem_pthread.dylib 0x7fff7f502080 pthread_kill + 333
2   libsystem_c.dylib   0x7fff7f2931ae abort + 127
3   libsystem_malloc.dylib  0x7fff7f39cad4 szone_error + 596
4   libsystem_malloc.dylib  0x7fff7f39e0eb 
small_free_list_remove_ptr_no_clear + 790
5   libsystem_malloc.dylib  0x7fff7f392061 
small_malloc_from_free_list + 171
6   libsystem_malloc.dylib  0x7fff7f390859 
szone_malloc_should_clear + 1600
7   libsystem_malloc.dylib  0x7fff7f3901bd malloc_zone_malloc + 
103
8   libsystem_malloc.dylib  0x7fff7f38f4c7 malloc + 24
9   com.4d.component.db4d   0x00010f052e19 
VDBCacheMgr::NewPtr(unsigned long, unsigned char, int, int) + 25
10  com.4d.component.db4d   0x00010f399c00 
TreeMem::PutInto(int, int, void*, OccupableStack*) + 256
11  com.4d.component.db4d   0x00010f39e26c 
TreeMemHeader::PutIntoTreeMem(int, int, void*, OccupableStack*) + 428
12  com.4d.component.db4d   0x00010f125e2d 
DataTableRegular::LoadRecord(int, unsigned long long&, DB4D_Way_of_Locking, 
BaseTaskInfo*, unsigned char, unsigned char, ReadAheadBuffer*, unsigned char*) 
+ 1053


Thread 77 Crashed::  CWR Export (id = 170783)
0   com.4d.component.db4d   0x00010f95ea6b 
TreeMem::RetainFrom(int, int, OccupableStack*) + 139
1   com.4d.component.db4d   0x00010f95ea9e 
TreeMem::RetainFrom(int, int, OccupableStack*) + 190
2   com.4d.component.db4d   0x00010f9636eb 
TreeMemHeader::RetainFromTreeMem(int, OccupableStack*) + 75
3   com.4d.component.db4d   0x00010f6eb7f7 
DataTableRegular::LoadNotFullRecord(int, unsigned long long&, 
DB4D_Way_of_Locking, BaseTaskInfo*, unsigned char, ReadAheadBuffer*, unsigned 
char*, unsigned char*) + 583
4   com.4d.component.db4d   0x00010f6df737 
DataTable::Search(unsigned long long&, RechNode*, Bittab*, 
xbox::VProgressIndicator*, BaseTaskInfo*, DB4D_Way_of_Locking, Bittab*, int, 
Bittab&, LocalEntityModel*) + 3239
5   com.4d.component.db4d   0x00010f8389d3 
RechNode::Perform(OptimizedQuery*, Bittab**, Bittab*, 
xbox::VProgressIndicator*, xbox::VValueBag*, BaseTaskInfo*, 
DB4D_Way_of_Locking, Bittab*, int, Bittab&, RechNode*&) + 163
6   com.4d.component.db4d   0x00010f8469ca 
RechNodeMultiOperator::Perform(OptimizedQuery*, Bittab**, Bittab*, 
xbox::VProgressIndicator*, xbox::VValueBag*, BaseTaskInfo*, 
DB4D_Way_of_Locking, Bittab*, int, Bittab&, RechNode*&) + 2058
7   com.4d.component.db4d   0x00010f84da5f 
OptimizedQuery::Perform(Bittab*, xbox::VProgressIndicator*, BaseTaskInfo*, 
unsigned long long&, DB4D_Way_of_Locking, int, Bittab*) + 1903
8   com.4d.component.db4d   0x00010f6e0f12 
DataTable::ExecuteQuery(SearchTab*, QueryOptions*, QueryResult&, BaseTaskInfo*, 
xbox::VProgressIndicator*) + 322
9   com.4d.component.db4d   0x00010f690933 
VDBMgr::ExecExecuteQuery(IRequestReply*, CDB4DBaseContext*) + 259
10  com.4d.component.db4d   0x00010f688253 
VDBMgr::ExecuteRequest(short, IRequestReply*, CDB4DBaseContext*) + 1475
11  com.4d.component.db4d   0x00010f697697 
VDBMgr::ExecuteRequest(short, xbox::IStreamRequestReply*, CDB4DContext*) + 311
12  com.4d.component.db4d   0x00010f9a4a64 
DB4DConnectionHandler::Handle(unsigned long long&) + 2036


So it appears that 4D is crashing shortly after loading a record 
(DataTableRegular::LoadRecord, DataTableRegular::LoadNotFullRecord). The 
database is validated every night and reports no errors. Manual check in MSC 
reports no errors. With no other solution in sight, it is time to compact the 
database (70+ GB) and see if it makes a difference. Here is what happens.

1. Open MSC, click on Compact, click on Advanced. Check "Force updating of the 
records" and "Compact address table". Click the compact button.

The first bit of confusion is the path under "Original files backup folder" is 
*not* a backup of the original database. It is the new compacted database.

2. Wait for hours and the progress bar finally reaches the last table and is 
pixels away from the end. Wait for many more hours, nothing seems to be 
happening even though 4D is using 100% CPU. Finally discover that 4D is 
indexing the database, but the indexing progress window is hidden behind the 
MSC window.

3. Wait many more hours, progress bar for 

AW: Memory leak with dynamic variables in list boxes?

2018-07-26 Thread Flury Olivier via 4D_Tech
Hi Michael,

There should not be a need to use Execute, also it is not recommended to do so 
for declaring/creating new variables during runtime (however, I admit, it can 
be handy...)

When you tested with nil pointers for header and footer variables: could it be 
that your object names (for header and footer) were not unique? They must be 
unique for the entire form.

The object get pointer command should work for a footer/header and not return a 
nil pointer, e.g. $pointerToHeader:=Object get 
pointer("MyUniqueHeaderObjectName";Object named")

LISTBOX GET ARRAYS is helpful for checking the state of your variables:

http://doc.4d.com/4Dv15/4D/15.6/LISTBOX-GET-ARRAYS.301-3817874.en.html

I am using LISTBOX INSERT COLUMN with nil pointers a lot and never had problems 
doing so, not in v15 and not in v16.

Best,

Olivier

  https://flury-software.ch/

-Ursprüngliche Nachricht-
Von: 4D_Tech <4d_tech-boun...@lists.4d.com> Im Auftrag von mferguson--- via 
4D_Tech
Gesendet: Donnerstag, 26. Juli 2018 15:33
An: 4D iNug Technical <4d_tech@lists.4D.com>
Cc: mfergu...@myofficelink.com
Betreff: Memory leak with dynamic variables in list boxes?

Hi,

We have a memory leak in our v15.6 Windows database and have narrowed it down 
to a listbox where the columns are dynamically added using LISTBOX INSERT 
COLUMN.

The header and footer variables are nil pointers, in accordance with the 
documentation.

And to reference these variables for the assignment of properties, per the 
documentation:

$FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx}) 
$HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})

However, the get object pointer above returns nil pointers, so we can’t assign 
properties.

So, we set up our own variable manager that declares and reuses header and 
footer variables for the listbox, using execute formula.  The variable manager 
has been tested and the number of variables for the form does not grow. 
However, the apparent search speed preceding the display gets slower and 
slower. The queries themselves are fast, but the re-display seems to be the 
culprit eating up memory.

I would really appreciate any insights or solutions!!

Thanks

Michael Ferguson
**
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
**

Memory leak with dynamic variables in list boxes?

2018-07-26 Thread mferguson--- via 4D_Tech
Hi,

We have a memory leak in our v15.6 Windows database and have narrowed it down 
to a listbox where the columns are dynamically added using LISTBOX INSERT 
COLUMN.

The header and footer variables are nil pointers, in accordance with the 
documentation.

And to reference these variables for the assignment of properties, per the 
documentation:

$FtrVar_P:=OBJECT Get pointer(Object named;FTR_Names_aT{$Ndx})
$HdrVar_P:=OBJECT Get pointer(Object named;HDR_Names_aT{$Ndx})

However, the get object pointer above returns nil pointers, so we can’t assign 
properties.

So, we set up our own variable manager that declares and reuses header and 
footer variables for the listbox, using execute formula.  The variable manager 
has been tested and the number of variables for the form does not grow. 
However, the apparent search speed preceding the display gets slower and 
slower. The queries themselves are fast, but the re-display seems to be the 
culprit eating up memory.

I would really appreciate any insights or solutions!!

Thanks

Michael Ferguson
**
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
**

UTF-8 and SEND HTML FILE with Tags

2018-07-26 Thread David Garrard via 4D_Tech
Hello,

I am trying to get the correct output using SEND HTML FILE on a 4D Web
Server when the content is Thai characters and it stored in 4D v16.3
correctly.  

1) In Design… Database Settings… Compatibility, I have Unicode Mode on.
2) In Design… Database Settings… Web… Options (II), I have Send Extended
Characters Directly checked on.  And Standard Set is UTF-8.
3) The Thai text is legible in the forms in 4D and is valid Thai.
4) I have this in the header of my web page:  
5) When I place a simple tag that references some Thai data it is rendered
correctly by the browser using both 4DTEXT and 4DHTML. 
6) But if I build a text variable within 4D and place the Thai characters
inside a block of HTML using string commands in 4D to create an HTML table.
Like this snippet of the webpage for example:   

 
 


ชื่อย่อหุ้น
สัดส่วน (%)



BDMS
43.7



 

And then reference that variable in the HTML file via a 4DHTML tag, the
table content is not appearing - the whole table is corrupted or missing.  

It's pretty clear that it is related to the characters in the 2  tags,
because the exact same code with English data in the 2  tags in the
table leads it to be rendered fine.  

Does anyone have any ideas?  I thought I covered all the settings.

TIA,
David

**
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
**