Re: 4D Web Application and SAML or OpenID Connect

2019-11-08 Thread Keith White via 4D_Tech
Hi

Thanks for all the responses.   As always, there is more than one way to do it.

Looks like OpenID Connect may be simpler.  We've already got some OAuth code in 
use for external application interfaces.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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 Web Application and SAML or OpenID Connect

2019-11-04 Thread Keith White via 4D_Tech
Hi

Has anyone done work on implementing either SAML or OpenID Connect protocol in 
native 4D code for single sign-on in 4D Web Applications?   I know about 4D's 
work on single sign on using Active Directory and/or LDAP etc, but this 
question is specifically for SAML or OpenID Connect.

Services like https://www.onelogin.com/ support these protocols and we're being 
asked more about it.

PHP is one way I suppose, but we currently don't use PHP and I'd prefer a 
native 4D solution.

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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: Web aficionados - Not allow user to access file directly

2019-10-03 Thread Keith White via 4D_Tech
Hi

For the HTML markup files, I suggest using the extension .shtml rather than 
.html

For us any direct request for a .shtml file will trigger On Web Authentication 
and you can catch and reject the request.

Doing that allows you to keep things simpler in a single folder and you don't 
have to worry about serving stuff outside the web folder.  Personally I don't 
like the idea of having any code in play that can retrieve a file on disk from 
outside the default web folder.  Not a problem if coded correctly of course.

Hope that helps.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775

**
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: Stuffing a shared object

2019-07-16 Thread Keith White via 4D_Tech
Hi

I know you've sorted out an elegant solution using CALL WORKER, but just in 
case you do need to copy to a shared object or collection in the future, please 
see https://kb.4d.com/assetid=78197

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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: V17R3 vs PowerShell

2019-06-03 Thread Keith White via 4D_Tech
Hi John

> That is the only thing that makes sense to me. Do you know this for certain?

Yes.  Please see 
https://docs.microsoft.com/en-us/windows/desktop/winprog64/file-system-redirector

> I had hoped that by having LEP display the console, I could tell which 
> version of PowerShell was run

To tell if a running application is 32-bit or 64-bit, open Windows Task Manager 
(Processes tab).  32-bit applications have a *32 to the right of the executable 
name.

 >. It’s interesting to me that the OS is making the decision based on the 
 >architecture of the requesting application not the architecture of the dll

At the point you launch PowerShell, it has no idea what you’re going to do with 
it.  You may access external 32-bit (or 64-bit) DLLs/COM objects or you may 
not.   Quite simply, the OS knows the 32-bit application is trying to access 
“system32” and so translates that to SysWow64.  This is transparent to the 
32-bit application.

> When PowerShell is launched I do not think that the OS knows which or even if 
> a dll is going to be addressed.

Exactly, it doesn’t.  It does however know that a 32-bit application is trying 
to access the system32 folder.

> Does that mean a 32bit 4D will not launch 64 bit PowerShell ever?

If you need to force a 32-bit application to launch 64-bit stuff from system32, 
you can use a special virtual directory “Sysnative”.  Note that this virtual 
directory is only for 32-bit applications.  This is detailed at the end of the 
article I’ve sent.


Hope this helps.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775

**
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: V17R3 vs PowerShell

2019-06-01 Thread Keith White via 4D_Tech
Aloha John

The reason that you think the 64-bit PowerShell is working is because actually 
the 32-bit PowerShell is still being used.

When a 32-bit application (in this case 4D) accesses the system32 directory, 
those accesses are automatically redirected to the SysWow64 directory.

So when you use LEP to launch PowerShell and you think you've specified the 
64-bit version in system32, the OS is just launching the one from SysWow64.

On the other hand, when running a 64-bit application this redirection doesn't 
happen, so you can launch either 32-bit or 64-bit PowerShell as needed.

As your QB SDK is 32-bit only, you'll always have to launch the 32-bit 
PowerShell.

Hope this helps.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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: Error connecting to 4D Server

2019-04-08 Thread Keith White via 4D_Tech
Hi there


We first saw many of these symptoms with v16R6 using the new network layer.  
Before that the only previous 4D version we'd used for a long time was v13.6 
which didn't have the new network layer.


