Re: Memory leak with dynamic variables in list boxes?

2018-08-01 Thread Keisuke Miyako via 4D_Tech
Hello,

this is 16R6 structure.

nothing special, just did what was suggested in the previous post.

https://github.com/4D-JP/4d-tips-office-document-information/releases/tag/iNUG-180802

2018/08/02 11:32、mferguson--- via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
If anyone has a working example of assigning dynamic variables to a footer so 
that SET FOOTER CALCULATION works, I’d really appreciate fairly detailed 
outline or demo of 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
**

Re: Memory leak with dynamic variables in list boxes?

2018-08-01 Thread mferguson--- via 4D_Tech
Hi,

I have tried and I am unable to get Miyako’s suggestion to work in compiled, 
even after modeling after his description and the example he linked to.

If anyone has a working example of assigning dynamic variables to a footer so 
that SET FOOTER CALCULATION works, I’d really appreciate fairly detailed 
outline or demo of it.  Note that there are two senses in which assigning 
dynamic variables can be taken: dynamically declaring a variable, and 
dynamically assigning an already declared compiler variable.  I was hoping not 
to have to pre-declare footer variables, but I don’t see how this is done.

Michael Ferguson


> On Jul 26, 2018, at 11:47 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> the workaround is to have an extra dynamic variable on the form,
> type it with VARIABLE TO VARIABLE,
> then use it with LISTBOX INSERT COLUMN
> 
> http://forums.4d.com/Post/FR/18014516/1/18014517#18014517
> 
> granted, you would need as many dynamic variable as the columns you insert.
> it's probably easier to use an array instead.
> 
> you could go really tricky and use OBJECT DUPLICATE.
> but I think an array is more simple.
> 
> 2018/07/27 14:14、Flury Olivier via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> 
> Works interpreted, but not compiled.
> 
>   https://flury-software.ch/
> 
> 
> 
> **
> 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: Changes to variable initialization in v16?

2018-08-01 Thread JOHN BAUGHMAN via 4D_Tech
Always.

> On Aug 1, 2018, at 3:17 PM, David Eddy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> In addition to consistency & clarity in showing variable type, do you put   
> any / much / no   thought into using the variable names to indicate 
> business—vs technical—purpose?

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: Changes to variable initialization in v16?

2018-08-01 Thread David Eddy via 4D_Tech


> On Aug 01, 2018, at 3:00 PM, Jody Bevan  > wrote:
> 
> From: 
> To: supp...@gus.ucsb.edu , 4D iNug Technical 
> <4d_tech@lists.4d.com >
> Subject: Re: Changes to variable initialization in v16?
> Message-ID:  >
> Content-Type: text/plain; charset=us-ascii
>  
> 2. The naming convention must clearly show the type of variable.

In addition to consistency & clarity in showing variable type, do you put   any 
/ much / no   thought into using the variable names to indicate business—vs 
technical—purpose?


David Eddy
Babson Park, MA

W: 781-455-0949

de...@davideddy.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: Query by Formula bug Client/Server with Automatic Relations

2018-08-01 Thread Keisuke Miyako via 4D_Tech
according to the documentation:

http://doc.4d.com/4Dv17/4D/17/About-Relations.300-3730102.en.html

QUERY BY FORMULA "will use existing automatic Many-to-One relations" and "will 
use automatic One-to-Many relations"

so as soon as a record of the many table becomes current, it automatically 
changes the current record on the 1 table.

isn't that how automatic relations are supposed to work?

2018/08/02 7:46、Richard Wright via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
I discovered this in v16 R2 but it’s also a problem in v13.5. Has anyone else 
seen this problem?



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

Query by Formula bug Client/Server with Automatic Relations

2018-08-01 Thread Richard Wright via 4D_Tech
I just ran into a problem where running a Query By Formula bug in Client/Server 
that has apparently been around for a long time:

Client/Server
Two related tables and automatic many-to-one is turned on

1.  Select a record in the One table
2.  Run a standard query to get the related records in the Many table
3.  Run Query Selection By Formula on the Many table where the formula uses 
nothing from the One table at all

The current record and entire selection of the One table is lost. You don’t 
even need step 2. Just run Query By Formula on the Many table. Even though the 
formula has nothing in it that touches the One table, the One table’s selection 
is cleared. It works fine in standalone.

I discovered this in v16 R2 but it’s also a problem in v13.5. Has anyone else 
seen this problem?



