Re: "Search References" Behavior Change

2021-09-13 Thread John DeSoi via 4D_Tech
What version of 4D are you using? I don't recall seeing this problem in version 
18. I just tested 19 and 19R2 - "Search References" only shows the method calls 
(same as "Search Callers" if the method is open).  

John DeSoi, Ph.D.


> On Sep 13, 2021, at 1:47 PM, Dave Nasralla via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> In the past, I would right-click a method name and select "Search
> References" and I would get a list of literal references to that exact
> method. Now, when I do that, I get more of a text search of the
> database.
> 
> For example: If I right click on the method name "Post_Data", I'll get hits 
> for:
> - WS_Post_Data
> - \\ Post_Data is a method for doing
> - UT_Post_Data_Method3

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: Syntax Error in a Compiled Database

2021-09-09 Thread John DeSoi via 4D_Tech
I would setup an error handling method (ON ERR CALL) and use GET LAST ERROR 
STACK and see if it provides more information. If you could update to at least 
17R6, you could use the Get call chain command to see exactly where the error 
is.

> On Sep 9, 2021, at 11:05 AM, Eric Asadoorian via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Where would be a good place to start looking?  Has anyone had such an 
> experience before?  Is there a way to identify more clearly what code is 
> executing when the error appears?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: File Transmission to SFTP Server

2021-06-02 Thread John DeSoi via 4D_Tech
There is no SFTP support in any version of 4D. You have to implement it 
yourself using external tools. I use CURL and LAUNCH EXTERNAL PROCESS. Start 
here for options:

https://discuss.4d.com/search?q=sftp 

John DeSoi, Ph.D.


> On Jun 2, 2021, at 4:18 AM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I would like to ask if there is native support in 4D v17 too send text files 
> from 4D Server (on Windows Server 2012) to an sFTP server?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: PING of life...

2021-01-14 Thread John DeSoi via 4D_Tech
Step 1 is to create an account on the forum if you don't have one. Then login 
and click on your user account icon at the top right. The rightmost icon in 
this popup (looks like a person) is for Preferences. Then click "Preferences" 
in the sublist.

Under Notifications/Categories on the left, select which categories you want to 
watch and which ones to mute. I'm watching Feature Request, Beta, and English 
Community. All the non-English communities are muted.

Then click on Emails on the left. Check the option for "Enable mailing list 
mode".

John DeSoi, Ph.D.


> On Jan 14, 2021, at 11:50 AM, SPC via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> Can anyone add to what John advised regarding having the Discussions and 
> Forum content come to me via e-mail.  I have not received a forum e-mail to 
> reply to.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: PING of life...

2021-01-14 Thread John DeSoi via 4D_Tech
The new forum supports email and it works well. I rarely visit the forum unless 
I want to post something with with code or attachments. Simply reply to the 
forum email to participate in the conversation. This list and the new forum go 
to my same mailbox with no real difference other than [4D Forum] prefixed to 
the subject lines.

When you setup your email options, just choose to follow the English Community 
to avoid seeing messages in other languages.

John DeSoi, Ph.D.


> On Jan 14, 2021, at 9:36 AM, Neil Dennis via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> One think I do like about this group vs the other group is that, with very 
> few exceptions, I can read all of the messages because I can understand the 
> language.
> 
> I only speak two languages, English and Gilbertese… there are no Gilbertese 
> messages. So I spend time on at the other place (not a lot but minutes) every 
> day looking at message to see if I’m interested, the first think I do is try 
> to read them, if they are in English I’m OK, if not it is wasted time.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: Record locking woes

2020-12-09 Thread John DeSoi via 4D_Tech
Are you using LOCKED BY to determine which user/process has the record locked? 
In version 17 through 18R3 I have seen an intermittent bug where Locked returns 
true but LOCKED BY indicates there is no lock. Only one process uses the 
record, so it should not be locked. But I'm only seeing this in single user 
mode, not client/server.

John DeSoi, Ph.D.


> On Dec 8, 2020, at 3:32 PM, Alan Tilson via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Well, going to read-only in the list view didn't change anything...
> But this doesn't happen on all or even most tables...
> Any ideas?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: SFTP & PGP Encryption

2020-10-14 Thread John DeSoi via 4D_Tech
Public keys would need to be exchanged one time. Then the encrypted CSV files 
could be sent. The sender would encrypt the file with the recipient's public 
key.

John DeSoi, Ph.D.


> On Oct 13, 2020, at 11:20 PM, Tarawerkz  wrote:
> 
> Hi John,
> 
> Thanks for the confirmation with regards to SFTP support in 4D.
> Although it’s probably possible to use WinSCP to do this, I have no 
> inclination to manage that on behalf of the client and will leave it to the 
> client’s IT if they insist on that route.
> 
> With public key encryption, it means what we will send over is the encrypted 
> blob and the public key (in lieu of the csv file itself)?
> 
> Regards,
> Ronnie
> Tarawerkz
> 

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: SFTP & PGP Encryption

2020-10-13 Thread John DeSoi via 4D_Tech


> On Oct 13, 2020, at 8:03 PM, Tarawerkz via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 1.  to provide an external facing SFTP through which the enterprise SAP can 
> connect to ?

4D has no direct support for SFTP as a client or a server in the latest 
version. HTTPS is probably the best secure network connectivity option directly 
supported by 4D.

> 
> 2.  to support this connection via PGP encryption (to pick up files which the 
> 4D application will generate in CSV format) ?


4D has support for public key encryption for data which should be sufficient 
for most applications.

https://doc.4d.com/4Dv18R4/4D/18-R4/ENCRYPT-BLOB.301-4982910.en.html

John DeSoi, Ph.D.


**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Drag and drop replacement command(s)?

2020-09-14 Thread John DeSoi via 4D_Tech
As far as I know, _O_DRAG AND DROP PROPERTIES is depreciated but still works in 
the latest version of 4D. Putting this off until 4D removes the command is also 
an option.

John DeSoi, Ph.D.


> On Sep 13, 2020, at 5:35 PM, Keith Goebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Seems we will all have to do a lot of recoding to replace a single very 
> simple command that is no longer available.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: "Optimal" 4D Server hardware

2020-09-11 Thread John DeSoi via 4D_Tech

> On Sep 11, 2020, at 3:38 PM, Randy Kaempen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have a client with about a dozen users and a 230GB data file.  They 
> upgraded their server and we got a top of the line Mac Mini.  Since we expect 
> to use it for a number of years, we got the best processor and maxed out the 
> memory.  You can never have too much memory.  We also got the SSD drive so 
> there won’t be any issues with drives crashing.  

I think SSDs are way more reliable, but I have never heard they are so reliable 
that a second disk is no longer necessary. Any serious database application 
needs to keep the database on a different disk from the backup and journal 
files. I have a similar Mac Mini setup but added the fastest external 
thunderbolt disk I could find for the journal file and backup files.

> 
> I also have clients who use an external SSD drive for their structure and 
> data file.  The thought there is that if there is a problem with the 
> computer, you just replace it with another one and you could get going again 
> without losing or having to move your data.

If you don't really analyze the specs, an external SSD can be a lot slower than 
the Mac built in drive. Important for databases.

John DeSoi, Ph.D.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: Change list values in a listbow coloumn

2020-08-05 Thread John DeSoi via 4D_Tech
Yes, you can get all the forum messages as emails and respond to posts by 
replying to the email. I don't know if there is a way to start a new thread via 
email.

John DeSoi, Ph.D.


> On Aug 5, 2020, at 12:29 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have visited the new forum.
> I have not moved there...
> I have been told - but - have not idea of the functionality - that it is 
> possible to at least receive forum posts via email. I would hope that it is 
> also possible to send them.

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
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: PDF Documentation

2020-07-07 Thread John DeSoi via 4D_Tech
See the download links on the right side of the page to download the HTML 
documentation.

https://doc.4d.com/4Dv18/index.en.html

Note they are FTP links which may not work correctly with all browsers.

John DeSoi, Ph.D.


> On Jul 7, 2020, at 9:55 AM, Dave Tenen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Does anyone know if and where any PDF documentation for version 18 exists?
> 
> If it doesn’t, is there any convenient way to take the html offline?

**
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

form radio buttons broken in project mode

2020-05-04 Thread John DeSoi via 4D_Tech
I just noticed that form radio buttons are no longer handled automatically when 
converting to version 18 project mode. For example, with radio button variables 
r1, r2, r3, the other two radio buttons are unselected when any one is clicked 
on. In version 18 project mode, they all stay highlighted. 

If this was a documented change, I missed it. Fortunately I don't have too many 
forms to fix, but something else to consider in upgrading to project mode.

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: Object notation replacement for use of Self in a script — v18

2020-05-02 Thread John DeSoi via 4D_Tech


> On May 1, 2020, at 1:13 PM, James Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> Here is an idea which seems to work, but needs more evaluation. What if you 
>> named the form object with the property path in the form data? Even if 
>> periods are not allowed (they seem to be), another character could be used. 
>> I think the maximum length of an object name is 255 characters which should 
>> be plenty.
> 
> The problem with this approach, as others have mentioned, is that you can no 
> longer use object name prefixes to show/hide/enable/etc groups of form 
> objects.

I don't see why that is a problem. Just give them a common property in the path 
to group them and use a contains string, e.g. "@.property.@". Or probably 
better and more explicit, just create a collection on the Form for the items in 
the group.

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: Object notation replacement for use of Self in a script — v18

2020-05-01 Thread John DeSoi via 4D_Tech
Here is an idea which seems to work, but needs more evaluation. What if you 
named the form object with the property path in the form data? Even if periods 
are not allowed (they seem to be), another character could be used. I think the 
maximum length of an object name is 255 characters which should be plenty.

Here is an example. I created a form with one in input and the object method 
below. The form object name is "some.property.path" and the expression is 
Form.some.property.path.

Case of 
  : (Form event code=On Load)
Form.some:=New object
Form.some.property:=New object
Form.some.property.path:="TEST 123"

  : (Form event code=On Data Change)
C_TEXT($name)
C_COLLECTION($cPath)
C_OBJECT($object)

$name:=OBJECT Get name(Object current)
$cPath:=Split string($name;".")
$object:=Form
For each ($name;$cPath.slice(0;-1))  //All except last element to get the 
object.
  $object:=$object[$name]