Anyway, using v16R6 with the new network layer, we did get mass disconnections 
occurring and also seeing the Admin window changing the Accept/Reject by 
itself.  So after a mass disconnection, new connections couldn't be made.  At 
least that's what we initially thought.  It turned out that if you waited long 
enough (several minutes), connections would again be allowed.  The network 
layer somehow "resetting" itself, maybe.  Don't know.


We also noticed that at the point of these mass disconnections there would 
usually be an entry in the Windows Application event log.  The log entry had 
one single "japanese" looking character.


In the end, 4D figured out a possible cause through some diagnostic logs they 
got from another customer.  The reference for the issue was ACI0098997.  It was 
fixed in v17 HF4 and obviously also fixed in v17.1.  We had already begun our 
work to begin moving our client base from v16R6 onto v17, so we expedited this 
transition more quickly to take advantage of this and other fixes (and 
improvements) available in v17.


Whilst the issue was fixed by 4D, the actual problem is caused by 4D Server 
receiving an incomplete set of packets from one or more 4D Remotes.  This could 
be due to any number of potential network or client machine issues.  In 
summary, the 4D main thread was being blocked waiting for these incomplete 
packets to arrive and would eventually time out and resume its process 
(meanwhile all connected clients had already disconnected).  As I understand 
it, the change made by 4D was to build in a very short delay waiting on 
incomplete incoming packet sets.


I don't know whether ACI0098997 got implemented in v16.x as we never used the 
v16.x strand.


Since implementing v17.1, these new network layer disconnection issues have 
stopped, AFAIK.


Best regards


Keith White
Synergist Express Ltd, UK.
4697775
**
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: v16R6 Crashing on Compile

2018-10-29 Thread Keith White via 4D_Tech
>What exactly constitutes a token in a method?  Is it every "word" in the code?


Tokens - I don't have a definitive list but I think 4D Commands, 4D Functions, 
Constants, Table names, Field Names.


Variable names are not tokenised as far as I know, which is why we got the 
problem after replacing some IP vars with constants.  Similarly it sounds like 
you got the problem after replacing some IP vars with "Storage".  Storage will 
be a token.


Best regards

Keith White
Synergist Express Ltd, UK.
4697775

**
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: v16R6 Crashing on Compile

2018-10-26 Thread Keith White via 4D_Tech
Hi Jim

Hope you are well.

The compiler crash with v16R6 is a bug.  Fixed only in v17 (ACI0098136).  This 
one is caused when there are too many tokens in a method.  In our case it 
started happening only on our development system after I had replaced a lot of 
IP variables with custom constants.

Of course you don't know which method(s) are causing it.  4D Tech Support may 
be able  to help you out in this regard if you send them your structure, though 
I think they do have to refer to engineering to establish the problem 
method(s).  Or upgrade to v17 (that's what we've done with our development 
system) ;-)

During the R6 beta there were a couple of compiler issues that did get fixed:-

ACI0097899 - Crashing bug on syntax check/compile
ACI0097931 - SQL line length too long would not syntax check/compile (but no 
crash).  Peter Hay and Tim Penner got to the root cause of it together and it 
was then logged and fixed.

Hope this helps.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775

**
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: Do I want to use SELECTION TO ARRAY instead of GOTO SELECTED RECORD server-side in V17?

2018-09-15 Thread Keith White via 4D_Tech
Hi

GOTO SELECTED RECORD (or any ORDA equivalent of navigating record by record) 
will be slower than S2A but will take less RAM.  That's based on actual 
experience.

Building up a single big text thingy will have RAM (and eventually potentially 
performance) issues if using straight string/text concatenation for each 
iteration.  Because each time you add something to a string, a copy is made in 
RAM which is bound to lead to memory fragmentation and a higher workload for 
garbage collection.   How significant is this?  No idea.  I've always avoided 
building up super-massive text as a single thing.

We use GOTO SELECTED RECORD for building up SQL INSERT statements for sending 
to a (Microsoft or MySQL) server.  We send the SQL text to the remote server 
every x iterations which makes it fairly slow going, but it keeps the RAM in 
reasonable control.

Hope that helps.

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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 Client as Web Server - Using same 4D Process if web access from diff. machines

2018-09-14 Thread Keith White via 4D_Tech
Hi

That’s actually normal for a 4D Web Server.  You’re not guaranteed to get a new 
process for each request.  Web processes can be reused.