Richard Wright
DataDomain
rwri...@datadomainsoftware.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: Double-click event on a hierarchical listbox not working

2018-08-01 Thread Pat Bensky via 4D_Tech
Rudy,
Yes, thanks, I did check all the things you suggested ... it has worked for
many months without problem until today!
Anyway, I deleted the list object and created a new one and that appears to
have fixed it.
I wonder what else has become corrupted that I don't know about ...
Pat

On Wed, 1 Aug 2018 at 23:17, Two Way Communications via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hi Pat,
>
> I am running High Sierra also. (10.13.6)
> No issues here.
>
> If there is a case of (form event) in your code, I would put the ‘On
> double clicked’ before the ‘on Clicked’)
> In the past this has bitten me a few times where it would first go into
> the ‘On clicked’ and never do the ‘On double clicked’
>
> Also: disable ‘movable rows’.
>
> About the debugger: place the trace bullet as late as possible, because it
> might mislead you
>
> I can’t explain the ‘On drop’ occurring, however….
>
>
> Rudy Mortier
> Two Way Communications bvba
>
>
>
> > On 2 Aug 2018, at 00:04, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > Using v17r2
> > All of a sudden I am finding that a double-click on an element in a
> > hierarchical listbox doesn't work. Well occasionally it does but mostly,
> > not. If I repeatedly double-click, eventually it will work.
> > Bizarrely, if I put a trace on the object method it says that the form
> > event was On Drop!
> > If I disable the On Drop event, it registers a double-click as a click.
> > If I disable On clicked, it registers a click or double-click as On Drop
> > (even though the On Drop event is disabled).
> > This morning I upgraded my Mac to High Sierra. I wonder if that has
> > something to do with it? Anybody else experienced this?
> >
> > Pat
> >
> > --
> > *
> > CatBase - Top Dog in Data Publishing
> > tel: +44 (0) 207 118 7889
> > w: http://www.catbase.com
> > skype: pat.bensky
> > *
> > **
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto: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
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Double-click event on a hierarchical listbox not working

2018-08-01 Thread Two Way Communications via 4D_Tech
Hi Pat,

I am running High Sierra also. (10.13.6)
No issues here.

If there is a case of (form event) in your code, I would put the ‘On double 
clicked’ before the ‘on Clicked’)
In the past this has bitten me a few times where it would first go into the ‘On 
clicked’ and never do the ‘On double clicked’

Also: disable ‘movable rows’.

About the debugger: place the trace bullet as late as possible, because it 
might mislead you

I can’t explain the ‘On drop’ occurring, however….


Rudy Mortier
Two Way Communications bvba 



> On 2 Aug 2018, at 00:04, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Using v17r2
> All of a sudden I am finding that a double-click on an element in a
> hierarchical listbox doesn't work. Well occasionally it does but mostly,
> not. If I repeatedly double-click, eventually it will work.
> Bizarrely, if I put a trace on the object method it says that the form
> event was On Drop!
> If I disable the On Drop event, it registers a double-click as a click.
> If I disable On clicked, it registers a click or double-click as On Drop
> (even though the On Drop event is disabled).
> This morning I upgraded my Mac to High Sierra. I wonder if that has
> something to do with it? Anybody else experienced this?
> 
> Pat
> 
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto: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
**

Double-click event on a hierarchical listbox not working

2018-08-01 Thread Pat Bensky via 4D_Tech
Using v17r2
All of a sudden I am finding that a double-click on an element in a
hierarchical listbox doesn't work. Well occasionally it does but mostly,
not. If I repeatedly double-click, eventually it will work.
Bizarrely, if I put a trace on the object method it says that the form
event was On Drop!
If I disable the On Drop event, it registers a double-click as a click.
If I disable On clicked, it registers a click or double-click as On Drop
(even though the On Drop event is disabled).
This morning I upgraded my Mac to High Sierra. I wonder if that has
something to do with it? Anybody else experienced this?

Pat

-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Two Way Communications via 4D_Tech
Thx Keisuke.

I am still getting to grips with the whole new paradigm that is objects, 
collections and ORDA.
The amount of information is elaborate, and often in different places.

So insights like this are really helpful.

Good thing we have the NUG ;-)

BTW, collections and ORDA are so cool! 


Rudy Mortier
Two Way Communications bvba 