End for each 

$name:=$cPath.pop()
$object[$name]:=Uppercase($object[$name])
End case 

John DeSoi, Ph.D.



> On Apr 30, 2020, at 7:53 PM, Peter Hay via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What we really need is a way to access a Form Object's "Variable or
> Expression".  There's a Command named "Object Get Data Source" which was
> added in v14, but it only returns a Pointer if  "Variable or Expression" is
> a Variable.  If it's an Expression it returns Nil.

**
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: iNUG -Archive

2020-04-29 Thread John DeSoi via 4D_Tech
https://kb.4d.com

There is a button on the right for "iNug Messages".

John DeSoi, Ph.D.


> On Apr 29, 2020, at 7:50 AM, Jörg Knebel via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I used to download all the posts via NNTP from "gmane.comp.lang.inug-4d.tech 
> <http://gmane.comp.lang.inug-4d.tech/>” to archive that stuff locally, but 
> this doesn’t work any more.
> 
> Would someone please be so kind and tell me where I can look up / search the 
> iNug archive(s).

**
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 Server v18.1LTS - Startup Takes 10-15 Minutes

2020-04-10 Thread John DeSoi via 4D_Tech
Sorry if I missed it, but I still did not see in your messages that you 
reproduced the slow startup with conversion on a separate non-VM machine. Also 
wondering if there is any difference between 4D single user and 4D Server. I 
have not used 4D Server to convert structures to project mode.

I regularly convert a 17.4 binary structure to 18 project mode for version 
control. It has over 5000 methods and many hundreds of forms. It only takes a 
few seconds to export to project mode (using 4D single user).

A work-around might be to covert to project mode before moving the structure to 
the VM server.

John DeSoi, Ph.D.


> On Apr 10, 2020, at 9:33 AM, 4dinug via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> FWIW, this a regular server application running in interpreted mode. Nothing 
> terribly unusual about it. Methods and forms number probably in the 1,000 - 
> 1,500 range, with a 1.5 GB data file. It runs absolutely fine in single-user 
> on my desktop PC.
> 
> But, in reply to Keisuke's earlier response, I did as you suggested. And it 
> is is indeed the project database format conversion that is the root of the 
> problem. The same database converted to v18.1 and left in binary format has 
> no performance issues at all.

**
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 Server v18.1LTS - Startup Takes 10-15 Minutes

2020-04-10 Thread John DeSoi via 4D_Tech
Have you tried it using binary mode to see if there is any difference? Is there 
anything unusual about your project, e.g. a really large number of methods or 
forms? You get the same results on different computers? Is it a regular server 
or a merged server application? I assume your application is compiled; if so, 
have you tried to open it with 4D server interpreted?

John DeSoi, Ph.D.


> On Apr 9, 2020, at 11:42 PM, 4dinug via 4D_Tech <4d_tech@lists.4d.com> wrote:
> 
> FWIW, this is a project (i.e., not binary) database. I'm not sure whether 
> that is pertinent to this issue since, as mentioned above, it runs with no 
> delay on 4D single-user.

**
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: New Mail Command 17r6

2020-04-03 Thread John DeSoi via 4D_Tech
It looks like several attachment related bugs have been fixed after 17r6.

https://bugs.4d.fr/fixedbugslist?branch=18_R2

John DeSoi, Ph.D.


> On Apr 3, 2020, at 6:32 AM, UKVetDerm via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> The following code has been working really well, much faster than the old IC 
> methods, but from today the PDFs are arriving corrupted if sent from a MAC 
> client, but not from a PC client. We have not used PC clients before, but 
> because of bandwidth issues I have just set one up as a RDC client for one 
> worker stuck at the end of a very long telephone line in the hills. Has using 
> these commands on the PC inadvertently changed a default on the MAC. We use a 
> MAC server and I am feeling bamboozled. The code is pretty vanilla from the 
> reference. We use default encoding.

**
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: Mac LAUNCH EXTERNAL PROCESS permissions issue

2020-04-03 Thread John DeSoi via 4D_Tech
Same error. Thanks for the idea.

John DeSoi, Ph.D.


> On Apr 2, 2020, at 11:55 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> just guessing, but what if you add /usr/bin/tmutil to full disk access?

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

Mac LAUNCH EXTERNAL PROCESS permissions issue

2020-04-02 Thread John DeSoi via 4D_Tech
I upgraded a single user merged application from 17R6 to 18R2 (project mode). 
It is signed with a developer certificate. I can launch a time machine backup 
with "tmutil startbackup --auto", but if I try to find out when the last backup 
happened using "tmutil latestbackup", I get this error back from LEP:

The operation could not be completed because tmutil could not access
private application data on the backup disk. Use the Privacy tab
in the Security and Privacy preference pane to add Terminal to the
list of applications which can access Application Data.

This was working with 17R6 and macOS 10.14.6. In the Privacy settings, I have 
re-added the 18 version to both the "Full Disk Access" list and the 
"Accessibility" list. There is no "Application Data" in the list of options. 
The command works fine from Terminal.

Ideas?

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: Display entity selection time fields in a list box?

2020-03-27 Thread John DeSoi via 4D_Tech
No, that is a compatibility setting for older 4D versions where time values 
were converted to milliseconds instead of seconds. Hoping some day there will 
be an option to just use time values instead of numbers. That was done for 
dates (instead of strings), seems like it should be possible for time. The type 
conversion rules for objects and collections seem crazy and inconsistent. 

John DeSoi, Ph.D.


> On Mar 27, 2020, at 1:19 PM, kculotta via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Would this affect the display?  
> https://doc.4d.com/4Dv18/4D/18/Database-Parameters.302-4504404.en.html 
> section "Times inside objects "

**
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: Worker and UI

2020-03-27 Thread John DeSoi via 4D_Tech
I don't see why it would not work. I'm not aware of any real difference between 
a worker and a regular 4D process except that a worker has queue of requests 
and lives until killed whereas a regular process executes one request and 
exists.

I tend to use the 4D progress component with some wrappers that allow it to be 
used by any process or worker including hidden and preemptive. It can also 
monitor and cancel jobs executing on the server. A lot of work to set up, but 
usable for almost anything once it is in place.

John DeSoi, Ph.D.


> On Mar 27, 2020, at 11:29 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is there any objection to that method of doing things? The documentation 
> doesn’t suggest that workers can’t have a UI. Maybe I’m stretching the use of 
> a worker process past that which was intended.

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

Display entity selection time fields in a list box?

2020-03-27 Thread John DeSoi via 4D_Tech
I'm replacing some record based list boxes with entity selection list boxes. I 
want to see HH MM SS format which was easy and the default with selection list 
boxes. But since ORDA treats time as a number, the only way I see to do that is 
to wrap the field property path with the Time function, e.g. 
Time(This.time_field). Without that, any time format set with OBJECT SET FORMAT 
just displays the number of seconds.

Is this really the only way to display time fields or have I missed something? 
Seems like a step backwards. I'm using 18.1 Mac.

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: Time to work on this task..

2020-03-24 Thread John DeSoi via 4D_Tech
Hi Nigel,

Do you mean old plugins that store information in resource (rsrc) files? I 
think anything recent uses a JSON file (manifest.json).

John DeSoi, Ph.D.


> On Mar 24, 2020, at 6:08 AM, Nigel Greenlee via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Also..whilst i am at..anyone written anything reliable they would like to 
> share that gets the constants used by plug ins..there are different formats 
> in different plug ins and i would like to get the constants list similar to 
> how i get them for the 4D code.

**
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: gitignore for projects

2020-03-19 Thread John DeSoi via 4D_Tech
Yes, it shows differences in whitespace near comments in the .4DCatalog file.

John DeSoi, Ph.D.


> On Mar 19, 2020, at 12:38 PM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> did you diff the versions to see what changed in the .4dcatalog file?

**
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: gitignore for projects

2020-03-17 Thread John DeSoi via 4D_Tech
I ignore anything in the settings directory, but you could argue against that. 
For example, you might want to track changes in your build settings file.

You can't ignore catalog.4DCatalog if you want to track table and field changes 
to your structure. 

I'm currently exporting structure changes in 4D 17 to a 4D 18 project mode 
branch in catalog.4DCatalog. One frustration is that just opening in 4D 18 
project mode shows changes in catalog.4DCatalog without doing anything. I 
reported this as a bug, but it is apparently not reproducible by anyone else.

John DeSoi, Ph.D.


> On Mar 17, 2020, at 5:13 PM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> any reason to NOT ignore the project/sources/catalog.4dcatalog or the
> settings/directory.json file?  it seems those are regenerated every time
> you do anything in the project.

**
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: Why did 4D kill the Solutions Guide?

2020-03-13 Thread John DeSoi via 4D_Tech
I'm also curious because I previously used the link below to go to the partner 
site and create tech support requests. This seemed like the only avenue to 
report bugs for a non-beta version. Now it just redirects to https://us.4d.com.

http://partnercentral.4d.com/

John DeSoi, Ph.D.


> On Mar 13, 2020, at 6:34 PM, Robert ListMail via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> One of the benefits of being a 4D partner was the ability to be represented 
> in the online solutions guide (previously shown on the 4D web site), when and 
> why did 4D take this away? Enquiring minds want to know!

**
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: [off-ish] v17 or 18 - Exported forms

2020-03-11 Thread John DeSoi via 4D_Tech
Yes, forms are exported in JSON format. In project mode, CSS files are used for 
some of the style information.

Converting a form into something usable by a web browser is certainly possible, 
but it will not be a small or simple project.

John DeSoi, Ph.D.


> On Mar 11, 2020, at 3:22 PM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I have not done ANY work with v18, and only opened v17 once to quickly test 
> an app's compatibility.
> I understand that it is now possible to export forms in a manner which is 
> compatible with a code repository/version control system.
> 
> If this is correct what is the format of the form data?
> I assume it is text, and probably JSON... 
> 
> IF these 2 assumptions are true, is it (reasonable) to parse the son into 
> html for direct rendering in a browser?
> 
> My end quest is to find some sort of functional GUI for form building that I 
> can use for/with React/javascript without having to manually code very F-ing 
> pixel placement.