I think there is a structure setting to control it when using 4D Remote as a 
web server, though I forget what it’s called. There is also a setting for 4D 
Web server to specify the minimum number of processes to keep around for web 
requests.

Either way, you can’t 100% rely on process variables, selections, sets etc to 
be clean at the start of a web process.

Hope that helps

Best regards

Keith White
Synergist Express Ltd, UK
4697775
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Changes to variable initialization in v16?

2018-08-03 Thread Keith White via 4D_Tech
Interpreted vs Compiled:-

If you are developing on an in-house database I can see the advantage. I guess 
you're being careful and have developed relevant approaches to avoid causing 
problems for live users. Performance with compiled really is a significant 
gain, but it depends what you need to do. Compiled won't have much effect on 
opening and saving forms etc. It's when you need to process and summarise a lot 
of data in arrays or similar that compiled really comes into play.

Also when running interpreted, network requests are more frequent because 4D 
Remote has to check if a form or method has changed each time it is loaded. In 
compiled, these things can't change live so 4D Remote doesn't need to check. Of 
course, you are reliant on these network requests happening to deploy live 
changes so clearly they come with the territory.

> There is a parent window with a tabbed interface, the variable in question 
> was declared as a local variable in the form method, the 'on load' event.
> When selecting a different tab, the variable became 'UN-initialized" and 
> produced a runtime error.

For a local variable declared in the form method "On Load" event, I would 
expect that to only exist for the life of the "On Load" event in the form 
method. When changing tabs (or any other event), the local variable will be 
gone (Undefined) in the form method. Do you really mean local variable? In 
compiled mode, the local variable wouldn't be "gone" but it wouldn't have the 
value originally defined in the "On Load" event either.

I just re-tested this in 4D v13 and it is as I'd expect, so I don't think 
anything has changed in this regard.

(Sorry for the late post on this subject, I've been grappling with trying to 
get posts through to this list.  Hopefully this one will work)

Best regards

Keith White
Synergist Express Ltd, UK.
4697775
**
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: [SAD NEWS] legendary developer and 4D base-rock Ortwin Zillgen

2018-02-27 Thread Keith White via 4D_Tech
This is sad news indeed.  I have always visited  whenever Ortwin posted 
something useful or informative here.  I have learnt many things from him over 
the years.

Here's an odd thing though - when I got to the office yesterday and logged in 
as normal, my Chrome browser automatically opened to  on the far right tab. 
 I hadn't visited there since a couple of weeks!

He was a quite a prolific poster on the 4D forums too - 3560 posts on there.  
Often posting and voting about 4D feature requests, I recall.

My condolences to his family.  He will be missed by the 4D community.

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
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: Server Process "Frozen"-ish

2017-10-25 Thread Keith White via 4D_Tech
Hi David and Canon