> On 1 Aug 2018, at 22:44, Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> that's right, you have to "touch" the data source object to signal that it is 
> dirty and has to be redrawn.
> 
> so, even though
> 
> col.push()
> 
> adds an element to the collection,
> in this context (listbox on form),
> you have to assign the variable to itself:
> 
> col:=col.push()
> 
> 2018/08/02 5:24、Christian Sakowski via 4D_Tech 
> <4d_tech@lists.4d.com>のメール:
> Form.cColl:=Form.cColl
> 
> 
> 
> **
> 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: Changes to variable initialization in v16?

2018-08-01 Thread Noah via 4D_Tech
Many thanks for so much helpful feedback!

It is wonderful to hear the different opinions, viewpoints (and the
respective justifications) from seasoned developers on a variety of best
practices for the 4D language framework.

We used to be in the habit of chipping away at compiler errors before
releasing a new version, but had grown out of practice as there some that
are quite tricky (and time consuming) to track down (and even more
difficult to test that the original intended functionality still remains).
However, after some sleuthing, we have just 32 syntax errors.

4D is remarkable in that it does allow for a very small team (or even a
single person) to be very productive and to bring a lot of functionality in
a short amount of time. Although, when there have been several 'cooks in
the kitchen' developing one application over 20 years, it is quite daunting
to consider the network of dependencies that exist (and what 'might break'
if we make a change).

Ad-hoc patching is highly unfavorable, but that is how it was set up when I
arrived. Currently, the users can happily continue working without
interruption and there is no compelling reason to make a change in the
existing architecture right now.
Thank you for confirming that there is nothing major changing between v15
and v16. We originally observed that (for at least one window) what worked
in v11-v15 was not working in v16. It was simple to 'patch' fix, but as
many of you have pointed out, we likely have some type coercion taking
place.

I have traced the issue (what this original email was about) in the
debugger.
There is a parent window with a tabbed interface, the variable in question
was declared as a local variable in the form method, the 'on load' event.
When selecting a different tab, the variable became 'UN-initialized" and
produced a runtime error.
It was a very common variable name, so maybe we can take a different route
of investigation (after getting through the compiler checks).

Most of the errors are along the lines of "The result of the function is
not compatible with the expression"

Again,
Many thanks to the community of folks who added to this thread!