**
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: Trouble with Comment Blocks v18

2020-03-10 Thread John DeSoi via 4D_Tech
What build version are you using? This was supposed to be fixed after version 
18.246179.

See https://forums.4d.com/Post/EN/33231346/1/33265607 (if you are in the 
partner program).

John DeSoi, Ph.D.


> On Mar 10, 2020, at 3:18 PM, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Yes. Dot notation works fine.

**
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: Trouble with Comment Blocks v18

2020-03-09 Thread John DeSoi via 4D_Tech
I think there was a bug related to this late in the beta cycle. I'm not sure if 
the fix made it in to 18.0. Seems to work fine in 18.0 HF1.

John DeSoi, Ph.D.


> On Mar 9, 2020, at 3:24 PM, Sannyasin Siddhanathaswami via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Aloha,
> 
> I’m having trouble getting the new comment blocks to work in v18. Seems silly 
> simple but doesn’t work:
> 
> /*
> 
> This is a comment
> 
> */
> 
> This gives a syntax error.
> 
> I’m using v18 on Mac OS Catalina, in client server.
> 
> I looked for compatibility settings, and anything useful in the 
> documentation, but all I read says the above should work and be collapsable. 
> What am I missing?

**
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: Convert Object to shared object.

2020-03-05 Thread John DeSoi via 4D_Tech
https://kb.4d.com/assetid=78197

John DeSoi, Ph.D.


> On Mar 5, 2020, at 1:40 PM, Eric Naujock via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Does anyone know of a way to simply convert an object to a shred object. I 
> have tried numerous methods to get this done but I have found that nothing 
> seems to want to allow an easy conversion from a c_object type to a shared 
> object. Though in reality what I really want to do is convert a collection of 
> objects to a shared collection of objects to place in the Storage object. 

**
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: atom/st indent/lex file

2020-02-28 Thread John DeSoi via 4D_Tech
I'm working on something for TextMate and/or BBEdit. I'll post it, hopefully in 
the next week or two.

Note 4D is a lot more difficult to syntax color than other languages because 
you can't disambiguate many tokens without the structure file information. 
Having "code with tokens" helps somewhat, but is harder to read. Even with 
tokens, you have things like $value:=Some_Token. Some_Token could be a process 
variable, method call, or component call. No way to know without the 4D 
structure information.

I don't know what "ST" is.

John DeSoi, Ph.D.


> On Feb 28, 2020, at 9:54 AM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> has anyone generated a grammar/lex/indent file for ST or atom for 4D?

**
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: customize find results

2020-02-28 Thread John DeSoi via 4D_Tech
I'm not aware of any built-in feature to do that. I would export a copy to 4D 
18 project mode and use something like BBEdit or TextMate where you have grep 
and other features.

John DeSoi, Ph.D.


> On Feb 28, 2020, at 9:43 AM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> 4d 17
> is there a way to customize the way objects display in the find results?
> if you do a find in database for some code, you get a list, but the list
> includes things in the format formname.objectname which isn't very
> helpful when objectname is "field2", because that's what 4d named the
> object when the form was created with the form wizard instead of the object
> source, e.g. "address"

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

Re: Printing Excel Document to PDF from 4D - Windows

2020-02-21 Thread John DeSoi via 4D_Tech
The best PDF generation I have found is using Chrome headless via Puppeteer 
(https://developers.google.com/web/tools/puppeteer). For most reports, I 
generate a single source document in HTML that works with web browsers, Excel, 
and PDF. 

Since you are already generating Excel documents, perhaps Excel -> HTML -> 
Puppeteer/PDF might be an option. I guess it all depends on Excel automation 
options. I have not done much on that end other than asking Excel to open HTML 
documents.

Side note: 4D 18 includes some nice Zip commands. If you are willing to slog 
through a lot of details, 4D 18 can create Excel files using the XML and Zip 
commands without any plugins.


John DeSoi, Ph.D.


> On Feb 21, 2020, at 4:18 PM, rooftop99--- via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> From within 4D, programmatically I need to grab an existing Excel document 
> and print it to PDF…  (or “magically" transform it to PDF, if that option is 
> available.)
> 
> We create Excel documents from 4D using Rob Laveaux’s powerful XL Plugin.  We 
> print PDFs in 4D using the plugin:  4D PDF Printer.  We now want to 
> automatically create both Excel and PDFs of the same data using the same 
> format.  Rather than building two processes (forms, methods, etc) to handle 
> each flavor of a report, I would like to create and save the Excel doc first 
> then use that doc to create a PDF…. Anyone doing this or have ideas on how 
> this could be done?  

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

SCAN INDEX broken 18.0 client/server?

2020-02-13 Thread John DeSoi via 4D_Tech
Just started 18.0 client/server testing and was hoping to deploy sooner rather 
than later. But SCAN INDEX seems to be broken returning zero records in 
client/server mode. 

The other thing I'm not seeing is what I need to do with the users and groups 
directory.json for built client/server applications. It works with 4D Server 
from the default location but not a built server (my default user is missing). 
Does it have to be copied somewhere during the build process?

Anyone care to share their experience with 18.0 deployments? I'm especially 
interested in client/server developed with project (source) mode.

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: Component methods not properly recognized in parent database

2020-02-13 Thread John DeSoi via 4D_Tech
What behavior are you expecting? I thought components from the host (even 
interpreted) are read only. 

4D does not do the right thing, but I thought the only thing it should do is 
maybe show the method preview in the explorer. It would be really nice to edit 
the component from the host, but I was not aware that ever worked in any way.


John DeSoi, Ph.D.


> On Feb 13, 2020, at 11:27 AM, Doug Hall via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> While in my main database, when I use a shared method from a component, the
> +K shortcut (Goto Definition) directs me to an object method of
> one of my parent database's input forms. How do I fix this? I've tried
> throwing away structure indexes, with no success. I'm now using v17.3

**
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: New Notarization Issues

2020-02-12 Thread John DeSoi via 4D_Tech
Hi Tim,

Do you mean there is currently a way to use an offscreen web area (without 
creating an invisible form process), or is this something just happening 
internally?

That would be really nice to have in order to take advantage of Javascript 
libraries.

Thanks,

John DeSoi, Ph.D.


> On Feb 12, 2020, at 10:35 AM, Timothy Penner via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I have been informed that 4D is using the web area in more and more parts 
> internally, and with the offscreen web area allowing to execute JavaScript 
> this might increase.

**
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: Google reCaptcha - Verifying a Response in 4D

2020-02-09 Thread John DeSoi via 4D_Tech
I'm not doing this, but maybe the link below has a clue. I don't think 4D has a 
built in URL encoding function, so I would double check to ensure that is 
formatted correctly.

https://stackoverflow.com/questions/52416002/recaptcha-error-codes-missing-input-response-missing-input-secret-when-v

John DeSoi, Ph.D.


> On Feb 9, 2020, at 9:52 PM, Neal Schaefer via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Wondering if anyone has written a form submit method that successfully calls 
> the Google API using HTTP Request to validate a recaptcha response? We'd like 
> to write it in 4D directly (rather than PHP or similar). We can get a 
> response but no matter how we send the parameters (text, object, JSON, 
> encoded, not encoded) - we're getting the following error:
> 
> 
> 
> error-codes": [
>"missing-input-response",
>"missing-input-secret" ]
> 
> The docs are pretty straightforward: 
> https://developers.google.com/recaptcha/docs/verify
> 
> If anyone has been successful doing this  - we'd appreciate any input you 
> might have.

**
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: View Pro - How to protect a sheet

2020-01-30 Thread John DeSoi via 4D_Tech
With 4D 18 zip commands and the XML parser, Excel integration is easier than 
ever. It took very little time to convert CSV only import procedures to also 
support direct from Excel (xlsx) import.

John DeSoi, Ph.D.


> On Jan 30, 2020, at 11:40 AM, Douglas von Roeder via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
>> I'll see if I can figure out in the file structure where the protection
>> info
>> is stored and see if I can do anything with it.  I would rather avoid a
>> separate plugin for this one issue.  View Pro is somewhat surprisingly
>> working very well for what I need.

**
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 Application as a 3-tier System

2020-01-28 Thread John DeSoi via 4D_Tech
NGINX is also a popular option as a load balancer. Free and open source.

https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/

It can also proxy non-http protocols. I wonder if the silly "must be 3 tier" 
requirement could be satisfied by putting NGINX in in between 4D Client and 4D 
Server :).

John DeSoi, Ph.D.


> On Jan 28, 2020, at 4:50 PM, Dennis, Neil via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>>1. What options are available?
>>2. How it works with 4D?
>>3. Has anyone done this as an OEM and what issues/obstacles have you run 
>> into?
>>   4. and so forth...
> 
> ... As was said before a load balancer... it is a device that is put in front 
> of a pool of machines. It balances the load between applications:
> 
> https://www.f5.com/services/resources/glossary/load-balancer
> 
> 1 - There are many different types and prices for load balancers
> 2 - They work with 4D by same as other web servers, they route requests 
> between servers... each 4D client would be a pool member.
> 3 - Yes
> 4 - Not really much more to say... load balancers can be configured in a 
> round robin type setup or keep persistence for a user so they follow the same 
> path.

**
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: Dates and 4 digit years.

2020-01-18 Thread John DeSoi via 4D_Tech
Does your query look like this

QUERY([Table];[Table]Date_Field<=!1919-12-31!)

or this

QUERY([Table];[Table]Date_Field<="12/31/19")


Using a string can cause issues with date interpretation. If you are showing 4 
digit years and you query using a date constant and get the wrong results, 
maybe check your data file in MSC.

John DeSoi, Ph.D.



> On Jan 18, 2020, at 8:13 AM, Eric Naujock  wrote:
> 
> I am actually searching against a date field. Using the query function. This 
> is causing the dates before 1920 to not show up. I wound up finding them by 
> splitting the dates up into components and then querying against the integer 
> components. 

**
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: Dates and 4 digit years.

2020-01-17 Thread John DeSoi via 4D_Tech
I don't see how the pivot year could have anything to do with it - that just 
controls data entry when two digit years are entered.

I don't have 17R5, but I don't see any problems with 17.3 or 18.0.

Are you searching with date constants or using a string?

John DeSoi, Ph.D.