Wondered if you saw my guess/conjecture previously posted on this subject (not 
that it's much help !)...:-



OK, so we think this is due to DELAY PROCESS.

The change to DELAY PROCESS somewhere in 4D v15 was to change from a Longint to 
Real.  But the problems didn't start until v16, I think that's right.

Anyway, I'm wondering if the problem is when either Tickcount, Milliseconds or 
another internal 4D time measure overflows into negative territory.  I have no 
idea internally what measure 4D uses for DELAY PROCESS, nor what data type they 
use internally for it, but what if they aren't taking account of the overflow 
when the measure value goes from a large positive number to a large negative.

That could explain the large time period before the problem reoccurs??

Just throwing an idea out there.  We've only just jumped from v13 to v16R4, 
which means we don't have v16 out in production land yet, so we haven't yet 
seen this problem occur.

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Server Process "Frozen"-ish

2017-10-20 Thread Keith White via 4D_Tech
Hi

OK, so we think this is due to DELAY PROCESS.

The change to DELAY PROCESS somewhere in 4D v15 was to change from a Longint to 
Real.  But the problems didn't start until v16, I think that's right.

Anyway, I'm wondering if the problem is when either Tickcount, Milliseconds or 
another internal 4D time measure overflows into negative territory.  I have no 
idea internally what measure 4D uses for DELAY PROCESS, nor what data type they 
use internally for it, but what if they aren't taking account of the overflow 
when the measure value goes from a large positive number to a large negative.

That could explain the large time period before the problem reoccurs??

Just throwing an idea out there.  We've only just jumped from v13 to v16R4, 
which means we don't have v16 out in production land yet, so we haven't yet 
seen this problem occur.

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: OBJECT get variable type

2017-09-12 Thread Keith White via 4D_Tech
Hi

>@Piotr: can you report this in the 4D forum as feature request? So I can vote

Object filters don't do the same thing because placeholders cause the problems 
Koen already outlined.

Here is the link to the feature request for alpha variable length limit (I also 
asked for similar alpha/text array listbox column entry property):-

http://forums.4d.com/Post/EN/19424825/1/20684007#20684007

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Facial Detection/recognition

2017-07-15 Thread Keith White via 4D_Tech
>Bal Clinton

Brilliant!

Best regards

Keith White
Synergist Express Ltd, UK


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

Re: How to trap a form save keystroke in an object method ?

2017-05-18 Thread Keith White via 4D_Tech
Does FILTER EVENT work in this context?


Or REJECT(field) as someone has already suggested.

Best regards

Keith White
Synergist Express Ltd, UK
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Limit input into alpha characters into variable

2017-05-15 Thread Keith White via 4D_Tech
Hi

Many thanks for those answers.

Whilst I'll be using a workaround, I've also logged a feature request.

http://forums.4d.fr/Post/EN/19424825/1/19424826#19424826

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Limit input into alpha characters into variable

2017-05-12 Thread Keith White via 4D_Tech
Hi

Is there a way to limit the number of characters you can impose on the user for 
alpha _variables_ (in a 4D form)?

I tried using an entry filter, but that changes how the data is entered (you 
can only highlight one character at a time).  Setting an entry format didn't 
seem to do it.

I'm sure someone came up with something, but I've searched all places and 
haven't found it.

4D v13.6

Many thanks.

Best regards

Keith White
Synergist Express Ltd, UK.


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

Re: Components: How do you reuse utility code?

2017-04-21 Thread Keith White via 4D_Tech
>If they did care, some of these things could have been added instead of 
>querying on object fields that most people will eventually wish they didn’t 
>use in the first place.

This made me smile a lot.I had exactly the same thought.  It brings back 
memories of subtables which I'm sure every 4D old-timer regrets ever using, if 
they ever did.  Someone could compile a list of 4D features with a recommended 
"steer clear of this to avoid regret later"  ;-)

To add my 0.02p on components:-

No.  Don't like them.  Don't use them in our coding.   I'd only ever use them 
for an essential 3rd Party "drop-in" black-box component that I have no 
intention of amending the source code for, so much akin to plug-ins.

Other than that, I can only echo what others have said about wanting the 4D 
language moved forward a bit.  I do recall that 4D did say at a Paris Summit 
that they had decided to re-commit to the 4D language.  Adding multi-threading 
support is possibly a sign of that decision, even though I really dislike their 
implementation of it.

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: Questions about the 'Sum' function

2017-04-13 Thread Keith White via 4D_Tech
Hi

Sum for a selection of another table doesn't work if used in "On Printing 
Detail" of an output form.

So say you were printing a list of clients and you wanted to include on that 
list a total balance of invoices for each client.  So you'd think:-

QUERY([ClientInvoices]; blah blah blah..)

nThisCustomerTotal:=Sum([ClientInvoices]Balance)

Nope, doesn't work.

Tried to report to 4D as a bug a vry lng time ago, but was told this 
was "Standard Behaviour".

Best regards

Keith White
Synergist Express Ltd, UK.
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: 4D 15.4 HF1 (windows) - crashes when run as service

2017-03-09 Thread Keith White via 4D_Tech
>Reminder: it is not recommended to create user interface on 4D Server when 
>launched as a service

Tim

Is this meant as a reminder to 4D to not create a user interface for 4D Server? 
 ;-)   (4D may be working towards a headless 4D Server?)

Retaining access to 4D Server's user interface is currently essential for 
system admins to be able to drop users or to see 4D error message dialogs that 
may have appeared on the 4D Server UI.

Good to know that this has been fixed, so thanks.

Now I know you're going to tell me that you can use the 4D Remote 
Administration Window to do the drop-users thing.  Great, but how do you get to 
_that_ if all your 4D connection licenses are currently used up?  Catch-22

Best regards

Keith White
Synergist Express Ltd, UK.

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