On Wed, Aug 1, 2018 at 1:40 PM Keisuke Miyako via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> no, nothing major has changed with regards to form events and scope of
> variables between v15 and v16.
>
> I am not saying that running interpreted is good or bad.
>
> when you run "syntax check" the only thing it checks is typing integrity.
> on other words, the hundreds of errors it reports are basically all typing
> errors.
>
> you could track the execution sequence with debug logging (database
> parameter #34) or TRACE,
> but the order of form events is really not the issue the here.
>
> you can forgive the typing integrity and do an ad hoc patch (like you
> described in the original post) or face the typing issue head on,
> but dealing with the error as if it was because of "scoping of variable
> initialisation and form events" is the wrong approach, in my opinion.
>
> 2018/08/01 23:34、Noah via 4D_Tech <4d_tech@lists.4d.com 4d_tech@lists.4d.com>>のメール:
>
> Is is really 'that bad' to run in interpreted mode?
> My original question was simply about the scoping of variable
> initialization and form events in version 16.
>
>
>
> **
> 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: Adding elements to a listbox containing a collection

2018-08-01 Thread Keisuke Miyako via 4D_Tech
that's right, you have to "touch" the data source object to signal that it is 
dirty and has to be redrawn.

so, even though

col.push()

adds an element to the collection,
in this context (listbox on form),
you have to assign the variable to itself:

col:=col.push()

2018/08/02 5:24、Christian Sakowski via 4D_Tech 
<4d_tech@lists.4d.com>のメール:
Form.cColl:=Form.cColl



**
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: Changes to variable initialization in v16?

2018-08-01 Thread Keisuke Miyako via 4D_Tech
no, nothing major has changed with regards to form events and scope of 
variables between v15 and v16.

I am not saying that running interpreted is good or bad.

when you run "syntax check" the only thing it checks is typing integrity.
on other words, the hundreds of errors it reports are basically all typing 
errors.

you could track the execution sequence with debug logging (database parameter 
#34) or TRACE,
but the order of form events is really not the issue the here.

you can forgive the typing integrity and do an ad hoc patch (like you described 
in the original post) or face the typing issue head on,
but dealing with the error as if it was because of "scoping of variable 
initialisation and form events" is the wrong approach, in my opinion.

2018/08/01 23:34、Noah via 4D_Tech 
<4d_tech@lists.4d.com>のメール:

Is is really 'that bad' to run in interpreted mode?
My original question was simply about the scoping of variable
initialization and form events in version 16.



**
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: Adding elements to a listbox containing a collection

2018-08-01 Thread Christian Sakowski via 4D_Tech
You have to assign the collection to itself:

Form.cColl:=Form.cColl

Then the Listbox will be updated.
--

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



> Am 01.08.2018 um 22:19 schrieb Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com>:
> 
> I guess I must be overlooking the obvious here …
> I searched the documentation, the NUG, the Blog but could not find an answer, 
> so maybe somebody can help me out.
> 
> I have a collection that is being displayed inside a listbox. So far so good. 
> No issues. I can select the rows and I can edit the cell contents.
> 
> Now, I want to add a row, and enter values.
> 
> Here’s where it goes wrong. I cannot get the row to display, let alone edit 
> it.
> 
> Since ‘LISTBOX INSERT ROWS’ only works with arrays, I tried cColl.push, which 
> actually adds an element to the collection (I verified in the debugger)
> But the row is not added to the listbox, no matter what I try (i.e. 
> REDRAW(Listbox))
> 
> The next challenge will be to delete an element …
> 
> Has anybody done this successfully?
> 
> 
> Rudy Mortier
> Two Way Communications bvba 
> 
> 
> **
> 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
**

Adding elements to a listbox containing a collection

2018-08-01 Thread Two Way Communications via 4D_Tech
I guess I must be overlooking the obvious here …
I searched the documentation, the NUG, the Blog but could not find an answer, 
so maybe somebody can help me out.

I have a collection that is being displayed inside a listbox. So far so good. 
No issues. I can select the rows and I can edit the cell contents.

Now, I want to add a row, and enter values.

Here’s where it goes wrong. I cannot get the row to display, let alone edit it.

Since ‘LISTBOX INSERT ROWS’ only works with arrays, I tried cColl.push, which 
actually adds an element to the collection (I verified in the debugger)
But the row is not added to the listbox, no matter what I try (i.e. 
REDRAW(Listbox))

The next challenge will be to delete an element …

Has anybody done this successfully?


Rudy Mortier
Two Way Communications bvba 


**
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: Changes to variable initialization in v16?

2018-08-01 Thread JOHN BAUGHMAN via 4D_Tech
All the reasons posted for not running interpreted are valid and well taken.

On the other hand I see only 2 reasons that would compel one to run compiled… 
security and speed

If you are concerned about someone stealing your code or perhaps messing with 
it, then security would be the driving force.

For the first 10 or so years of my close to 30 years with 4D I religiously 
deployed compiled. For me speed was the compelling factor.  With each new 
version of 4D, however, 4D got faster and faster until one day I saw very 
little difference between the two. So given how much easier it was to support a 
deployed database if it was interpreted, I decided to try deploying interpreted 
for a while. I never looked back.

Being able to fix a bug or add a minor feature without little or no down time 
makes me a hero with my clients. 

Yes I know it’s sacrilege to even contemplate changing or adding to a deployed 
server while it is running, but I do it all the time for isolated features or a 
simple bug fix. Sometimes it is worth putting a bandaid on a problem until you 
have a more permanent fix and can take the server down without affecting the 
client’s work flow. I rarely change existing code but instead copy the 
offending process or method to a button or menu item, put the fixed code there 
and tell the user to use the new button or menu item.

I always compile my databases before deploying. I won’t deploy a database that 
will not compile, but I no longer deploy them compiled.

John


> On Aug 1, 2018, at 4:34 AM, Noah via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Is is really 'that bad' to run in interpreted mode?

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: ORDA question: how do I add related fields to an entity selection?

2018-08-01 Thread Chip Scheide via 4D_Tech
Tim,
I have been creating a LOT of custom constants recently (removing IP 
vars used as constants)
[sidebar - I am down to < 40 ipvars from over 550]

Yes, it is a minor PITA to have to restart, but if you 'watch' the 
loading process 4D loads the custom constants BEFORE running almost 
everything - including the native login screen.

I have seen this, as I have been screwing around with a custom constant 
the xml did not like and during the load of the xlif file 4D would 
choke and throw an error -- before the login screen.

so.. I understand why custom constants are this way...

Chip

On Wed, 01 Aug 2018 14:20:23 -0500, Tim Nevels via 4D_Tech wrote:
> On Aug 1, 2018, at 9:49 AM, Jeremy French wrote:
> 
>> Try creating 2-tables with a one-to-many relation. Say "Owner" (one 
>> table) and "Item" (many table.)
>> In the Relation Inspector, name the relations:
>> 
>> Many to one as "theOwner"
>> One to many as "theItems"
>> 
>> Don't forget to restart 4D before examining in the Debugger. With 
>> ORDA, any structure change requires restarting 4D to be recognized.
> 
> They really need to fix that. 
> 
> Reminds me of how custom constants work. Such a PITA to have to 
> restart to be able to use a newly created constant. So much a PITA 
> that I’ve avoided custom constants because of it. And thus far 4D has 
> never addressed that. 
> 
> Hope they treat ORDA differently than they have done with custom constants. 
> 
> 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
> **
---
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: ORDA question: how do I add related fields to an entity selection?

2018-08-01 Thread Tim Nevels via 4D_Tech
On Aug 1, 2018, at 9:49 AM, Jeremy French wrote:

> Try creating 2-tables with a one-to-many relation. Say "Owner" (one table) 
> and "Item" (many table.)
> In the Relation Inspector, name the relations:
> 
> Many to one as "theOwner"
> One to many as "theItems"
> 
> Don't forget to restart 4D before examining in the Debugger. With ORDA, any 
> structure change requires restarting 4D to be recognized.

They really need to fix that. 

Reminds me of how custom constants work. Such a PITA to have to restart to be 
able to use a newly created constant. So much a PITA that I’ve avoided custom 
constants because of it. And thus far 4D has never addressed that. 

Hope they treat ORDA differently than they have done with custom constants. 

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

Re: Changes to variable initialization in v16?

2018-08-01 Thread Tim Nevels via 4D_Tech
On Aug 1, 2018, at 9:49 AM, Noah wrote:

> Is is really 'that bad' to run in interpreted mode?

No. The real question to answer “is the application working and are the users 
happy?” If the answer is “yes” then who cares if it is compiled or not? 

Same goes for typing variable with “All variables are typed”. Sure it is the 
preferred, best practices thing to do. But if the application is working fine 
without it… who cares, really?

There will always be some that “require” that things be done a certain way, or 
they have what Larry David once said on his show Curb Your Enthusiasm “a tickle 
in their anus”. :)

If your’s feels fine, I wouldn't worry about it and continue enjoying using 4D 
the way you are now. That’s one of the great things about using 4D. There is 
not just one way to use it, there are many ways. Each with advantages and 
disadvantages. 

But do not complain in the future if not following these recommended best 
practices bites you in your anus. You’ll get little sympathy here. :)

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