> On Jan 17, 2020, at 3:33 PM, Eric Naujock via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am running with 4d V17R5 and am seeing some odd date behaviors. When I 
> search for a record with a date prior to 1921 I get all records in the 
> database. Though most of the records are have dates newer than 1985. This is 
> rather odd. I am not sure if this is due to 4D playing games with the pivot 
> year that

**
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: problems with SSL cert/SOLVED

2020-01-10 Thread John DeSoi via 4D_Tech
Glad to hear you solved it. 

The initial setup can be a bit complex, but I highly recommend automating the 
whole SSL certificate thing with Let's Encrypt. The certificate cost goes to 
zero and you never have to worry about it again unless your logging script says 
you have an issue. It automatically renews every few months and I have seen 
zero issues since setting it up about a year and a half ago.

There is a 4D tech note about it in the link below. Or you can just script it 
with Mac or Windows OS tools.

https://kb.4d.com/assetid=77671


John DeSoi, Ph.D.


> On Jan 9, 2020, at 11:58 PM, Rebecca Bryant via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Tada! The URL now resolves to the login page using the new cert.pem and
> key.pem files. I'll check in on it periodically to make sure all is well.

**
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: problems with SSL cert

2020-01-09 Thread John DeSoi via 4D_Tech

> On Jan 9, 2020, at 8:14 AM, Rebecca Bryant via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> When I
> try to start the app I get an error on the first line of the startup
> routine; it lists the 'key.pem' file with the error 'Access denied'. 

Compare the file permissions on the old key to the new key and make sure they 
are the same. Not sure about Windows, but with Linux things sometimes fail if 
file access is too permissive. Keys should generally be user only access but 
maybe that is not the case here to run as a service.

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: HTTP Upload file size too low

2020-01-09 Thread John DeSoi via 4D_Tech
This is what I was trying to get at a few messages ago. Maybe WEB GET BODY PART 
does support chunked encoding, but that is irrelevant if the client side does 
not support it. As best I can tell from Jim's description is he is using a 
standard HTML multipart form with a file input. Javascript is not involved, so 
having this work depends on the browser's support for switching to chunked 
encoding. I don't know if web browsers directly support it or if there is some 
magic you can add to the form to request it. If not, there seem to be plenty of 
Javascript libraries that can do it. So then the task becomes redoing the form 
with the Javascript library instead of relying on the standard HTML form 
implementation.

I found this Javascript example, which looks simple to implement.

https://gist.github.com/shiawuen/1534477


John DeSoi, Ph.D.


> On Jan 9, 2020, at 3:38 AM, Epperlein, Lutz (agendo) via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I'm not sure if I understand your environment in which you would do that file 
> upload. As I mentioned before, I did some little testing with chunked uploads 
> using a web browser as a client and there a javascript library. At the server 
> side I use WEB GET BODY PART in conjunction with WEB Get body part count. I 
> was able to upload file up to 4 GB.
> 
> It looks really simple:
> 
>   For ($index;1;WEB Get body part count)
>   
>   WEB GET BODY PART($index;$MimeBody;$name;$mimeType;$filename)
>   
>   // do something with the chunk received in $MimeBody
> 
>   End for
> 
> If you use another client than a web browser you have to mimic the 
> appropriate request. Using 4D as a client shouldn't be a problem. Simply use 
> HTTP Request and build appropriate headers and body. 

**
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: HTTP Upload file size too low

2020-01-08 Thread John DeSoi via 4D_Tech

> On Jan 8, 2020, at 4:15 PM, Jim Labos - infobase via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> No I am using just plain File object to send file. On the 4D side I use WEB
> Get body part count and WEB GET BODY PART. No chunking that I know of unless
> 4D is doing itself (which by the way I don't know why they didn't implement
> that themselves since they give us a 2GB limit).

The client and the server have to agree on sending with the chunked protocol. 
This is obviously not supported by WEB GET BODY PART. That means you would have 
to code the transfer yourself using WEB GET HTTP BODY (using chunked encoding) 
and then you will have to parse the multi-part form yourself because you can't 
use WEB GET BODY PART.

I did something like this aeons ago using ITK before 4D's web server was 
implemented. Even if I could find the code, I don't think it would be much help.

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: HTTP Upload file size too low

2020-01-08 Thread John DeSoi via 4D_Tech

> On Jan 8, 2020, at 3:03 PM, Jim Labos - infobase via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> The only way to upload consistently without getting any errors supposedly is
> to do it in chunks. I am trying to find a way to do that. So far I could not
> find any code examples.

What client software is sending the response to 4D? Have you verified that it 
is (or can be configured to) send a chunked response? If you are using a HTML 
form with a standard file input, I could not find any evidence that it would 
automatically do chunking. Perhaps it does if the right headers are exchanged. 
I suggest answering this question before spending time trying to write server 
code to accept the chunked response.

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: gitignore for projects

2020-01-06 Thread John DeSoi via 4D_Tech


> On Jan 6, 2020, at 12:13 PM, Tom Benedict  wrote:
> 
> Just to clarify, you’re talking about the “Comments” page in the Explorer, 
> not inline comments in code, right? It’s been a few months, but when I 
> exported the structure in 17R4 inline comments were preserved.

Yes, comments in the source code are preserved. Explorer comments page does not 
work in project mode, also the commands METHOD GET COMMENTS and METHOD SET 
COMMENTS do not work.


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: gitignore for projects

2020-01-06 Thread John DeSoi via 4D_Tech


> On Jan 6, 2020, at 9:38 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>  So inside of this folder I exclude the Preferences,
> userPreferences and Logs. Here's a recent one:


That's another 4D 18 upgrade issue. 4D 18 renames Preferences to Settings and 
rewrites various settings files. If you want to develop with 17 and 18 in the 
same database folder, create a symlink between Settings and Preferences.

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: gitignore for projects

2020-01-06 Thread John DeSoi via 4D_Tech


> On Jan 6, 2020, at 8:48 AM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> @Tom - I get an error for 3d buttons, too "3D button style is not
> supported."  I was thinking of writing a quick tool to fix all the button
> types, since parsing and editing the JSON should be straightforward, but
> what I might do instead is farm this out to the people who are patiently
> waiting for the RFQ on this project

Right after the export from binary mode to project format is a good place to 
implement automated fixes for testing in 4D 18. For example, I wrote a script 
to rename all the relations in catalog.4DCatalog to make it more usable for 
ORDA in 4D 18.


> @John - method comments are gone - does that mean that they aren't even
> exported when the project is created?

Completely gone and not exported in project mode as far as I can tell.

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: gitignore for projects

2020-01-06 Thread John DeSoi via 4D_Tech
Hi Jeremy,

One I used to use (GitX, I think) would sometimes take forever or spin the 
beach ball of death for large commits. I'm now using Fork (which I really 
like). Sometimes I get various commit or other operation errors. No problems 
from the command line.

Here is another issue to watch out for with 4D/Git. In 4D you can globally 
rename a method changing only the case and not the spelling. Even if 4D changes 
the method name on disk, git remembers the case of first commit. It is not seen 
as a change because by default on Mac and Windows file names are not case 
sensitive. So if you switch branches, git checks out the file name using 
whatever case you used initially. This cases 4D to tokenize the name 
incorrectly in method callers.

To solve this, you need to use git mv to tell git to use to updated name case 
when you rename methods without changing the spelling.

John DeSoi, Ph.D.


> On Jan 6, 2020, at 7:28 AM, Jeremy French  wrote:
> 
> What type of issues have you found using a GIT GUI tool?

**
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: gitignore for projects

2020-01-05 Thread John DeSoi via 4D_Tech
Hi Jim,

> On Jan 5, 2020, at 7:31 AM, Jim Crate via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
>> In this model, I'm only making structure and form changes in the 17 master 
>> branch. Methods can be changed in both branches.
> 
> Are there any problems with functionalities can’t be used in v18 project mode 
> that don’t have replacements in v17.3 (not R-series)? I’ve seen mentions of 
> users/groups changes in particular but I haven’t investigated the details yet.

Yes, there are a number of differences not only between 17.3 and 18 project 
mode, but between 18.4db and 18 project mode. For example, the picture library 
does not exist in project mode. Method comments are gone in project mode. I 
minimally use users/groups, but that is different also.

One problem I reported is the 4D structure catalog exported from the v18.4db is 
modified just by opening it in 18 project mode. Seems to have something to do 
with tips or comments associated with fields. For now I have to remember to 
discard catalog.4DCatalog changes before I commit branch 18 changes.

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: gitignore for projects

2020-01-05 Thread John DeSoi via 4D_Tech
Hi Tom,

> On Jan 4, 2020, at 10:13 PM, Tom Benedict  wrote:
> 
> How large is your structure? I ask, because our structure has around a 
> million lines of code and probably 15,000 forms and when I’ve tried exporting 
> under 17r5 it takes many minutes.

Roughly 150,000 lines of source code and probably about 300 or so forms.

A lot has happened between 17r5 and 18, so it might be worth trying again. 
Also, the Export structure command gives you a lot of control over how 
exporting is done. It would be worth it for you to test various aspects 
independently and see what the bottleneck is and report back to 4D. 

At the end of this message I have included the export script I'm using. When 
the temporary 17 copy is converted to 18, this method is executed with PROCESS 
4D TAGS to export the structure for the master branch version control.


> Also, my attempt at setting up a git repository ran into similar performance 
> issues, only hours instead of minutes. I lost interest at that point. 

Is this with git directly from the command line or using a GUI tool? I have 
seen many performance and other issues using a GUI tool that go away when I 
execute the same operations from the command line.


> 
>> You can continue to make version 17 changes, export, and then merge into 
>> your 18 branch. At some point in the future, all your conversion issues will 
>> be resolved and you can promote the 18 branch as master and deploy with 4D 
>> 18.
> 
> This sounds almost like magic. When you “merge” how do you know what code 
> takes priority? Do you have to examine each method and form? 

Merging is why you use git for this task. It automatically identifies any 
conflicting changes between the branches and allows you to decide what to keep. 
I'm doing maintenance/bug fixes in 17 and new features in version 18. There are 
rarely any merge conflicts. If you modify the same methods in both branches, 
you'll spend a lot more time dealing with merge conflicts.


> BTW, did you have prior experience with git? I’m asking because my past 
> attempts to get a conceptual understanding of git and version control have 
> had limited success. I found the concepts and terminology overwhelming and 
> couldn't map the git workflow to my 4D workflow at all. I’m looking forward 
> to more posts like yours which provides ‘just enough’ git to get started.


I have been using git with 4D since 2014 and with other environments for much 
longer. With 4D it has been mostly for version management and change tracking. 
4D 18 changes things and makes development like the rest of the world; you can 
manage multiple branches and integrate work from multiple (remote) developers.

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: gitignore for projects

2020-01-04 Thread John DeSoi via 4D_Tech
Hi Jeremy,


> On Jan 4, 2020, at 1:53 PM, Jeremy French  wrote:
> 
> Did you create the v17 Master Branch by:
> 
> 1) Open a copy of the v17 structure and then open the copy in v18 to convert 
> v17 to v18; and
> 2) Commit the conversion to v18 as the v17 Master branch; and
> 3) Create a new branch (off Master) as v18.
> 
> The above was done only once.

Conceptually, that is the best way to think about it. After the first 
conversion you have a "master" branch which is the 4D 17 version converted to 
18. Initially, the "18" branch is exactly the same.

Then I can switch to the 18 branch and work on new features that use new 
commands and functions added in 4D 18.

>> 
>> When I want to commit a new version I have a 4D method that copies the 
>> structure, opens it in 4D 18, and then exports the structure in project mode 
>> format.
> 
> Are you doing this workflow to continue development in v17?

Yes. Switch back to the 17 "master" branch. Verify there are no uncommitted 
changes in the Project folder (git status called from 4D). Move the Project 
folder to the trash. Run the 17 to 18 script again and generate a new Project 
folder with the current source. Commit as the new "master" branch. Merge (or 
fast forward) the master branch into the 18 branch to keep it up to date with 
the changes in 4D 17.

In this model, I'm only making structure and form changes in the 17 master 
branch. Methods can be changed in both branches.


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: gitignore for projects

2020-01-04 Thread John DeSoi via 4D_Tech
You can keep your project in binary mode (even keep it in version 17) and still 
take advantage of version 18, project mode, and git. Here is what I'm doing.

 "Master" branch is version 17. When I want to commit a new version I have a 4D 
method that copies the structure, opens it in 4D 18, and then exports the 
structure in project mode format. This can be completely automated and only 
takes a few seconds.

Now that you have a master branch, you can create a version 18 branch for 
implementing next version features that take advantage of new 4D 18 
capabilities. Just open your source directly in version 18 project mode. You 
can test the conversion and have both 17 and 18 versions open at the same time 
as long as you have separate data files.

You can continue to make version 17 changes, export, and then merge into your 
18 branch. At some point in the future, all your conversion issues will be 
resolved and you can promote the 18 branch as master and deploy with 4D 18.

John DeSoi, Ph.D.


 
> On Jan 3, 2020, at 5:17 PM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This is a great discussion of best practices and guidelines for 4D Projects 
> and I hope others chime in. It’s a new world for many of us. I would like to 
> start using Project Mode, but our apps have hundreds (maybe thousands) of 
> highlight buttons, which are incompatible. If anyone has built an automated 
> or even semi-automated way to convert highlight buttons to 3D buttons, I’d 
> love to hear about 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: Object from row in selection listbox

2020-01-02 Thread John DeSoi via 4D_Tech
Hi Jeremy,

I don't think there is a way to do that without using GOTO RECORD. ORDA does 
not use record numbers, you need the primary key to do a direct entity lookup 
(dataClass.get).

John DeSoi, Ph.D.


> On Jan 2, 2020, at 12:27 PM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> It works very nicely, John, so thanks again.
> 
> One further question: if I know a record’s record number, how do I use ORDA 
> to create an entity containing that record (more or less the equivalent of 
> GOTO RECORD)?
> 
> I’m finding ORDA quite exciting, but it’s tricky (for me, anyway) to do some 
> things which have become second-nature under the “old” approach.

**
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: Object from row in selection listbox

2019-12-28 Thread John DeSoi via 4D_Tech
By "selection based listbox" I assume you mean traditional record selection 
listbox and not an entity selection/collection listbox. I have not tested this, 
but I think it will work without changing the highlighted records or scroll 
position.

COPY SET("UserSet";"MySet")
CUT NAMED SELECTION([Table];"CurrentSelection")
USE SET("MySet")
$entitySelection:=Create entity selection([Table])
USE NAMED SELECTION("CurrentSelection")
COPY SET("MySet";"UserSet")

Since it is not possible to pass an entity selection from one process to 
another, it would be really nice if 4D provided direct commands to convert sets 
and named selections into entity selections.

John DeSoi, Ph.D.


> On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I have a selection-based listbox. I’d like to make an entity selection from 
> the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so 
> I'probably missing something obvious.

**
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: High Sierra or Mojave?

2019-12-10 Thread John DeSoi via 4D_Tech
Mohave works fine with 4D 17 including Mac Mini configurations older than 2014. 
Catalina will be another story...

John DeSoi, Ph.D.



> On Dec 10, 2019, at 5:14 PM, Doug Hall via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I'm upgrading my 4D structure from 4D v15 to v17, to gain 64 bit
> compatibility on the client side with new Apple hardware. Question: Should
> I upgrade a late 2014 Mac Mini w/16GB Ram, running Sierra (10.12.6) to High
> Sierra or Mojave? I'm also using Homebrew on a Web Client machine I'm
> using, that shares the same specs as this 4D Server machine. I want to stay
> relatively close to the latest OS, but I'm a bit weary of the security
> measures Apple is imposing on Mojave/Catalina.

**
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: The future of output forms

2019-12-10 Thread John DeSoi via 4D_Tech
Hi Rudy,

Here is some code to get you started. It uses a table with a single indexed 
boolean field to quickly generate any size selection you need to manage 
scrolling. I used this technique with list boxes before it was possible to use 
collections to manage scrolling.


C_LONGINT($1;$count)

C_LONGINT($new)

$count:=$1

$new:=Records in table([LB_Selection])-$count
If ($new<0)
$new:=Abs($new)
ARRAY BOOLEAN($aIndex;$new)
If (Records in selection([LB_Selection])>0)
REDUCE SELECTION([LB_Selection];0)
End if 
ARRAY TO SELECTION($aIndex;[LB_Selection]Index)
End if 

SCAN INDEX([LB_Selection]Index;$count;>)
GOTO SELECTED RECORD([LB_Selection];1)


> On Dec 10, 2019, at 7:44 AM, Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> 
> Hi John,
> 
> That is a very clever solution!
> 
> Thanks, I wouldn’t have thought of that!
> 

**
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: The future of output forms

2019-12-09 Thread John DeSoi via 4D_Tech


> On Dec 9, 2019, at 4:34 PM, Two Way Communications via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> But this brings me to this question: Will output forms keep being supported 
> by 4D?

I doubt they will be depreciated. The same implementation model is used for 
print forms, and it would not make sense to break something that big with 
nothing to replace it.

> 
> What if I switch to ORDA? From what I see, output forms will not work with 
> ORDA. (Anybody from 4D: what is 4D’s view on this?)

With some work, you could make output forms work with ORDA. Just create a 
single field table and generate a selection the same size as your ORDA entity 
selection. You can then use Selected record number (or Displayed line number) 
to load entities.

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: How to Modify a column using SQL

2019-12-04 Thread John DeSoi via 4D_Tech
Untested, but with version 18 in source mode you could modify 
Project/Sources/catalog.4DCatalog.

John DeSoi, Ph.D.


> On Dec 4, 2019, at 2:42 PM, Jim Labos - infobase via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> No I meant the field definition as in the original post. I cannot alter the
> field type etc.. That part of SQL does not work in 4D but I was wondering if
> that had changed for v17 or even will for v18.
> 
> From the looks of things it doesn't look like it has or will.

**
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: CURL SFTP issues with SSH

2019-11-21 Thread John DeSoi via 4D_Tech
I had the same situation recently, everything worked with a SFTP client or SFTP 
from the command line. I could not get it to work using curl and --key options 
(curl 7.64.0 (x86_64-apple-darwin18.2.0) libcurl/7.64.0 SecureTransport 
zlib/1.2.11 libssh2/1.8.0). I finally just gave up and switched to using the 
built in SFTP on the Mac.


> * SSH public key authentication failed: Invalid key data, not base64 encoded
> * Failure connecting to agent
> * Authentication failure
> * Closing connection 0
> curl: (67) Authentication failure
> 
> 
> I've obfuscated some of the details, but you get the idea.
> 
> The main problem seems to be that CURL thinks the Public Key should be
> Base64 encoded.  I'm pretty sure that it is.  It looks like this;

You might also look at the private key. I think the error line above is telling 
you generally "public key authentication" failed, and is not specifically 
referring to your SSH_Public.key file. You probably need to convert the ppk 
file for OpenSSH somehow.


John DeSoi, Ph.D.


> On Nov 21, 2019, at 2:44 PM, Peter Hay via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> As I said, FileZilla works fine with all of this.
> 
> Does anyone have any idea what the issue may be?

**
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: Authorize.net integration?

2019-11-20 Thread John DeSoi via 4D_Tech


> On Nov 20, 2019, at 2:35 PM, Joe Dombroski via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> thanks.  I will take a look. I was curious about creating an embedded link
> with 4D that has the billing information.

That looks like this API:

https://developer.authorize.net/api/reference/features/accept_hosted.html

I have not used that one, only the direct access API's via HTTP. At first 
glance, doing it that way seems more complicated because you don't have full 
control of the transaction.

Be sure to note their XML APIs depend on the elements being in a specific 
order. I have never seen that before and it took a while to figure out why 
things were not working.

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: Procedural printing HTML or a WebArea

2019-11-03 Thread John DeSoi via 4D_Tech
I'm not aware of a way to do that in native 4D. I use Node with Puppeteer and 
headless Chrome. This provides a way to specify parameters such as headers, 
footers, and orientation. I have it setup to run on the server and clients can 
call a server procedure to convert HTML to PDF. Very fast and reliable.

John DeSoi, Ph.D.