Re: Changes to variable initialization in v16?

2018-08-01 Thread Chip Scheide via 4D_Tech
care to share?
:)
On Wed, 1 Aug 2018 10:13:50 -0600, Jody Bevan via 4D_Tech wrote:
> 
> An added advantage is that you can write a method that you can run 
> each time to modify a method (in the sense of adding or modifying) a 
> variable.
---
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: Changes to variable initialization in v16?

2018-08-01 Thread Timothy Penner via 4D_Tech
> Is it really 'that bad' to run in interpreted mode?

Running interpreted is not necessarily the problem; although keep in minder 
that the  end goal for every developer should be a compiled application - 
interpreted is for development, not deployment.

> Consequently, Typing Generation and Syntax Checking both fail (since this 
> application had never been written with compilation as a goal)

The errors reported by the syntax checker are definitely a problem! They must 
be fixed.

The tech tip I linked specifically mentions:
{
If after fixing your code you do not want to run your application compiled, 
simply click on the "Clear Compiled Code" button to remove the compiled code.
}

The goal of the tech tip is not to run compiled, but it is to use the 
applications built-in tools to check your work for errors. If the built-in 
tools are telling you that your code has errors, then well, you have errors 
that need to be fixed. The good news is that the compiler makes it super 
simple. Usually, you can just double click on the error and it brings you 
directly to the line that the problem is referring to (this is described in the 
tech tip I linked). Your work is literally cut out for you, just double click 
and then fix.

Here is the tip again:

Tech Tip: Using the compiler to check for coding mistakes
http://kb.4d.com/assetid=50223

Kind Regards,

Tim PENNER