> On Nov 3, 2019, at 10:03 AM, Mitchell Shiller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Hi,
> 
> I generate an HTML document that is displayed in a WebArea.
> Once completed, I need to generate a PDF procedurally. (No user interaction)
> 
> Is there a way to either
> 1) print out a Web Area ( the contents could be more than 1 page long)
> 2) convert the HTML to a PDF.
> 
> I am on Mac. 4Dv17R5.
> 
> Thanks.
> 
> Mitch

**
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: Determining object content types

2019-10-21 Thread John DeSoi via 4D_Tech
You can't determine the type of the array. I think you can load any type into a 
text array, but then you would have to convert it. The best option for internal 
use is to include a property that indicates the type, i.e. use "type" and 
"value" pairs.

John DeSoi, Ph.D.



> On Oct 21, 2019, at 11:27 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> However, a longint array is NOT an object array, and vise verse.
> So how do you determine the type of an array inside an object?

**
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: HTTP Request and x-www-form-urlencoded

2019-10-12 Thread John DeSoi via 4D_Tech
No easy way in 4D because there is no built in function to do url encoding. See 
feature request at the link below along with some code to implement it.

https://forums.4d.com/Post/EN/17578327/1/17591881

John DeSoi, Ph.D.



> On Oct 12, 2019, at 1:54 PM, Tom Benedict via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I’ve successfully tested the REST service using Postman and I can copy the 
> encoded URL from Postman and send it successfully from 4D HTTP Request 
> instead or JSON. So I just need to build the encoded URL on the 4D side. It’s 
> tedious to do though, and I think it’s convenient to use an object on the 4D 
> side to manage the key value pairs. So I’m wondering is there an ‘easy’ way 
> to convert a JSON object into an encoded URL?

**
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: HIDE MENU BAR in On Startup database method

2019-10-12 Thread John DeSoi via 4D_Tech
Are you a partner? If so, I would test it with the latest beta and report it 
directly on the forum if it is still not fixed in 17R6.

Otherwise, the only "voting" I'm aware of is for feature requests on the 4D 
forum.

John DeSoi, Ph.D.


> On Oct 12, 2019, at 1:25 AM, Piotr Chabot Stadhouders 
>  wrote:
> 
> Thanks for the update!
> So the bug has been reported a while ago
> 
> Do you know there is a way to vote for this bug to be solved?

**
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: HIDE MENU BAR in On Startup database method

2019-10-11 Thread John DeSoi via 4D_Tech
Reported as a bug in January 2018 - ACI0097822.

John DeSoi, Ph.D.


> On Oct 11, 2019, at 8:24 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> When starting an 64-bit Engined Application, the 4D menu bar is visible for a 
> moment, even while I call HIDE MENU BAR in the On Startup database method
> I am talking about the menu:
> File|Edit|Run|Design|Records|Tools|Windows|Help
> 
> I don’t want that users see (and click) on this menu bar, so I call HIDE MENU 
> BAR in the On Startup database method
> As far as I know this does work I 4D 32-bit version
> 
> Can anybody confirm this?
> 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: 4D Server Hosting - The Future ?

2019-10-10 Thread John DeSoi via 4D_Tech
I don't see how "cloud" hosting can be the future of 4D when LAN execution is 
great but WAN execution is horribly slow for the same application. Yes, you can 
rewrite in various ways (harder to write, understand, and maintain) but it is 
not an easy task.

John DeSoi, Ph.D.


> On Oct 10, 2019, at 6:24 AM, Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> CONCLUSON
> I now realise that the “WAN” / “LAN” distinction is disappearing. He said the 
> only reason the “cloud” solution wasn’t hosted off-site was that they had 
> measured the bandwidth that the customer used and calculated that the cost 
> would be astronomical if it was on AWS or something like that, but in all 
> other respects it was a cloud solution.

**
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 v17 Property List Issues - is this only me?

2019-10-01 Thread John DeSoi via 4D_Tech
I think the fastest way to a resolution would be to verify you have the same 
problem in 17R6 beta. If it is fixed, likely nothing will be done about it in 
R5. If it is not fixed, you can file a bug report directly on the forum.

John DeSoi, Ph.D.


> On Oct 1, 2019, at 10:44 AM, Daniel Solenthaler via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> In 4D v17R5 I click onto a cell of the property list and nothing happens. It 
> takes 3 seconds and a „slow double click“ to highlight the cell content.
> 

**
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: [repost - desperate]What runs before ON STARTUP?

2019-10-01 Thread John DeSoi via 4D_Tech
On Host Database Event database method? See the Security tab in the database 
settings to disable it.

https://doc.4d.com/4Dv15/4D/15.6/On-Host-Database-Event-database-method.301-3818546.en.html

John DeSoi, Ph.D.


> On Oct 1, 2019, at 9:16 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What code could be running?

**
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: HTTP AUTHENTICATE - how to know if the authentification worked

2019-09-30 Thread John DeSoi via 4D_Tech
Hi Paul,

Start here and see the linked RFCs.

https://en.wikipedia.org/wiki/Digest_access_authentication

I probably have some old code somewhere that implemented this, I'll see if I 
can dig it up and send it to you.

John DeSoi, Ph.D.



> On Sep 29, 2019, at 11:42 AM, Paul Lovejoy  wrote:
> 
> Hi John,
> 
> Thanks for your input. I wouldn’t know where to begin creating the 
> authentication digest myself. Can you point me somewhere?
> 
> Cheers,
> 
> Paul
> 
> 

**
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: HTTP AUTHENTICATE - how to know if the authentification worked

2019-09-27 Thread John DeSoi via 4D_Tech
Using a HTTP tracing tool where you could see all of the request/response 
values with headers might provide useful clues. My other idea would be to drop 
HTTP AUTHENTICATE and just build the authentication digest headers yourself.

John DeSoi, Ph.D.


> On Sep 27, 2019, at 12:47 PM, Paul Lovejoy  wrote:
> 
> Thanks for your feedback. I’m passing “2” in the extra parameter. The 
> following HTTP get() is returning an error -9935, badly formed XML. The HTTP 
> get is supposed to be retrieving XML, actually. So the error is not totally 
> off base. But I would prefer to know that authentification failed, not the 
> HTTP get()

**
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: HTTP AUTHENTICATE - how to know if the authentification worked

2019-09-27 Thread John DeSoi via 4D_Tech
The documentation says:

> If you omit the authMethod parameter (or pass 0), you let the program choose 
> the appropriate method to use. In this case, 4D sends an additional request 
> in order to negotiate the authentication method.

Are you omitting the authMethod parameter? If so, I suspect the error is 
happening in the "additional request". If you provide that, then HTTP Get 
should return the right HTTP error code. Hopefully you know ahead of time what 
method to use and this is better because you omit the extra request and should 
get any error code directly from the site.

John DeSoi, Ph.D.



> On Sep 27, 2019, at 11:07 AM, Paul Lovejoy via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I’m using HTTP AUTHENTICATE to authenticate connections to a web server. The 
> call to authenticate is immediately followed by a HTTP get(). The HTTP get 
> occasionally fails and I’ve been able to trace this to a failed HTTP 
> AUTHENTICATE, which appears to be an error from the website. However, it 
> appears there’s no way to know the authentification succeeded or failed. 
> There is no return code and OK doesn’t get set either. So I get various 
> errors such as -9935 from the subsequent call to HTTP get(), which isn’t very 
> helpful.

**
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: Silent Failure when Constructing an Object

2019-09-20 Thread John DeSoi via 4D_Tech
Yes, for a certain class of errors, 4D sends a HTTP 500 error response and a 
HTML body with the error information. You should try your test locally to 
verify.

Of course, you should have a error handler and be able to capture any error and 
log it if you are using the HTTP server. Unfortunately, there are several types 
of pointer errors that 4D's error handler won't capture even if you have an 
error handler. Instead 4D shows a dialog with "Continue" and "Abort" buttons on 
the web server or to the end user if not a web process. I'm not sure which is 
worse. But with the web server, the process is stuck until someone comes along 
and presses the button.

John DeSoi, Ph.D.


> On Sep 20, 2019, at 3:18 PM, Narinder Chandi via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Possibly the error is returned to the client making the request but in my 
> case it's an external service making the request and I can't see the response 
> the service receives other than the fact it appears to fail.

**
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: V16 Server Issue

2019-09-12 Thread John DeSoi via 4D_Tech
This happened to me also with version 16.3, 64-bit Mac. I gave up on the 
built-in scheduler and implemented my own to have more control and better error 
reporting. 

There were a number of reported issues with version 16 where delayed processes 
would become "stuck" and never continue. I would suggest upgrading to 16.4 
which I believe had a bug fix for this issue. Not sure if it is related to the 
backup problem or not.

John DeSoi, Ph.D.


> On Sep 12, 2019, at 12:13 PM, Stephen J. Orth via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Has anyone seen anything like this?  Why/how would a client connection cause
> the system to freeze and prevent it from backing up for 6 days?

**
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: Paypal IPN Integration

2019-09-03 Thread John DeSoi via 4D_Tech
Sam,

See this in the documentation:

https://doc.4d.com/4Dv17/4D/17.2/Executing-PHP-scripts-in-4D.300-4386504.en.html#187748

Are you using Mac or Windows? If Mac, the built in PHP might have a version of 
CURL that is recent enough.

You might also consider using a NodeJS library instead of PHP. NodeJS has a 
simple installer for Mac and Windows. It is straightforward to make a local 
HTTP call to take advantage of NodeJS libraries.


John DeSoi, Ph.D.

> On Sep 3, 2019, at 7:25 PM, Sam Burnell via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Any suggestions on where I would find that binary, and also how I would then 
> get a php file (with cURL functions) to execute from inside the listener 
> (OWC) without using PHP Execute?
> 
> In other words, how to bypass using 4D’s php interpreter and use the one 
> exterior to 4D?

**
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: Regex expert needed??

2019-08-24 Thread John DeSoi via 4D_Tech
See 

https://en.wikipedia.org/wiki/Longest_common_substring_problem

John DeSoi, Ph.D.


> On Aug 24, 2019, at 10:48 AM, Keith Culotta via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> This version stands alone, and runs a little more efficiently.  It's not been 
> tested in every way, but the results are encouraging.  Interesting problem.  
> I can't think of a way to do it without comparing every character 
> combination.  The new "Split string" command would speed part of this up if 
> Collections could be used.