From: Noah 
Sent: Wednesday, August 01, 2018 7:34 AM
To: 4d_tech@lists.4d.com
Cc: Timothy Penner 
Subject: Re: Changes to variable initialization in v16?

Thank you both for the speedy replies!
Unfortunately this inherited application IS running in interpreted mode and has 
hundreds of errors that would keep it from compiling.

As time permits we will occasionally revisit the compilation errors and work 
towards a compiled version (but we have not made it there yet).
Consequently, Typing Generation and Syntax Checking both fail (since this 
application had never been written with compilation as a goal)

Do you have any other suggestions?

Is is really 'that bad' to run in interpreted mode?
My original question was simply about the scoping of variable initialization 
and form events in version 16.

On Tue, Jul 31, 2018 at 3:25 PM Timothy Penner via 4D_Tech 
<4d_tech@lists.4d.com> wrote:
In addition to what has already been said -

Using a compilation path of "All variables are typed" is highly recommended:
http://kb.4d.com/assetid=50223

-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
**
**
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: Changes to variable initialization in v16?

2018-08-01 Thread Jody Bevan via 4D_Tech
Noah:

Can I make a suggestion for you that I and many others here do in their code:

1. Have very defined naming convention of your variables in code. 
2. The naming convention must clearly show the type of variable.
3. Every method must declare its local variables.
4. Every process variable must be declared int the Compiler_ProcVar method
5. Every Interprocess variable must be declared in the Compiler_IP_Var method
6. Anytime you start a new process ensure that you call the Compiler_ProcVar 
method.
7. When you start the application call the Compiler_IP_Var method.
8. For every method ensure to add an appropriate entry in the Compiler_Methods.


Certainly this is daunting if you have not done it before and you have a lot of 
code. Once you get it done though it makes things work for you so much better.
Your code will work more consistently.

An added advantage is that you can write a method that you can run each time to 
modify a method (in the sense of adding or modifying) a variable.
This method will go through through your code, delete all the variable 
declarations, and then recreate them as appropriate and place them in a 
preferred order.
This makes coding so much simpler. I now do not have to spend the time writing 
out the compiler declarations, or managing the modification or deletion of 
them. The method does it all.

I know this does not get you through what you need right now, but it is likely 
what you need to get done ASAP.

Sincerely

Jody Bevan
Argus Production Inc.


> On Jul 31, 2018, at 3:46 PM, Noah via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Good afternoon,
> We are in the process of converting an application from 15 to 16 and one of
> the first errors that we have encountered came from a line that was setting
> the query destination into a variable.
> 
> The variable was declared in the on Load form event, and this code has
> worked without a problem for many versions back.
> 
> I was able to quickly bypass the runtime error by moving the variable
> declaration out of the conditional block which only ran once (when the form
> loaded) into the form method itself (not wrapped in a conditional). Rather
> than blindly make a change, we would like to have a solid understanding of
> what changed from 15 to 16.
> 
> I have combed over the changes listed here:
> http://doc.4d.com/4Dv16/4D/16.3/Conversion-to-4D-v16.100-3673248.en.html
> specifically:
> http://doc.4d.com/4Dv16/4D/16.3/Changes-in-behavior.200-3673250.en.html
> 
> 

**
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: Changes to variable initialization in v16?

2018-08-01 Thread Chip Scheide via 4D_Tech
I'll offer a differing opinion  :)

That depends...
- IF you have control over the server, and access to it, then code 
security is less of an issue.
- if you are distributing a stand alone application, or have little or 
no control over the server and it's security then running interpretedly 
is a definite NO.

- Running interpretedly allows you to fix things that go wrong, 
quickly, and without the need to 'shut it all down'*. 
- directly 'Fixing' things on a live server is a BAD (very very BAD) 
idea.
- Fixes should be done 'off-line', tested, and then installed, after 
doing complete backups.
  -- off-line can mean a separate development server, or a copy of 
everything on a local development machine.

- Interpreted systems are, by definition slower, depending on the 
system, the hardware, and the user expectations, being slower is not 
necessarily an issue.
- Compiled system can throw errors which you can not catch 
interpretedly (string truncation, and typing issues when working 
through pointers, come to mind).
  -- fixing these type of problems (when not caught in testing) take 
longer. it requires determining where/how the error occurs, fixing it, 
recompiling and then 'shutting the whole thing down'* to install a new 
copy. 