**
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: _ as first character in Method Name [was 64 bit...]

2019-08-19 Thread John DeSoi via 4D_Tech
Why is 64 bit 4D not going to like it? Spaces are still allowed in method names.

You could also use animal__Module_Info (2 underscores) to keep it at the top.

John DeSoi, Ph.D.


> On Aug 19, 2019, at 10:38 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This causes the 'module headers' to float to the top of the module 
> method list.
> ex:
> animal Module_Info
> animal_a
> animal_b
> 
> 
> Again, 64 bit 4D is not going to like this.  Ideas to solve this, or do 
> I just forego the ' module headers'?

**
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: Sequential search of indexed field

2019-08-15 Thread John DeSoi via 4D_Tech
Seems way off. Are the values unique or clustered around a few values?

I'm seeing a few milliseconds to search 46 million records with a unique index 
value.

Have you tried DESCRIBE QUERY EXECUTION?

John DeSoi, Ph.D.

> On Aug 15, 2019, at 2:26 PM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> There are a lot of records in the table (about 1.3 million).
> 
> Does this seem right? 70 seconds is a long time :) And why does it say it's
> doing a *sequential* search?

**
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: Confused array type in an object

2019-08-09 Thread John DeSoi via 4D_Tech

> OB Get Array($ObjData;$attributeName;$aTextarray) //Where $aTextarray is an 
> Array of type text
> 
> This indeed gets the values from the object..which would be absolutely 
> fine(and a work around might be to get both, as neither error, and then look 
> at whether the values in the object array are null and if they are then its 
> an array of values).
> 
> So my question is this. What is a better way to find out what the type of 
> data in the attribute is? What am I missing in my understanding of the 
> structure of an/this object.

It is the only way to do it in version 16 because all elements for the array 
must have the same type (unlike v17 collections). Once you have the text you 
can use JSON Parse to work out individual elements.

> 
> OB Get type returns 42(matching the attribute type of course!). It feels like 
> the attribute is Shrodingers Cat- existing as a collection of cats and not a 
> collection of cats at the same time. 

Be careful that 4D 16 and 17 use different constants for the same object 
property. 17 will use 42 = Is collection, whereas 16 says 39 = Object array.

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: Prevent Client from Sleeping

2019-08-07 Thread John DeSoi via 4D_Tech
On the Mac you can use "caffeinate" via LEP.


NAME
 caffeinate -- prevent the system from sleeping on behalf of a utility

SYNOPSIS
 caffeinate [-disu] [-t timeout] [-w pid] [utility arguments...]

DESCRIPTION
 caffeinate creates assertions to alter system sleep behavior.  If no 
assertion flags are specified, caffeinate creates an assertion to prevent idle 
sleep.
 If a utility is specified, caffeinate creates the assertions on the 
utility's behalf, and those assertions will persist for the duration of the 
utility's
 execution. Otherwise, caffeinate creates the assertions directly, and 
those assertions will persist until caffeinate exits.

 Available options:

 -d  Create an assertion to prevent the display from sleeping.

 -i  Create an assertion to prevent the system from idle sleeping.

 -m  Create an assertion to prevent the disk from idle sleeping.

 -s  Create an assertion to prevent the system from sleeping. This 
assertion is valid only when system is running on AC power.

 -u  Create an assertion to declare that user is active. If the display 
is off, this option turns the display on and prevents the display from going 
into
 idle sleep. If a timeout is not specified with '-t' option, then 
this assertion is taken with a default of 5 second timeout.

 -t  Specifies the timeout value in seconds for which this assertion 
has to be valid. The assertion is dropped after the specified timeout. Timeout 
value
 is not used when an utility is invoked with this command.

 -w  Waits for the process with the specified pid to exit. Once the the 
process exits, the assertion is also released.  This option is ignored when used
 with utility option.



John DeSoi, Ph.D.


> On Aug 7, 2019, at 12:59 PM, Jim Medlen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Looking for ideas or thoughts on generating an event that will prevent the 
> client machine from sleeping?

**
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: Managing multiple windows in the same process (v17r5)

2019-08-02 Thread John DeSoi via 4D_Tech
You can use the Window process command to determine that both windows are in 
the same process.

John DeSoi, Ph.D.


> On Aug 2, 2019, at 11:18 AM, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I also have a question about this ...
> In our database we require at least one user window to always be open. When
> a user closes a window, the close method counts the number of user windows
> and if there is only one, it doesn't allow it to be closed.
> However ...
> If the user has opened another window within the same process (for a
> preview, for example), 4D now thinks there are two user windows open, and
> it allows the user to close it ... which of course closes both of the
> windows.
> Other than keeping track of all open windows-within-windows, which is
> messy, is there any way to differentiate main windows and their associated
> windows within the same process?

**
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: v17R5 bug?

2019-07-29 Thread John DeSoi via 4D_Tech
It is just a different work-around. I'd rather loop over the collection to 
solve it and use the right data structure.

Note also collection.distinct() fails to remove duplicate pointers.

John DeSoi, Ph.D.


> On Jul 28, 2019, at 7:43 PM, Keisuke Miyako via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> why not use a key value pair instead of a flat collection of pointers?
> 
>> 2019/07/29 2:16、John DeSoi via 4D_Tech <4d_tech@lists.4d.com>のメール:
>> Disappointing because you can search for pointers in a pointer array, but 
>> not in a collection. And the above gives -1 implying that the search was 
>> completed rather than an error to indicate it is not supported.

**
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: v17R5 bug?

2019-07-28 Thread John DeSoi via 4D_Tech
Changed the subject, I assume you mean 17R5, version 15 does not have dot 
notation.

> On Jul 28, 2019, at 11:20 AM, Jeremy Roussak via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is searching for pointers not allowed?

I would assume no because 4D can't search collections for a pointer: 

$test:=New collection(->[Table]Field).indexOf(->[Table]Field) `Returns -1

Disappointing because you can search for pointers in a pointer array, but not 
in a collection. And the above gives -1 implying that the search was completed 
rather than an error to indicate it is not supported.

See feature request here:

https://forums.4d.com/Post/EN/30491335/1/30491336#30491336


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: Importing from camera

2019-07-08 Thread John DeSoi via 4D_Tech
Searching the knowledge base for "camera" turns up some tech notes. 

ftp://ftp.4d.com/ACI_TECHNICAL_NOTES/2015/TN_2015/15-01_CameraInterfaceR1.zip

ftp://ftp.4d.com/ACI_TECHNICAL_NOTES/2016/TN_2016/16-16_CameraSurveillanceIn4D.zip

John DeSoi, Ph.D.


> On Jul 7, 2019, at 10:25 PM, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> What options are there, native or otherwise, for importing pictures directly 
> from a camera?

**
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: The set does not exist

2019-07-07 Thread John DeSoi via 4D_Tech
There is the answer: "the data source is arrays". The highlight set only 
applies to selection (table) based list boxes. To get the highlighted rows of 
an array listbox, you use the True/False value of the boolean array 
representing the listbox. See the "Managing Selection" section on the page 
below.

https://doc.4d.com/4Dv17/4D/17.2/Managing-List-Box-Objects.300-4386875.en.html


John DeSoi, Ph.D.

> On Jul 7, 2019, at 4:42 PM, Carl Aage Wangel via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I am using the right listbox name (listbox object name) and the data source 
> is arrays. But $tableNum is -1 and $namedSelection and $highlightSet is “” 
> (empty).

**
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: 'Clairvoyance' in listBox (v17r5)

2019-06-21 Thread John DeSoi via 4D_Tech
This was just discussed and requested on the Forums. Some examples were posted 
on how it can be done.

http://forums.4d.com/Post/EN/30170877/1/30278226

Vote for the feature request here

http://forums.4d.com/Post/EN/15446498/1/30188166

John DeSoi, Ph.D.



> On Jun 21, 2019, at 12:00 PM, Chris Belanger via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Has anyone been able to achieve this feature?
> 
> If not, I would like to put it in as a feature request to 4D.

**
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: Invalid JSON?

2019-06-02 Thread John DeSoi via 4D_Tech
What version of 4D? JSON Parse on what you provided below does not throw an 
error with 4D 17.1.

John DeSoi, Ph.D.



> On Jun 2, 2019, at 8:05 PM, JOHN BAUGHMAN via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am getting the following from zip-codes.com…
> 
> {
>   "item": {
>   "ID": "77252",
>   "Medicare_Rating_Area_ID": "1"
>   }
> }
> 
> The list under item: s much much longer. If I use JASON Parse it throws an 
> error….
> 
>   JSON malformed in line 1, position 1

**
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: Injecting Forms from a component

2019-05-23 Thread John DeSoi via 4D_Tech


> On May 23, 2019, at 10:26 AM, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I expect that you can do the same for table(s) via SQ, I have not tried.

In addition to SQL, you can also use IMPORT STRUCTURE which is probably better 
in a lot of ways because you can do things like set trigger properties for the 
table. I don't think this is possible with SQL. But it is complex if you are 
doing schema versioning.

> 
> Can you inject a form from a component into a host system?
> if so - how?

Not possible as far as I know. In theory it will be possible with version 18. 
With version 17 you can use dynamic forms to some extent, but doubt you can get 
everything working the same as a form created in the design environment.


https://doc.4d.com/4Dv17/4D/17.1/Dynamic-Forms.300-4201272.en.html

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: Managing 4D Server as a service

2019-05-10 Thread John DeSoi via 4D_Tech

> On May 9, 2019, at 4:25 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> Current 4D recommendations is to not use interact with desktop when running 
> 4D Server as a service and to handle everything yourself. Always install ON 
> ERR CALL method on everything that runs on 4D Server and log the error 
> somehow so you will never have a runtime error dialog appear. 


Unfortunately, this is not true. There are several types of errors that show a 
dialog on the server even if an error hander is installed. See this feature 
request on the forums for examples. And add your vote for it :).

https://forums.4d.com/Post/EN/17994245/1/17994246


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: Capturing workstation timezone from the OS

2019-05-06 Thread John DeSoi via 4D_Tech
This gives the number of seconds offset from GMT.

John DeSoi, Ph.D.


$zDate:=Current date
$str:=String($zDate;ISO date GMT;$zTime)  //2010-09-13T16:11:53Z
$str:=Substring($str;1;Length($str)-1)  //Remove the Z or it gives us back 
local time.
$gmtDate:=Date($str)
$gmtTime:=Time($str)

Case of 
  : ($zDate=$gmtDate)
$0:=$zTime-$gmtTime
  : ($zDate>$gmtDate)
$0:=(?24:00:00?-$gmtTime)+$zTime
  Else 
$0:=0-((?24:00:00?-$zTime)+$gmtTime)
End case 


> On May 6, 2019, at 10:47 AM, Peter Jakobsson via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I’ve been looking into capturing the OS timezone (i.e. GMT +01 etc) from the 
> 4D language but have drawn a blank. I thought there might be some fancy 
> footwork with String(?00:00:00?;ISO GMT) or something trick like that 
> possible but I’ve been unsuccessful.
> 
> Has anyone done this without resorting to LAUNCH EXTERNAL PROCESS shell 
> scripts and so on ?
> 

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

2019-05-03 Thread John DeSoi via 4D_Tech
Look at the crash log (should be in ~/Library/Logs/DiagnosticReports). It often 
gives helpful clues about what is causing the crash.


John DeSoi, Ph.D.


> On May 3, 2019, at 8:11 PM, Robert McKeever via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> My client (4 time zones away), had been running the single user compiled and 
> merged app under windows. Then he purchased a new Mac. It is running 10.14.3, 
> I’m running 10.14.4. I have moved the appropriate mac app files to his 
> machine, along with the datafile and index file from his PC.
> 
> 4D crashes on startup.
> 
> Then I had him add a printer. Tried again. No  luck.

**
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 17.1 network issues

2019-05-03 Thread John DeSoi via 4D_Tech
I set the WiFi to "Inactive" using the small popup at the bottom of the list 
and rebooted the computer. That removed it from the ifconfig list and the 
server no longer shows the self assigned IP.

I suspect the 4D 17 networking issues are related to computer sleep and/or the 
new network layer implementation of putting connections to sleep on the server 
after an inactivity timeout (the default is 20 seconds). I tested two changes 
over the past week: 

- Prevent the computer from sleeping when 4D Client is running.

- Disable the connection inactivity timeout - SET DATABASE PARAMETER(Idle 
connections timeout;0).

The logs showed only one client session that was aborted. I also ran a client 
test for over a week that implemented delays on both the client and server side 
ranging from a minute to 2 hours. No issues.

I had previously tried setting Idle connections timeout to 5 minutes. That did 
not help, there were still aborted connections.

If this is not a 4D Server problem, I'm not sure what else could be done to fix 
it. There were no issues like this with 4D 16.4. This is a single switch 
network, no routers are involved. The switch is about 6 months old and has no 
configurable settings.


John DeSoi, Ph.D.


> On Apr 24, 2019, at 2:09 PM, Charles Miller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> If it shows as active, that may be part of the problem. I found many
> moons ago similar issues when one of my customers had new server with
> to NIC cards. It seems what happens is that client connects to 1,
> inactive for period of time, goes back and tries using 2, crash just
> as you are having. There used to be terminal command to combine two
> NICs into one on a MAC. Have you tried restarting the machine. You
> should not have a real IP on ethernet connection and self assigned on
> wifi. Something is not adding up
> 
> Regards
> Chuck
> 
> On Wed, Apr 24, 2019 at 12:28 PM Peter Bozek via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
>> 
>> On Wed, Apr 24, 2019 at 4:06 PM John DeSoi via 4D_Tech <4d_tech@lists.4d.com>
>> wrote:
>> 
>>> No, just Ethernet is enabled. WiFi and the other connection types are not
>>> connected (red dot). But that just helped me answer the question. If I
>>> disable WiFi on my laptop, the server shows a 169.254.X.X link-local
>>> address. I wonder why and if that could be a source of problems.
>>> 
>>> It shows a red dot, "not connected", but it is active according to
>>> ifconfig:
>>> 
>>> en10: flags=8863 mtu 1500
>>>ether a6:e9:75:40:77:fa
>>>inet6 fe80::10be:87e1:3ea2:51c7%en10 prefixlen 64 secured scopeid
>>> 0x17
>>>inet 169.254.132.126 netmask 0x broadcast 169.254.255.255
>>>nd6 options=201
>>>media: autoselect (100baseTX )
>>>status: active
>>> 
>>> 
> 

**
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: Connecting to FTP

2019-04-30 Thread John DeSoi via 4D_Tech
Sorry, I missed the word "secure" in your description; I thought you just 
changed the the FTP port to . 

Secure FTP (SFTP) is a completely different protocol from FTP. It is not 
supported by 4D IC.


John DeSoi, Ph.D.


> On Apr 30, 2019, at 9:03 PM, Robert McKeever via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> IT_SetPort returns 0.
> 
> The FTP Login returns 10032 - Unknown or invalid response.
> 
>> On Apr 30, 2019, at 5:32 PM, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> 
>> wrote:
>> 
>> Bob,
>> 
>> You need to use the IT_SetPort command.
>> 
>> John DeSoi, Ph.D.
>> 
>> 
>>> On Apr 30, 2019, at 6:49 PM, Robert McKeever via 4D_Tech 
>>> <4d_tech@lists.4d.com> wrote:
>>> 
>>> I run an FTP server for my clients. All of the connections are secure FTP - 
>>> port .
>>> 
>>> I can’t get the FTP_Login to work. I assume that it is using regular FTP, 
>>> port 21.
>>> 
>>> I tried ###.###.###.###: for the address, but no joy.

**
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: Connecting to FTP

2019-04-30 Thread John DeSoi via 4D_Tech
Bob,

You need to use the IT_SetPort command.

John DeSoi, Ph.D.


> On Apr 30, 2019, at 6:49 PM, Robert McKeever via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> I run an FTP server for my clients. All of the connections are secure FTP - 
> port .
> 
> I can’t get the FTP_Login to work. I assume that it is using regular FTP, 
> port 21.
> 
> I tried ###.###.###.###: for the address, but no joy.
> 
> Any Ideas?

**
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: Using the HELP Menu for my own purposes.

2019-04-29 Thread John DeSoi via 4D_Tech
Vote for the feature request at the link below from 2007. I also requested it 
before the forum existed back in 1998. Don't hold your breath :).

https://forums.4d.com/Post/FR/1510042/1/2352980

John DeSoi, Ph.D.


> On Apr 28, 2019, at 5:51 PM, Herr Alexander Heintz via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Is there any way out there (can be a Plugin) to do this?
> In the current version the HELP menu is utterly useless to my users.

**
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 17.1 network issues

2019-04-24 Thread John DeSoi via 4D_Tech
Hi Spencer,

> On Apr 24, 2019, at 8:29 AM, Spencer Hinsdale  wrote:
> 
> If you go to Apple menu, System Preferences on the mini, for Network do you 
> see more than one green dot?  Each is separate network connection, where you 
> can click Advanced and go to TCP/IP tab for details.  Is not unheard of for 
> someone to set up Ethernet and Wi-Fi.

No, just Ethernet is enabled. WiFi and the other connection types are not 
connected (red dot). But that just helped me answer the question. If I disable 
WiFi on my laptop, the server shows a 169.254.X.X link-local address. I wonder 
why and if that could be a source of problems.

It shows a red dot, "not connected", but it is active according to ifconfig:

en10: flags=8863 mtu 1500
ether a6:e9:75:40:77:fa 
inet6 fe80::10be:87e1:3ea2:51c7%en10 prefixlen 64 secured scopeid 0x17 
inet 169.254.132.126 netmask 0x broadcast 169.254.255.255
nd6 options=201
media: autoselect (100baseTX )
status: active

Even more interesting, you can highlight it and make it "Inactive" using the 
popup menu at the bottom of the list. Red dot disappears and it says 
"Inactive". But ifconfig still says it is active and the IP is still there when 
I restart the server.

> 
> Back in System Preferences, Energy Saver, you probably want Prevent Computer 
> From Sleeping on all computers, but especially server.  It is common for an 
> upgrade of computer or system to reset this, to be green.

Yes, I have it setup that way. There is no monitor attached, so I also have no 
screen saver and set the display to not sleep. Just switched off App Nap last 
night, but I doubt that matters since it should never sleep.


> 
> That said, be aware that 16.4 used New Networking only, which allows Clients 
> to sleep.  It is possible, if you have the Compatibility checkbox (in 4D 
> Server, File menu, Database Settings) set to Use Legacy Network Layer that 
> this works in 17.1 and would cause the errors below if Clients did Sleep.  
> This checkbox would have no effect (and different text) in 16.4 and Clients 
> could Sleep and wake no problem.  Maybe all you need is to uncheck this.

I switched to 64 bit only with version 16, so only the new network layer is in 
use.

I received a response off-line that stated similar problems and the issues were 
solved by upgrading to 17R3 or later. I hope there is a better solution.

In addition to the dropped connections, it has also been reported 4D will 
freeze up for a brief period and become unresponsive, then after about 15-20 
seconds will begin responding again. No problems like this reported with 16.4 
on the same network.

Thanks for your help and suggestions.

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

4D 17.1 network issues

2019-04-24 Thread John DeSoi via 4D_Tech
Since I upgraded from 16.4 to 17.1 (all Mac), users have been complaining about 
4D Client disconnects. Messages like:

"The current connection to the database has been disrupted. Connection error 
with the server. Please restart the application."

"Unknown Error. Connection error with the server. Please restart the 
application."

It is an all local single switch network with default timeouts. I experimented 
with changing timeouts, but it did not help.

The server hardware also changed (new 2018 Mac Mini), so I'm looking into that. 
One curious thing I noticed is the "Application Server" tab shows it to be 
listening on two IP addresses: 192.168.X.X and 169.254.X.X. The 192 address is 
expected and the only active network connection on the computer. Why would the 
server be listening on a 169 link-local address and where did that come from? I 
don't see that when I run the server on my laptop under the same operating 
system (10.14 Mojave).

Digging into it with Wireshark is next, but hoping someone might suggest an 
easier path.

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

  1   2   3   4   >