- Additionally, you said that the system is 'inherited', so you did not 
write it, and you probably have incomplete knowledge of the inner 
workings of the system. I would suggest that you work toward being able 
to compile the system. However, since it is currently interpreted, and 
it sounds like you it is not going to be compilable for quite some 
time, you have little choice. :)


* - you may be able to get around the shut it down part with 4D's 
update system, but I have never used it so I do not know limitations or 
what is required.

On Wed, 1 Aug 2018 07:34:28 -0700, Noah via 4D_Tech wrote:
> 
> Is is really 'that bad' to run in interpreted mode?
> My original question was simply about the scoping of variable
> initialization and form events in version 16.
---
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: Changes to variable initialization in v16?

2018-08-01 Thread Chuck Miller via 4D_Tech
In my opinion it is. It is too easy to make changes with unexpected results. 
for one. Security for another re control of source code.

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 Aug 1, 2018, at 10:34 AM, Noah via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> 
> Is is really 'that bad' to run in interpreted mode?
> My original question was simply about the scoping of variable
> initialization and form events in version 16.

**
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: Changes to variable initialization in v16?

2018-08-01 Thread Chip Scheide via 4D_Tech
if you have 'all variable are typed'
compilation may throw LOTS of errors, but if you look at them they are 
(often) mostly just variable which have never been given compiler 
directives, and at least in my case, most often are locals.

fixing these types of compiler errors are simple, somewhat time 
consuming, but simple.
once you get the typing under control, then you can see what "real" 
errors you have to deal with.

I would suggest resolving ALL of the typing issues, then take a fresh 
look at the situation.

as to your original question/issue -- is it possible that the variable 
is declare 2x as different types?

Chip

On Wed, 1 Aug 2018 07:34:28 -0700, Noah via 4D_Tech wrote:
> Thank you both for the speedy replies!
> Unfortunately this inherited application IS running in interpreted mode and
> has hundreds of errors that would keep it from compiling.
> 
> As time permits we will occasionally revisit the compilation errors and
> work towards a compiled version (but we have not made it there yet).
> Consequently, Typing Generation and Syntax Checking both fail (since this
> application had never been written with compilation as a goal)
> 
> Do you have any other suggestions?
> 
> Is is really 'that bad' to run in interpreted mode?
> My original question was simply about the scoping of variable
> initialization and form events in version 16.
> 
> On Tue, Jul 31, 2018 at 3:25 PM Timothy Penner via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> In addition to what has already been said -
>> 
>> Using a compilation path of "All variables are typed" is highly
>> recommended:
>> http://kb.4d.com/assetid=50223
>> 
>> -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
>> **
> **
> 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: Changes to variable initialization in v16?

2018-08-01 Thread Noah via 4D_Tech
Thank you both for the speedy replies!
Unfortunately this inherited application IS running in interpreted mode and
has hundreds of errors that would keep it from compiling.

As time permits we will occasionally revisit the compilation errors and
work towards a compiled version (but we have not made it there yet).
Consequently, Typing Generation and Syntax Checking both fail (since this
application had never been written with compilation as a goal)

Do you have any other suggestions?

Is is really 'that bad' to run in interpreted mode?
My original question was simply about the scoping of variable
initialization and form events in version 16.

On Tue, Jul 31, 2018 at 3:25 PM Timothy Penner via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> In addition to what has already been said -
>
> Using a compilation path of "All variables are typed" is highly
> recommended:
> http://kb.4d.com/assetid=50223
>
> -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
> **
**
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: Example databases

2018-08-01 Thread Jeremy Roussak via 4D_Tech
Now why didn’t I think of that? Thanks, Pat.

Jeremy


> On 1 Aug 2018, at 08:27, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Look on the blog ...
> https://blog.4d.com
> 
> On Wed, 1 Aug 2018 at 08:17, Jeremy Roussak via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
>> Are there any examples showing off the new features of v17? I’m thinking
>> in particular of ORDA.
>> 
>> Jeremy


**
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: Example databases

2018-08-01 Thread Pat Bensky via 4D_Tech
Look on the blog ...
https://blog.4d.com

On Wed, 1 Aug 2018 at 08:17, Jeremy Roussak via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Are there any examples showing off the new features of v17? I’m thinking
> in particular of ORDA.
>
> Jeremy
>
> **
> 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
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Example databases

2018-08-01 Thread Jeremy Roussak via 4D_Tech
Are there any examples showing off the new features of v17? I’m thinking in 
particular of ORDA.

Jeremy

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