first call in form of WA EXECUTE JAVASCRIPT FUNCTION takes 6 seconds

2020-04-28 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

When opening calling WA EXECUTE JAVASCRIPT FUNCTION the first time in a form 
for a web area it takes 6 seconds to complete
Successive calls run as expected
Does this have something to do with loading certain libraries?
Does anybody know why does this take so long?
Can I do something about this?

I have a javascript function to scroll to a certain element within my html

function scroll_to_id(my_id) {
  var elmnt = document.getElementById(my_id);
   elmnt.scrollIntoView()
};

and WA EXECUTE JAVASCRIPT FUNCTION(*;$area;"scroll_to_id";*;$element) use to 
execute 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
**

Write Pro disable spell checking

2020-01-10 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

When displaying a write pro area in a form, on default I want to disable spell 
checking

I thought I could do this with the view property wk spell enable

$viewProps[wk spell enable]:=false
WP SET VIEW PROPERTIES(*;$wpro_area;$viewProps)


However, when doing this the spelling options in the context menu are gone, and 
in the write pro toolbar the "enable spelling" button is disabled
So, the user cannot enable spell cheking

Is there another way to disable spell checking? (On load, without the write pro 
area having the focus)
Im a doing something wrong?

Gr,
Piotr
**
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
**

auto row height only with array based listboxes?

2020-01-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

First of all best wishes for 2020!!

Can anybody confirm that the command
LISTBOX SET PROPERTY(*;"mylistbox";lk auto row height;lk yes)
only works with array based listboxes, and not collection based listboxes?

Thanks,
Piotr
**
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 Area not visible

2020-01-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeremy,

First of all the best wishes for 2020

I have the same problem, I am interested in your solution, and sort of 
understand it, but not completely
Some people say loading the content from disk with WA OPEN URL solves the 
problem, but I don't like this because of potential critical information in the 
HTML

So, when having a variable with HTML content in it, that I want to show on 
load, without having to save it on disk where do I put the HTML content?

Thanks in advance,
Piotr Chabot Stadhouders
Rotterdam, Netherlands

-Oorspronkelijk bericht-
Van: Jeremy French  
Verzonden: vrijdag 8 november 2019 04:48
Aan: 4D iNUG Technical <4d_tech@lists.4d.com>
CC: Mitchell Shiller 
Onderwerp: Re: Web Area not visible

Hi Mitch,

I resolved the failure (of the embedded web engine to display when a form 
loads) by calling (in the form's Form Method) the following:

Case of
: (Form event=On Load)

JFU_WEB_AREA_DISPLAY_FIX ("webArea")
SET TIMER(-1)

: (Form event=On Timer)

JFU_WEB_AREA_DISPLAY_FIX ("webArea")
SET TIMER(0)

End case 

JFU_WEB_AREA_DISPLAY_FIX executes:

WA OPEN URL(*;$objName_webArea_t;"about:blank")
WA SET PAGE CONTENT(*;$objName_webArea_t;"";"file:///")

Best regards,
- Jeremy French

> On Nov 7, 2019, at 3:06 PM, Mitchell Shiller via 4D_Tech 
> <4d_tech@lists.4d.com> wrote:
> 
> Anyone else notice this problem?


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

Re: XML Null reference with DOM Find XML element

2019-12-17 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Koen,

Thanks for he snippet

>> Hi Piotr,

>> I have a small method DOM_validRef which basically uses this test:

>> if(Replace string($ref;"0";"")="")
>> $valid:=false
>> end if

>> 64bit indeed uses 32 zero chars instad of 16, but this code handles both 
>> situations (and future ones, if we live long enough to make the transiton to 
>> 128bit systems...).

>> My method also checks if all chars in the XML ref are valid hex chars (0-9 
>> A-F), but that might be overkill.

>> Kind regards,
>> Koen

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

XML Null reference with DOM Find XML element

2019-12-17 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4Dv17R6, Windows 64-bit
What is the best way to test if a XML DOM element is a Null reference?
Especially when using DOM Find XML element?

The docs say “If the command has been executed correctly, the system variable 
OK is set to 1”
Does it mean “if the command finds an element”? Finding nothing is also 
“executed correctly”

In our app we tested on “”, but now it seems (64-bit?) that a 
null reference consists of 32 zeroes instead of 16
I only see 1 mention about null reference in XML but it tals about 16 zeroes

Does anybody know more about this?

Gr,
Piotr
**
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
**

web area and memory use

2019-12-09 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Windows 64 bit, 4D v17r5, Embedded rendering engine

We use 4D Web Area to show some HTML based reports
The reports are formatted by CSS and on some of the elements we enabled user 
interaction with Javascript
Sometimes there cab be quite an amount of HTML elements in the report, because 
of a lot of data

Anyway, when generating quite a large report with CSS and Javascript embedded, 
and show this in a web area, can someone tell me if there are some (memory) 
limits on this?
I am asking this because some of our users now and then, suddenly, get blank 
output while this shouldn’t be the case
Is there a way to see memory usage? Are there known memory leaks? I am touching 
in the dark with this, but my feeling is we are having a web area memory problem

I hop someone can help me,
Piotr

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

on Windows using SET CURRENT PRINTER(Generic PDF driver) with SET PRINT OPTION(Destination option;3;$path) does not restore settings

2019-12-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

When using SET CURRENT PRINTER(Generic PDF driver) on Windows 10 with SET PRINT 
OPTION(Destination option;3;$path) does not restore the checkbox “Print To File”
I use the Microsoft Print To PDF printer
The checkbox “Print To File” stays on when done printing
I believe this can cause problems when users want to print afterwards to a 
“normal” printer

Can anybody confirm this?

Gr,
Piotr

**
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: PRINTERS LIST

2019-11-29 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Dave,

"Apparently 4D loads it’s copy of current available printers at launch"

We have an 4D v17 64-bit engined App running in a Citrix environment.
We got the feeling that, when a user takes over his session in another room, he 
"looses" the connection to the available printers, even when we call printers 
list.

How did you find out the above?

Also, the docs for printers list say:
"On the other hand, its location and model type are linked to its physical 
characteristics. Therefore, you can use the optional array values to check the 
characteristics of the selected printer — typically, you can check that all the 
client machines use the same printer."

Do you know what they mean with that?

Gr,
Piotr



"
On 07/10/2019, 17:10, "4D_Tech on behalf of David Ringsmuth via 4D_Tech" 
<4d_tech-boun...@xxx.xxx on behalf of 
4d_t...@xxx.xxx>
 wrote:

Apparently 4D loads it’s copy of current available printers at launch

Obviously there are times when available printers change during a 4D user login 
session.

There should be an option in the PRINTERS LIST command that causes 4D to 
refresh it’s copy of the available printers.

Should this be a feature request?
"

**
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: DOCUMENT LIST : how do I know the documents are valid

2019-11-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Dear Alexander,

Unfortunately, I believe the “locked” attribute doesn’t return true when 
copying is in progress

But thanks for your tip.

Gr,
Piotr


could this help?

GET DOCUMENT PROPERTIES ( document ; locked ; invisible ; created on ; created 
at ; modified on ; modified at )

> Am 21.11.2019 um 11:20 schrieb Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx>:
>
> Hi,
>
> We use DOCUMENT LIST and COPY DOCUMENT to handle scans
> The documents are copied by a scanner to a certain folder on a Windows 
> server, where we are picking them up and process them
> It seems that because of slow copying the documents are picked up too early 
> by us
> How can I ensure that the documents are totally copied by the scanner? COPY 
> DOCUMENT to an temporary folder doesn’t seem to solve the problem
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

DOCUMENT LIST : how do I know the documents are valid

2019-11-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

We use DOCUMENT LIST and COPY DOCUMENT to handle scans
The documents are copied by a scanner to a certain folder on a Windows server, 
where we are picking them up and process them
It seems that because of slow copying the documents are picked up too early by 
us
How can I ensure that the documents are totally copied by the scanner? COPY 
DOCUMENT to an temporary folder doesn’t seem to solve the problem

Gr,
Piotr

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

Print Object error #6

2019-11-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

In some occasion we are getting an error when using the command Print Object
The message is “The form cannot be printed. Error #6”

Does anybody know what this error number means?

Gr,
Piotr

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

Write Pro Hide/clear pictures when printing

2019-10-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

We want to print a Write Pro document without printing the contained pictures
Say we print to paper that has corporate identity, we don’t want to print the 
logo that is inside the Pro document
So we want copy the pro document to a new one, and in this new document 
hide/clear the pictures (logo) and then print

When I set the picture to 0 bytes, the picture is not printed but I see an ugly 
black rectangle around it, so this does not work
So, is there a way to procedurally hide/clear the pictures

Gr,
Piotr

**
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] Why does 4D does not respect my regular 4D filtering option disabled for all

2019-10-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

We found the problem
It seems that when the Preferences folder is missing in the database folder, 
and 4D is not able to create the Preferences folder, the error 48 appears

Gr,
Piotr

-Oorspronkelijk bericht-
Van: Piotr Chabot Stadhouders  
Verzonden: Thursday, 24 October 2019 10:46
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: [HIGH] Why does 4D does not respect my regular 4D filtering option 
disabled for all

Hi,

We have a database where the 4D filtering option is set to “disabled for all”
However, in some installations we still get Error 48 in 4D Write pro documents 
where we use expressions.

We have Enable user settings in external file checked Can there be a problem 
with our installation?
Why do we still get Error 48 although we allow all commands and methods?

Where is this setting stored?

Thanks in advance,
Piotr


**
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 Piotr Chabot Stadhouders via 4D_Tech
Hi John,

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?

Gr,
Piotr

-Oorspronkelijk bericht-
Van: John DeSoi  
Verzonden: Friday, 11 October 2019 18:04
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: Re: HIDE MENU BAR in On Startup database method

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

HIDE MENU BAR in On Startup database method

2019-10-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

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?

Thanks,
Piotr

**
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: Re: 4D v17r4 Windows Print To PDF ignoring PAGE SETUP

2019-10-10 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Cameron,

Did you find a solution for this?
I am working on a Windows 10 64-bit machine and have the same problem
Whatever I do to change the paper size:
SET PRINT OPTION(Paper option;1130;820)
SET PRINT OPTION(Paper option;"A3")

The output to Windows Print To PDF doesn’t respect any of my settings

Gr,
Piotr

Van: Piotr Chabot Stadhouders 
Verzonden: Thursday, 10 October 2019 13:55
Aan: Piotr Chabot Stadhouders 
Onderwerp: Re: 4D v17r4 Windows Print To PDF ignoring PAGE SETUP

The newest versions of 4D do better if you set these options in code instead of 
a saved page setup. Try using SET PRINT OPTION to change it to landscape mode.

> On Jul 3, 2019, at 6:13 PM, Cameron Ambrose via 4D_Tech 
> <4d_t...@xxx.xxx> wrote:
>
> Just updated to 4D v17r4 and it appears that when using the Windows 10 (64 
> bit) PDF printer, the client is no longer honouring the PAGE SETUP definition 
> and instead just printing in portrait letter.

**
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: Database … is write protected (AGAIN)

2019-10-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

As explained in a previous post we have problems launching 4D Volume desktop 
64-bit app more than once in a citrix environment.
We solved this in the past by using a virtual store on Windows.
However, this is not supported anymore with 64-bit applications.

Microsoft states:
"Virtualization supports only 32-bit applications. Non-elevated 64-bit
applications simply receive an access denied message when they attempt
to acquire a handle (a unique identifier) to a Windows object. Native
Windows 64-bit applications are required to be compatible with UAC and
to write data into the correct locations.

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd835540(v=ws.10)?redirectedfrom=MSDN
"

Shouldn't 4D respect this? Or can we do something ourselves to solve this 
problem?


-Oorspronkelijk bericht-
Van: Piotr Chabot Stadhouders  
Verzonden: Thursday, 3 October 2019 09:52
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
CC: Piotr Chabot Stadhouders 
Onderwerp: Database … is write protected (AGAIN)

Hi,

4D v17R5 64-bit, Windows

We use a 4D Volume Desktop application in a Citrix environment It seems that in 
64-bit there is no possibility to use a Virtual Store in Windows So, when 
launching our app for the second time, we get the message “Database … is write 
protected”
This is strange because we have set the option “"Do not display warning when 
structure file is in read only"”
This has nothing to do with the datafile, because for this we already use the 
“Default Data/Default.4DD” technique and this works fine

Because we don’t use the 4D datafile we have no problems for the structure file 
and datafile to be in read only mode We are able to work with our application 
in a normal way, except for the annoying message at startup.

Nowadays I think it is completely normal to start applications in a citrix 
environment by different users in protected mode, so tips for using 4D server 
is a no go

So, does anybody know what to do about this annoying message, or where it comes 
from?

Thanks,
Piotr

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

Database … is write protected (AGAIN)

2019-10-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v17R5 64-bit, Windows

We use a 4D Volume Desktop application in a Citrix environment
It seems that in 64-bit there is no possibility to use a Virtual Store in 
Windows
So, when launching our app for the second time, we get the message “Database … 
is write protected”
This is strange because we have set the option “"Do not display warning when 
structure file is in read only"”
This has nothing to do with the datafile, because for this we already use the 
“Default Data/Default.4DD” technique and this works fine

Because we don’t use the 4D datafile we have no problems for the structure file 
and datafile to be in read only mode
We are able to work with our application in a normal way, except for the 
annoying message at startup.

Nowadays I think it is completely normal to start applications in a citrix 
environment by different users in protected mode, so tips for using 4D server 
is a no go

So, does anybody know what to do about this annoying message, or where it comes 
from?

Thanks,
Piotr

**
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: Another splitter question

2019-09-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Yes, I already was afraid this would be the final conclusion☹

I know I can set splitter_2 and listbox_2 and listbox_3 by setting the 
coordinates of the objects while moving splitter_1 (in on clicked event)
I also know I can assign a value to splitter_2 and then the other objects react 
on this assignment while moving splitter_1 (in on clicked)

My problem with this is that I find it to be not very intuitive
I get all kinds of unexpected sizing and moving of the objects

Gr,
Piotr

Van: Kirk Brooks 
Verzonden: Thursday, 26 September 2019 15:39
Aan: Piotr Chabot Stadhouders 
Onderwerp: Re: Another splitter question

Piotr,
On Thu, Sep 26, 2019 at 12:57 AM Piotr Chabot Stadhouders 
mailto:p.stadhoud...@timeff.com>> wrote:
However, in this case what I want is :
- when I move splitter_1 I want listbox_2 and splitter_2 to MOVE and listbox_3 
to resize
- when I move splitter_2 I want listbox_2 and listbox_3 to resize

I don't think 4D will do that natively. When you move splitter 1 it causes 
listbox 2 to resize but the resize 'flag' (no idea if that's the actual 
mechanism) is not passed on to splitter 2 or listbox 3. So it only affects 
listbox 2.

Conversely when you resize the form itself, making it larger for example, only 
listbox 3 is affected.

What you want would be a sort of auto-distribute resize option. That's 
something different and more complicated. If this is a super critical feature 
you simply must have I think you will need to manage it yourself using the On 
resize form event. I've done that sort of thing a couple of times. It's tedious 
but possible. If the number of items is not great, and it sounds like it's not, 
the performance is not affected too much.
--
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

Wittgenstein and the Computer
**
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: Another splitter question

2019-09-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Thanks for your answer.

The way you describe the properties is the way I set them, and then listbox_2 
is resized when splitter_1 is moved. (Pusher property is off)
This most of the time is the wanted behavior.
However, in this case what I want is :
- when I move splitter_1 I want listbox_2 and splitter_2 to MOVE and listbox_3 
to resize
- when I move splitter_2 I want listbox_2 and listbox_3 to resize

Gr,
Piotr

-Oorspronkelijk bericht-
Van: Kirk Brooks  
Verzonden: Wednesday, 25 September 2019 17:18 
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: Re: Another splitter question

Piotr,

listbox_1  |  listbox_2  |  listbox_3

listbox_1:  horizontal resize = grow; vertical resize= grow (I assume)
splitter_1:  horizontal resize = none; vertical resize= grow
listbox_2:  horizontal resize = grow; vertical resize= grow
splitter_2: horizontal resize = none; vertical resize= grow
listbox_3: horizontal resize = grow; vertical resize= grow

Notes:

Be sure the splitters start before the top of the listbox and end after the 
listbox. It won't work if the splitters are not longer, at least by a pix on 
each end. At least in my experience.

You won't be able to size the listbox smaller than the layout in the form 
editor.




On Wed, Sep 25, 2019 at 1:05 AM Piotr Chabot Stadhouders via 4D_Tech < 
4d_tech@lists.4d.com> wrote:

> Hi,
>
> I have a form with three listboxes on it, with in between 2 vertical 
> splitters
>
> I want to accomplish the following, preferably only by setting object 
> properties :
> When I move the left splitter the left listbox must size, the middle 
> listbox + right splitter must move, and the right listbox must size 
> When I move the right splitter the middle and right listbox must size 
> (the left splitter + listbox must stay as is)
>
> I am having troubles to find a (good) way to accomplish this
>
> Anybody any tips?
>
> Gr,
> Piotr
>
> **
> 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
> **



--
Kirk Brooks
San Francisco, CA
===

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *

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

Another splitter question

2019-09-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I have a form with three listboxes on it, with in between 2 vertical splitters

I want to accomplish the following, preferably only by setting object 
properties :
When I move the left splitter the left listbox must size, the middle listbox + 
right splitter must move, and the right listbox must size
When I move the right splitter the middle and right listbox must size (the left 
splitter + listbox must stay as is)

I am having troubles to find a (good) way to accomplish this

Anybody any tips?

Gr,
Piotr

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

Which extension does Google Blink engine use when showing PDF

2019-06-27 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Windows, 4D V17 64-bit
We use a webarea with the embedded web rendering engine checked, so 4D is using 
Google Blink
In this area we show PDFs and it look very nice I must say

However, we ant to change the default zoom for the PDFs
I have changed the zoom preference in Acrobat on my machine, but without effect

So, does anybody know which extension the blink web rendering uses to show PDFs
Or does anybody know how to set the default zoom for PDF?

Thanks,
Piotr

**
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: Special character euro sign in JSON string

2019-06-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

We use Oracle to generate the JSON, and use as character set WE8ISO8859P1
Although everything else works fine with this charset (also the euro sign), it 
seems that with JSON Oracle converts the euro sign to \u0080 when using 
WE8ISO8859P1 instead of \u20AC

So, the problem is with JSON in Oracle and WE8ISO8859P1
Unfortunately knowing this doesn't solve my problem

Gr,
Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako 
> Verzonden: dinsdag 11 juni 2019 10:03
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Special character euro sign in JSON string
> 
> JSON string should be represented in unicode
> 
> https://www.json.org
> 
> \u0080 is not the euro sign.
> 
> $euro:=JSON Parse("{\"euro\":\"\\u20AC\"}")
> 
> > 2019/06/11 16:22、Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com>のメール:
> > When I use $obj:=JSON Parse($json_string) I don't get the euro sign
> > returned Does anybody know what the problem is?
> 
> 
> 

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

Special character euro sign in JSON string

2019-06-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I have a JSON string with a special character, the euro sign
This character is represented in JSON by u0080

An example of part of the JSON string in 4D when watching in the debugger is 
 ,"amount":"250.00","valutasign":"\\u0080", 

When I use $obj:=JSON Parse($json_string) I don't get the euro sign returned
Does anybody know what the problem is?

Gr,
Piotr

**
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: Webarea Embedded rendering engine show blank pages in 64-bit

2019-05-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Thanks for your input.

We generate html on the fly, with data retrieved by queries on the database
I preferably don't want to store these temp html files on disk, ending up with 
cleaning up a lot of temp pages

As said, on 4Dv17R4 32-bit, WA SET PAGE CONTENT works fine with the embedded 
rendering engine (I also use css and javascript in the html)

Maybe you, or someone else, know of good reasons why this shouldn't work with 
Blink on 4Dv17 64-bit?

Gr,
Piotr


> Piotr,
> I use web areas quite a lot. WA SET PAGE CONTENT is tricky to make work if
> it's not initialized and generally not on the first page. I create pages on
> disk instead in a WA folder I setup in Resources. This also gives me a
> place to store Assets (CSS, JS, etc.) I use in the pages. Writing the pages
> to disk also lets you troubleshoot them in an actual browser which can be
> helpful during development. It also gives you the option to design a
> default page for your web areas.


Van: Piotr Chabot Stadhouders 
Verzonden: dinsdag 7 mei 2019 19:21
Aan: 4D iNUG Technical <4d_tech@lists.4d.com>
CC: Piotr Chabot Stadhouders 
Onderwerp: Webarea Embedded rendering engine show blank pages in 64-bit

Hi,

Tested on Windows

In 4Dv17R4 32-bit I have some html pages that are shown in a Webarea
Because I need "Access 4D methods", I use the embedded rendering engine
Also, I like to use the embedded rendering engine in 64-bit because of Blink

However, when using embedded rendering engine, the pages (that work in v17R4 
32-bit) don't show in 4Dv17R5 64-bit
When NOT using the embedded rendering engine the pages show up, but I can't use 
the "Access 4D methods"

What could be the problem?

Thanks,
Piotr

**
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: Webarea Embedded rendering engine show blank pages in 64-bit

2019-05-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

I found out that when using WA SET PAGE 
CONTENT(*;$area_object;$html;"file:///") it doesn't show up, but when saving it 
to file and assign "file:///"+Document to the URL variable it DOES

The docs say:
"Note: Under Windows, you cannot call this command unless a page has already 
been loaded previously into the Web area. If necessary, you can pass the 
"about:blank" URL in order to load a blank page."
But I don't know how to pass the "about:blank" URL, or this also doesn't work

Gr,
Piotr

> -Oorspronkelijk bericht-
> Van: Pat Bensky 
> Verzonden: dinsdag 7 mei 2019 20:03
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Webarea Embedded rendering engine show blank pages in 64-
> bit
> 
> Piotr,
> I have noticed the same problem. I guess it needs to be reported as a bug :) 
> Pat
> 
> On Tue, 7 May 2019 at 18:21, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > Hi,
> >
> > Tested on Windows
> >
> > In 4Dv17R4 32-bit I have some html pages that are shown in a Webarea
> > Because I need "Access 4D methods", I use the embedded rendering
> > engine Also, I like to use the embedded rendering engine in 64-bit
> > because of Blink
> >
> > However, when using embedded rendering engine, the pages (that work in
> > v17R4 32-bit) don't show in 4Dv17R5 64-bit When NOT using the embedded
> > rendering engine the pages show up, but I can't use the "Access 4D
> > methods"
> >
> > What could be the problem?
> >
> > Thanks,
> > Piotr
> >
> >
> 
> **
> > 4D Internet Users Group (4D iNUG)
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >
> 
> **
> 
> 
> 
> --
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *

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

Webarea Embedded rendering engine show blank pages in 64-bit

2019-05-07 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Tested on Windows

In 4Dv17R4 32-bit I have some html pages that are shown in a Webarea
Because I need "Access 4D methods", I use the embedded rendering engine
Also, I like to use the embedded rendering engine in 64-bit because of Blink

However, when using embedded rendering engine, the pages (that work in v17R4 
32-bit) don't show in 4Dv17R5 64-bit
When NOT using the embedded rendering engine the pages show up, but I can't use 
the "Access 4D methods"

What could be the problem?

Thanks,
Piotr

**
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 area and not secure site

2019-04-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeremy,

Thanks for your thoughts, but it looks all has to do with having a https url 
without having a valid certificate for the web site
It looks like the 64-bit embedded web rendering engine doesn’t show anything in 
that case
When I make the web server accept using http all works fine, what of course 
isn’t desirable

So: When using 64-bit embedded web rendering and make a call to an unsecure 
website (https without valid certificate) it show a blank page
I would expect the same behavior as with Chrome, and this certainly isn’t just 
a blank page

Van: Jeremy French 
Verzonden: donderdag 11 april 2019 16:35
Aan: 4D iNUG Technical <4d_tech@lists.4d.com>
CC: Piotr Chabot Stadhouders 
Onderwerp: Re: Web area and not secure site

Have you tried making these calls in the form’s “form method”.

In the form’s “On Load” event

 WA OPEN URL(*;$objName_webArea_t;"about:blank")
 WA SET PAGE CONTENT(*;$objName_webArea_t;"";"file:///“)
 SET TIMER(-1)
In the form’s “On Timer” event

 SET TIMER(0)
 WA OPEN URL(*;$objName_webArea_t;"about:blank")
 WA SET PAGE CONTENT(*;$objName_webArea_t;"";"file:///“)

Also see:
https://doc.4d.com/4Dv17/4D/17.1/SET-TIMER.301-4178784.en.html


On Apr 11, 2019, at 3:25 AM, Piotr Chabot Stadhouders via 4D_Tech 
<4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> wrote:

 I don't use the embedded version because
* in 64-bit (Blink) I get an blank HTML page, and nothing is shown

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

Web area and not secure site

2019-04-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v17R3 Windows

We have an internal website (development) that we want to access in a web area
Because its an internal URL, and for now in development, we don't have a 
certificate for it right now
So, when using Internet explorer, we get a message "This site is not secure"
However, we can proceed and after seeing the error DLG_FLAGS_INVALID_CA, 
DLG_FLAGS_SEC_CERT_CN_INVALID we can force to go further

When using a webarea (not embedded, because embedded looks nothing like it 
should be) however I get the message "This site is not secure", but with 
errorcode 0
And more important, I am not able to proceed to the website

Does anybody know how I can solve this problem?

Gr,
Piotr

P.S. I don't use the embedded version because
* in 32-bit it looks nothing like it should
* in 64-bit (Blink) I get an blank HTML page, and nothing is shown

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

Best way to detect pasting a picture in 4D Write Pro

2019-04-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

Does anybody know what is the best way to detect pasting a picture in 4D Write 
Pro?

I understand I can do it with some form event type, but I think I have to run 
this code every time something is pasted into the Write Pro Area, so also when 
pasting text for example

Gr,
Piotr

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

close box of the MDI Application window in 64-bit is not triggered

2019-02-01 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

When using the close box of the Application window in 32-bit the form method of 
the frontmost window is triggered.
However, when using the close box of the MDI Application window in 64-bit 
nothing happens.

Does anybody know why this is?

Gr,
Piotr

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

Re: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-31 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

> if you feel you have reason to assign a CPU to an application,
> there is CPU affinity (Google the word affinity)."

Thanks for the tip


> if you run 4D (64-bit, v17) normally on Windows,
> the work will spread across multiple core naturally.

Can you confirm that this is only with 64-bit 4D applications, not with 32-bit 
4D applications?


Gr,
Piotr



it is normally a good thing that work is spread across multiple cores.

it prevents the CPU from over heating.



a cooperative thread may use many cores,

just not "at the same time".



anyway,

if you feel you have reason to assign a CPU to an application,

there is CPU affinity (Google the word affinity).



but you now reveal that you are using Citrix.

so your question is really about Citrix.



if you run 4D (64-bit, v17) normally on Windows,

the work will spread across multiple core naturally.



you can also launch multiple instances of 4D,

in which case several cores may be used concurrently.



however, engine merged applications are prevented from starting a second 
instance,

because it has its own private structure and data 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: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

Now for me an important question: is 4D for Oci pre-emptive?

In short: We use for 90% UI and 4D for OCI commands. How can I make use of more 
than 1 core?

Nu colleague says Word and Excel also use more cores, so why can't we?

Gr,
Piotr


I see, this is relatively new development - I have sent a request to the Doc 
Team to update the documentation to reflect this.



In either case, it would appear that although the SDK has been updated, the 
individual plugin developers would still need to update their plugins and make 
those preemptive versions available... and even then, there are still certain 
plugin calls that are not thread safe, so it shouldn’t be expected that plugins 
will just work in preemptive mode unless they are using the latest SDK and 
specifically coded as such.



Just because the SDK is being made preemptive does not mean that all plugins 
are inherently preemptive also.



-Tim

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

RE: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeff,

Thanks again for your answer.

I understand, but I think I am having a problem.

Suppose our app depends heavily on UI (and it does)
Suppose our app starts 8 processes showing 8 dialogs showing all kind of 
variables and arrays, and that need to be refreshed every X seconds
Then no UI is out of the question, and pre-emptive methods don’t help me a lot 
I guess.
Now suppose I have a machine with 4 cores (What I have heard it is getting 
difficult to get a machine without multi-core)
How can I use the 4 cores to its full extend?
I am hoping you are not going to say I can’t

So, when it is impossible to use 4 cores within the application, is there a way 
to assign a core to the application?
So when starting the application tell the machine to use core 1
When starting a second instance of the application tell the machine to use core 
2
Etc.

We are in a citrix environment, and all instances of our 4D Volume Desktop 
application now only use 1 core, and even worse it is using THE SAME core
Now Citrix splits the time assigned to 1 4D instance by the number of 4D 
instances launched, while the other cores are doing totally nothing

Is there a solution for this?
By the way, and maybe for some of you this is obvious, but not for me: why must 
there be no UI involved?
Wy can’t I say in 4D “start a new process showing a dialog and use core 2”, 
“start another process showing a dialog and use core 4”?

Gr,
Piotr


No, not at all. You have to first mark the method that's called first from New 
Process as preemptive. That method, plus all methods called by that method, and 
all methods called by those methods, must be written in a preemptive-safe 
manner (i.e. no UI, no unsafe commands, no plug-ins).

If all that happens, that process will be scalable across cores.

> On Jan 30, 2019, at 1:25 PM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:
>
> So, does 4D automagically use more cores in 4D 64-bit or what?
> When I follow all pre-emptive advise in the docs or from the iNUG, do I have 
> a multi-core application?
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Lutz, Jeffrey,

Thanks for your answers.

So it is about using 64-bit, and writing preemptive-safe methods
I see a lot of 4D commands turning into preemptive-safe commands, so that's good

Now for me probably work has to be done, but I am confused what is needed.

  1.  We don't use 4D tables, we use 4D for OCI and variables and arrays
  2.  We don't use 4D server, we use 4D Volume desktop
  3.  We start 1 or more processes (new process) in which we show a dialog with 
data (the variables and arrays)
  4.  We use a whole lot more in 4D, but nothing to do with 4D datafiles / 4D 
data query 4D queries etc.

So, does 4D automagically use more cores in 4D 64-bit or what?
When I follow all pre-emptive advise in the docs or from the iNUG, do I have a 
multi-core application?

Gr,
Piotr


Compiled 64-bit Volume Desktop can use more than one core, depending upon how 
you write your code. 64-bit 4D is required, as is being compiled, in the 
current implementation.

You need to write preemptive-safe methods and your methods need to be marked as 
preemptive in the method properties.

> On Jan 30, 2019, at 4:48 AM, Pat Bensky via 4D_Tech 
> <4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:
>
> Piotr
> I believe the "bitness" has more to do with how it uses RAM than cores.
> Pat
>
> On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:
>
>> Hi all,
>>
>> First of all, I must say I am no hardware expert, so maybe this is a
>> stupid question.
>>
>> It seems that 4D 32-bit Volume desktop only uses 1 core.
>> But does 4D 64-bit Volume desktop use all available cores?
>>
>> Gr,
>> Piotr
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Thanks for your answer.

So then the real questions are :

  *   Is it correct that 4D Volume desktop uses only 1 core?
  *   How can I enable 4D Volume desktop to use all cores?

Gr,
Piotr


Piotr
I believe the "bitness" has more to do with how it uses RAM than cores.
Pat

On Wed, 30 Jan 2019 at 09:13, Piotr Chabot Stadhouders via 4D_Tech <
4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:

> Hi all,
>
> First of all, I must say I am no hardware expert, so maybe this is a
> stupid question.
>
> It seems that 4D 32-bit Volume desktop only uses 1 core.
> But does 4D 64-bit Volume desktop use all available cores?
>
> Gr,
> Piotr
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Does 4D 64-bit Volume desktop use more than 1 core?

2019-01-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

First of all, I must say I am no hardware expert, so maybe this is a stupid 
question.

It seems that 4D 32-bit Volume desktop only uses 1 core.
But does 4D 64-bit Volume desktop use all available cores?

Gr,
Piotr

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

close box of the MDI window in 64-bit is not triggered

2019-01-24 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

When using the close box of the MDI window in 32-bit the form method of the 
frontmost window is triggered.
However, when using the close box of the MDI window in 64-bit nothing happens.

Does anybody know why this is?

Gr,
Piotr
**
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
**

SDI on WIndows doesnt respect a toolbar

2019-01-23 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I am testing the SDI interface on Windows with 4Dv17 64-bit.

I am happy to get rid of the gray background, however, the windows now don't 
respect the use of a toolbar anymore
I can maximize the windows, and the titlebar gets under the toolbar, so no way 
to move or close the window anymore.

Is this normal behavior?
Does this make sense?
Does using a toolbar with SDI make sense (I think it does)
Is this a bug?
Is there anything I can do about it?

Gr,
Piotr


**
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: Calling java

2018-12-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Thanks John, I will take a look at it!

Gr,
Piotr


Creating a plugin would be pretty involved. If LAUNCH EXTERNAL PROCESS is too 
slow, I would look into something like JSON RPC. For example,

https://www.jsonrpc.org/archive_json-rpc.org/implementations.html

https://github.com/briandilley/jsonrpc4j

John DeSoi, Ph.D.


> On Dec 4, 2018, at 1:48 AM, Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:
>
> We need to call some java classes from within 4D.
> These classes deliver an interface to interact with a smart card connected to 
> the local PC
> Does anybody have an opinion how to handle this?
> I don't see any other way than to use these java classes, and one way or the 
> other call this java in 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
**

Calling java

2018-12-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

We need to call some java classes from within 4D.
These classes deliver an interface to interact with a smart card connected to 
the local PC
Does anybody have an opinion how to handle this?
I don't see any other way than to use these java classes, and one way or the 
other call this java in 4D

Gr,
Piotr

**
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: Miyako zip plugin

2018-11-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Ok, thanks.
Then I will handle this another way

Gr,
Piotr


Hello,

the is no code in the plugin to handle wild card matching.

you must specify a folder or file.

that said, the ZIP_Without_enclosing_folder (4) option might work in your 
situation.

https://github.com/miyako/4d-plugin-zip

Van: Piotr Chabot Stadhouders
Verzonden: dinsdag 13 november 2018 17:24
Aan: 4D iNug Technical <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>
Onderwerp: Re: Miyako zip plugin

Hi Kirk,

Thanks for the tip. I have downloaded the latest version
Unfortunately, now I end up with a zip file with in it, instead of text files, 
empty folders named after the text files.

Gr,
Piotr


Piotr,
If you haven't already check github to see if you are using the most recent
version of this plugin. It's one that Miyako maintains and updates
regularly. This may be an issue he's fixed already.
https://github.com/miyako?page=3=repositories

On Tue, Nov 13, 2018 at 2:33 AM Piotr Chabot Stadhouders via 4D_Tech <
4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:

> Hi Miyako, or others,
>
> We are using Miyako's zip plugin, thanks for that!
>
> But now we are having difficulties (on Windows) with zipping text files
> within a folder.
> Previously we used the 7zip plugin from Miyako, and used *.txt to define
> all text files within the folder
>
> But now, when I use [FOLDER]\*.txt as source path I end up with a zip file
> containing the text files, but the text files are all empty
>
> $success:=Zip
> ($source_path;$dest_path;$password;ZIP_Compression_level_1;ZIP_With_attributes)
>
> Am I doing something wrong? What is the way to compress all text files
> within a folder without the enclosing folder?
>
> Thanks in advance,
> Piotr
>
> **
> 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...@xxx.xxx
> **
**
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: Miyako zip plugin

2018-11-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Thanks for the tip. I have downloaded the latest version
Unfortunately, now I end up with a zip file with in it, instead of text files, 
empty folders named after the text files.

Gr,
Piotr


Piotr,
If you haven't already check github to see if you are using the most recent
version of this plugin. It's one that Miyako maintains and updates
regularly. This may be an issue he's fixed already.
https://github.com/miyako?page=3=repositories

On Tue, Nov 13, 2018 at 2:33 AM Piotr Chabot Stadhouders via 4D_Tech <
4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> wrote:

> Hi Miyako, or others,
>
> We are using Miyako's zip plugin, thanks for that!
>
> But now we are having difficulties (on Windows) with zipping text files
> within a folder.
> Previously we used the 7zip plugin from Miyako, and used *.txt to define
> all text files within the folder
>
> But now, when I use [FOLDER]\*.txt as source path I end up with a zip file
> containing the text files, but the text files are all empty
>
> $success:=Zip
> ($source_path;$dest_path;$password;ZIP_Compression_level_1;ZIP_With_attributes)
>
> Am I doing something wrong? What is the way to compress all text files
> within a folder without the enclosing folder?
>
> Thanks in advance,
> Piotr
>
> **
> 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...@xxx.xxx
> **
**
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
**

Miyako zip plugin

2018-11-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako, or others,

We are using Miyako's zip plugin, thanks for that!

But now we are having difficulties (on Windows) with zipping text files within 
a folder.
Previously we used the 7zip plugin from Miyako, and used *.txt to define all 
text files within the folder

But now, when I use [FOLDER]\*.txt as source path I end up with a zip file 
containing the text files, but the text files are all empty

$success:=Zip 
($source_path;$dest_path;$password;ZIP_Compression_level_1;ZIP_With_attributes)

Am I doing something wrong? What is the way to compress all text files within a 
folder without the enclosing folder?

Thanks in advance,
Piotr

**
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 and SafeSign Identity Client

2018-11-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I need to use a card reader in our 4D software
The authority that provides the card, wants us to use the SafeSign Identity 
Client

Does anybody have experience using SafeSign Identity Client along with 4D?

Gr,
Piotr

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

Use HID Omnikey 3121 USB reader in 4D

2018-09-27 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi All,

I recently saw a discussion about using USB barcode scanners in 4D

Maybe this is an obvious question, but does anybody know what is the best way 
to interface with an USB (smart card) reader in 4D?
We are going to use the HID Omnikey 3121

Thanks in advance,
Piotr

**
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 A3 format on windows when scaling is not possible

2018-09-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Olivier,

The example in the docs for the command PAGE SETUP is indeed kind of what I am 
talking about.
But instead of having different forms with a scaling setting I have different 
page setup forms with a “paper size” setting (A3 portrait, A3 landscape), 
because also forms with a scaling setting (set  on printer 1) have no effect 
when used with printer 2 when this printer is unable to scale

I know I can get the paper width / height and with some math move / resize 
objects on the form

However, we already have tens of output forms, and unfortunately not only with 
a few columns, but with a lot of fields on different parts of the form
Moving around these fields is no option for me.

My boss doesn’t understand why this scaling is a problem, because as he sees it 
“there are a lot of applications where printing a lot of small sized info on an 
A4 paper is no big deal at all”

Gr,
Piotr




Hi Piotr,

I guess, you are doing what is described in the documentation for PAGE SETUP:

http://doc.4d.com/4Dv16/4D/16.4/PAGE-SETUP.301-3978038.en.html

The idea of "AUTOMATIC SCALED PRINTING" ?

Am I correct, that the goal is to print a list scaled in order to fit on a 
"standard" size (e.g. A4).

If my assumptions are correct, then we are dealing with the problem "a piece of 
paper has limited size, screens have scroll bars".

One solution is indeed to scale. But... as the doc for SET PRINT OPTION says: 
"Be careful, some printers do not allow you to modify the scale..."

The other solution is to distribute the width of the columns of a report (e.g. 
a Listbox) relatively to the available width of the paper.

The available width on paper depends on the printer (paper size, printable 
area) and print options (landscape vs. portrait).

In my component, I have a method that does this kind of printing. The idea at 
the beginning was to have a generic way to print listboxes, but it could also 
be a 2D array:

https://flury-software.ch/a-swiss-army-knife-for-4d/

Check out the method "Uty_PrintListBox"

Disclaimer: this is not a magic solution. It's just an other try to print what 
can be endless on screen (scroll bars) to the limited size of paper.

HTH,

Olivier

Van: Piotr Chabot Stadhouders
Verzonden: woensdag 26 september 2018 13:55
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: RE: Printing A3 format on windows when scaling is not possible

Hi Miyako,

Thanks for your anwer.

Ok, I understand what you are saying, and in some cases I already use the SET 
PRINT OPTION command

But when I want to print a report without interaction with the user, and I want 
to print it to a certain paper size, I can do two things I guess:

  1.  Use SET PRINT OPTION with Paper option and value1=”A3”. Does using paper 
name = “A3” always work? Or do I have to get the paper names first and find 
some paper name with A3 in it?
  2.  Use SET PRINT OPTION with a custom width and height. Does this always 
work, for every printer?

Gr,
Piotr


Van: Piotr Chabot Stadhouders
Verzonden: woensdag 26 september 2018 13:46
Aan: Piotr Chabot Stadhouders 
mailto:p.stadhoud...@timeff.com>>
Onderwerp: RE: Printing A3 format on windows when scaling is not possible

there should be no reason to use PAGE SETUP, although there is nothing wrong 
about using it.

it's just a convenient shorthand that dates back to the times when 4D had far 
fewer commands.



http://doc.4d.com/4Dv16/4D/16.2/Print-settings-to-BLOB.301-3432852.en.html

http://doc.4d.com/4Dv16/4D/16.4/SET-PRINT-OPTION.301-3978064.en.html

Van: Piotr Chabot Stadhouders
Verzonden: woensdag 26 september 2018 11:51
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: Printing A3 format on windows when scaling is not possible

Hi all,

I am working for over 20 years with 4D now, but still I am having troubles with 
printing reports on Windows / OSX
On forehand I want to say it sure can be me that is the problem
The most problematic is when I want to print a lot on a report and scaling 
comes in to play

Because scaling on a lot of printers is not possible, and I don’t know on 
forehand to what printer is printed, I cannot use scaling in my reports
Because almost all of our customers print to PDF, the best solution I found is :

  *   To create a form just to use for page setup.
  *   This form has an A3 page setup, which is kind of similar of scaling 70%
  *   Print to PDF
  *   Let Acrobat Reader do the scaling, and let the user print scaled to A4 on 
their printer

However, now and then, after a couple of months/years, also this A3 page setup 
gets “corrupted” i.e. when checking the page setup on the form it isn’t A3 
anymore but is has been reset to A4

So…. Does anybody know of an ultimate solution for this problem, and works 
multi platform?

Gr,
Piotr

**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: 

RE: Printing A3 format on windows when scaling is not possible

2018-09-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Thanks for your anwer.

Ok, I understand what you are saying, and in some cases I already use the SET 
PRINT OPTION command

But when I want to print a report without interaction with the user, and I want 
to print it to a certain paper size, I can do two things I guess:

  1.  Use SET PRINT OPTION with Paper option and value1=”A3”. Does using paper 
name = “A3” always work? Or do I have to get the paper names first and find 
some paper name with A3 in it?
  2.  Use SET PRINT OPTION with a custom width and height. Does this always 
work, for every printer?

Gr,
Piotr


Van: Piotr Chabot Stadhouders
Verzonden: woensdag 26 september 2018 13:46
Aan: Piotr Chabot Stadhouders 
Onderwerp: RE: Printing A3 format on windows when scaling is not possible

there should be no reason to use PAGE SETUP, although there is nothing wrong 
about using it.

it's just a convenient shorthand that dates back to the times when 4D had far 
fewer commands.



http://doc.4d.com/4Dv16/4D/16.2/Print-settings-to-BLOB.301-3432852.en.html

http://doc.4d.com/4Dv16/4D/16.4/SET-PRINT-OPTION.301-3978064.en.html

Van: Piotr Chabot Stadhouders
Verzonden: woensdag 26 september 2018 11:51
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: Printing A3 format on windows when scaling is not possible

Hi all,

I am working for over 20 years with 4D now, but still I am having troubles with 
printing reports on Windows / OSX
On forehand I want to say it sure can be me that is the problem
The most problematic is when I want to print a lot on a report and scaling 
comes in to play

Because scaling on a lot of printers is not possible, and I don’t know on 
forehand to what printer is printed, I cannot use scaling in my reports
Because almost all of our customers print to PDF, the best solution I found is :

  *   To create a form just to use for page setup.
  *   This form has an A3 page setup, which is kind of similar of scaling 70%
  *   Print to PDF
  *   Let Acrobat Reader do the scaling, and let the user print scaled to A4 on 
their printer

However, now and then, after a couple of months/years, also this A3 page setup 
gets “corrupted” i.e. when checking the page setup on the form it isn’t A3 
anymore but is has been reset to A4

So…. Does anybody know of an ultimate solution for this problem, and works 
multi platform?

Gr,
Piotr

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

Printing A3 format on windows when scaling is not possible

2018-09-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

I am working for over 20 years with 4D now, but still I am having troubles with 
printing reports on Windows / OSX
On forehand I want to say it sure can be me that is the problem
The most problematic is when I want to print a lot on a report and scaling 
comes in to play

Because scaling on a lot of printers is not possible, and I don’t know on 
forehand to what printer is printed, I cannot use scaling in my reports
Because almost all of our customers print to PDF, the best solution I found is :

  *   To create a form just to use for page setup.
  *   This form has an A3 page setup, which is kind of similar of scaling 70%
  *   Print to PDF
  *   Let Acrobat Reader do the scaling, and let the user print scaled to A4 on 
their printer

However, now and then, after a couple of months/years, also this A3 page setup 
gets “corrupted” i.e. when checking the page setup on the form it isn’t A3 
anymore but is has been reset to A4

So…. Does anybody know of an ultimate solution for this problem, and works 
multi platform?

Gr,
Piotr

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

Cursor position in 4D method editor is wrong a few pixels

2018-09-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Tested on Windows 4D v17.0
When I click with my mouse in a text string (enclosed by double quotes) in the 
4D method editor, the cursor position is often wrong a few pixels
Then it looks like the cursor is after character Y, but it IS after character X 
(1 character before Y)
Does anybody else see this behavior?
What can I do about this?
It is difficult when you need to change the text and find out you are changing 
at the wrong position

Gr,
Piotr


**
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 Area display PDF

2018-08-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeff,

Thanks for sharing!

> -Oorspronkelijk bericht-
> Van: Jeffrey Kain 
> Verzonden: maandag 20 augustus 2018 19:20
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Re: Web Area display PDF
> 
> I wasn’t able to get it working in Windows. It seems really close though.  But
> the IE rendering engine is so ancient.
> 
> It ought to work fine on 4D Windows 64-bit with a Blink web area, but haven’t
> tried it yet.
> 
> > On Aug 20, 2018, at 1:13 PM, Randy Engle <4d.l...@xc2.us> wrote:
> >
> > Jeff,
> >
> > We are "Windows Only"

**
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 Area display PDF

2018-08-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

About 3 months ago there was a discussion about viewing PDFs in a webarea on 
High Sierra
Then it was the believe that when using this in 4D 64-bit the problem was solved

However, now we are testing 64-bit for the first time, and when viewing a PDF 
in a webarea on High Sierra it crashes after viewing only two PDFs

Do you, or someone else, what is the problem with this? A solution would be 
appreciated.

Gr,

Piotr



there was a word on the release note.

evidently it was caused by the 32-bit version of PDFKit (Apple framework, part 
of the OS)



http://download.4d.com/Documents/Products_Documentation/LastVersions/Line_16/VIntl/4D_v16_3_ReleaseNotes.pdf



> 2018/05/15 17:10、Piotr Chabot Stadhouders via 4D_Tech 
> <4d_t...@xxx.xxx<mailto:4d_t...@xxx.xxx>> のメール:

> We also have problems viewing PDF in a webarea with 4D 32-bit on High Sierra

> Do you know if this is a 32-bit problem?

> So going to 64-bit would solve the problem?

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

RE: UUID version 4 needed

2018-07-07 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip, Keith,

Thanks Chip for the tip!
But still, isn't it strange that 4D v16 does generate UUID where on WIndows the 
15th hex digit is a 4

Thanks Keith for testing this on OSX, but unfortunately I need this on both 
platforms.

Is there anybody that can confirm that on WIndows 4D generates it "the wrong 
way"?
Or is there an explanation for this?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide <4d_o...@pghrepository.org>
> Verzonden: vrijdag 6 juli 2018 18:02
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> after just a bit of google-fu
> I found this php routine to generate a UUID. Since, in principle 4D supports
> php... maybe you can just generate your own.
> 
> if (!function_exists('com_create_guid')) {
>   function com_create_guid() {
> return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
> mt_rand( 0, 0x ), mt_rand( 0, 0x ),
> mt_rand( 0, 0x ),
> mt_rand( 0, 0x0fff ) | 0x4000,
> mt_rand( 0, 0x3fff ) | 0x8000,
> mt_rand( 0, 0x ), mt_rand( 0, 0x ), mt_rand( 0, 0x )
> );
>   }
> }
> 
> source:
> https://helloacm.com/how-to-create-uuid-in-php/
> 
> also there is a bunch of discussion on StackOVerflow regarding generating a
> UUID, in various languages, and platforms
> 
> 
> On Fri, 6 Jul 2018 15:33:48 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> > Hi,
> >
> > The Win32API command sys_GetGUID does return a version 4 UUID
> >
> > So on Windows :
> > Win32API generates a version 4 UUID --> 13th hex digit is a 4
> > 4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4
> >
> >
> >> -Oorspronkelijk bericht-
> >> Van: Dennis, Neil 
> >> Verzonden: vrijdag 6 juli 2018 16:25
> >> Aan: Piotr Chabot Stadhouders ; 4D iNug
> >> Technical <4d_tech@lists.4d.com>
> >> Onderwerp: RE: UUID version 4 needed
> >>
> >>> And in fact, my 4D generated UUID is rejected by the web service,
> >>> saying it
> >> isn't a 4 version UUID
> >>
> >> Very possible, it has been a while since I looked into it and I was
> >> going off of my
> >> fuzzy memory.
> >>
> >> Neil
> >>
> >>
> >>
> >>
> >> --
> >>
> >>
> >> Privacy Disclaimer: This message contains confidential information and is
> >> intended only for the named addressee. If you are not the named addressee
> >> you should not disseminate, distribute or copy this email. Please
> >> delete this
> >> email from your system and notify the sender immediately by replying
> >> to this
> >> email.  If you are not the intended recipient you are notified that
> >> disclosing,
> >> copying, distributing or taking any action in reliance on the
> >> contents of this
> >> information is strictly prohibited.
> >>
> >> The Alternative Investments division of UMB Fund Services provides a
> >> full range
> >> of services to hedge funds, funds of funds and private equity
> >> funds.  Any tax
> >> advice in this communication is not intended to be used, and cannot
> >> be used, by
> >> a client or any other person or entity for the purpose of (a)
> >> avoiding penalties
> >> that may be imposed on any taxpayer or (b) promoting, marketing, or
> >> recommending to another party any matter addressed herein.
> >
> 
> **
> > 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
> >
> 
> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: UUID version 4 needed

2018-07-06 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

The Win32API command sys_GetGUID does return a version 4 UUID

So on Windows :
Win32API generates a version 4 UUID --> 13th hex digit is a 4
4D v16 does not generate a version 4 UUID --> 15th hex digit is a 4


> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: vrijdag 6 juli 2018 16:25
> Aan: Piotr Chabot Stadhouders ; 4D iNug
> Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: UUID version 4 needed
> 
> > And in fact, my 4D generated UUID is rejected by the web service, saying it
> isn't a 4 version UUID
> 
> Very possible, it has been a while since I looked into it and I was going off 
> of my
> fuzzy memory.
> 
> Neil
> 
> 
> 
> 
> --
> 
> 
> Privacy Disclaimer: This message contains confidential information and is
> intended only for the named addressee. If you are not the named addressee
> you should not disseminate, distribute or copy this email. Please delete this
> email from your system and notify the sender immediately by replying to this
> email.  If you are not the intended recipient you are notified that 
> disclosing,
> copying, distributing or taking any action in reliance on the contents of this
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a full 
> range
> of services to hedge funds, funds of funds and private equity funds.  Any tax
> advice in this communication is not intended to be used, and cannot be used, 
> by
> a client or any other person or entity for the purpose of (a) avoiding 
> penalties
> that may be imposed on any taxpayer or (b) promoting, marketing, or
> recommending to another party any matter addressed herein.
**
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: UUID version 4 needed

2018-07-06 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Dennis,

There is something strange:
Indeed, when I look at the generated UUID in 4D the 15th hex digit is always 4
But, as far as I know the docs say : "set the four most significant bits of the 
7th byte to 0100'B, so the high nibble is 4"
This means that the 13th hex digit must be 4

And in fact, my 4D generated UUID is rejected by the web service, saying it 
isn't a 4 version UUID

Has this something to do with byte swapping or something? What should I do?
This has been tested with 4D v16R6 on a 64-bit Windows laptop

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: donderdag 5 juli 2018 17:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> > Does anybody know how to generate an UUID version 4
> 
> Doesn't 4D already generate version 4 UUIDs? In version 4 the 15th hex digit 
> is
> always a 4, it seems that this is what 4D uses.
> 
> If you need a good explanation, of the various types, wikipedia works
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> Neil
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Privacy Disclaimer: This message contains confidential information and is
> intended only for the named addressee. If you are not the named addressee
> you should not disseminate, distribute or copy this email. Please delete this
> email from your system and notify the sender immediately by replying to this
> email.  If you are not the intended recipient you are notified that 
> disclosing,
> copying, distributing or taking any action in reliance on the contents of this
> information is strictly prohibited.
> 
> The Alternative Investments division of UMB Fund Services provides a full 
> range
> of services to hedge funds, funds of funds and private equity funds.  Any tax
> advice in this communication is not intended to be used, and cannot be used, 
> by
> a client or any other person or entity for the purpose of (a) avoiding 
> penalties
> that may be imposed on any taxpayer or (b) promoting, marketing, or
> recommending to another party any matter addressed herein.
**
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: UUID version 4 needed

2018-07-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Neil,

For some reason I thought it is not version 4. I hope you are right!

@Steven :
Unfortunately the webservice we are talking with demands a message with a UUID 
version 4 generated message ID. Don't ask me why.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Dennis, Neil 
> Verzonden: donderdag 5 juli 2018 17:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: UUID version 4 needed
> 
> > Does anybody know how to generate an UUID version 4
> 
> Doesn't 4D already generate version 4 UUIDs? In version 4 the 15th hex digit 
> is
> always a 4, it seems that this is what 4D uses.
> 
> If you need a good explanation, of the various types, wikipedia works
> https://en.wikipedia.org/wiki/Universally_unique_identifier
> 
> Neil
> 

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

UUID version 4 needed

2018-07-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

I need to generate an UUID but it MUST be version 4
I know in 4D there is the command Generate UUID and the NTK plugin has the 
command NTK Create UUID but as far as I know they both are not UUID version 4

Does anybody know how to generate an UUID version 4?

Thanks,

Piotr

**
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: Any way to detect change to 4D Write Pro orientation.

2018-06-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Maybe you are right, thanks for the suggestion, but I "don't want to even go 
there".
I could also connect a beamer to my laptop and beam write Pro on the wall in 
500% (Dutch humor)

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Pat Bensky 
> Verzonden: dinsdag 26 juni 2018 12:33
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Any way to detect change to 4D Write Pro orientation.
> 
> Piotr,
> Perhaps you will need to:
> - Make it enterable
> - Give it the focus
> - Set the zoom
> - Make it non-enterable
> - Make the other object the focus
> 
> A bit clunky ... but should work OK?
> 
> Pat
> 
> On Tue, 26 Jun 2018 at 07:54, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > Hi John,
> >
> > I am already using the 4D Write Pro toolbar, and I like it! It also
> > has most things the user needs, and I am also able to modify and
> > extend it. I can't wait for a new version to show up.
> > However, as said, I am talking about programmatically setting
> > defaults, because I don't think users like it when I say they have to
> > click 5 buttons every time to create the view they want For some
> > defaults we have to use INVOKE ACTION and even more the Pro area has
> > got to have the focus
> >
> > Besides the fact that I find this not intuitive there is one thing I
> > don't
> > understand:
> > As I said (can someone confirm this?) the area has to have the focus
> > to use INVOKE ACTION for setting the zoom for example.
> > But what if I want to show an area that is not enterable / disabled
> > and I want to set the zoom to 150%? Is this even possible?
> >
> > Gr,
> >
> > Piotr
> >
> >
> > > -Oorspronkelijk bericht-
> > > Van: JOHN BAUGHMAN 
> > > Verzonden: donderdag 21 juni 2018 10:04
> > > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > > Onderwerp: Re: Any way to detect change to 4D Write Pro orientation.
> > >
> > > Hi Piotr,
> > >
> > >   I highly recommend the 4D Write-Like toolbar…
> > >
> > >
> > >   http://download.4d.com/4DBlog/Tips/4DWriteLikeToolbarDemo.zip
> > >
> > >   It has nearly everything needed including zoom and view mode
> > > that
> > you
> > > mentioned. If for nothing else it’s  great to use as an example of
> > > how to manage most of the 4D Write Pro attributes. I have adopted it
> > > for all my
> > 4D
> > > Write Pro areas with only a couple of additions. I added “4D
> > Expressions” to the
> > > Insert menu and added the orientation icons I mentioned earlier.
> > > Both
> > were
> > > very easy to add using the tool bar's example.
> > >
> > >
> > > John
> > >
> > >
> > > John Baughman
> > > 1331 Auwaiku Street
> > > Kailua, Hawaii  96734
> > > (808) 262-0328
> > > john...@hawaii.rr.com
> > >
> > > > On Jun 20, 2018, at 9:45 PM, Piotr Chabot Stadhouders via 4D_Tech
> > > <4d_tech@lists.4d.com> wrote:
> > > >
> > > > Hi John,
> > > >
> > > > I am on your side with this.
> > > > Especially the need to use INVOKE ACTION to set specific
> > > > attributes is
> > > something I don't understand.
> > > >
> > > > Our users want to be able to set some defaults for the Write Pro
> > > > area, for example the default zoom % and the default view mode Now
> > > > I have to
> > use
> > > for example INVOKE ACTION("pageMode?value=draft";WP_WriteProArea)
> > > and INVOKE ACTION("zoom?value=150%";WP_WriteProArea) to accomplish
> this.
> > > > Even further, the Write Pro area needs to have the focus or else
> > > > the invoke action command doesn't work
> > > >
> > > > I know there are some workarounds / hacks for this, but I don't
> > > > like
> > it.
> > > >
> > > > Gr,
> > > >
> > > > Piotr
> > > >
> > > >
> > > >> On Jun 10, 2018, at 10:18 AM, JOHN BAUGHMAN wrote:
> > > >>
> > > >> 2. Have 2 icons in my tool bar, like in the print dialog, for
> > Portrait and
> > > Landscape and be able to use them as one can from the contextual menu.
> > > >>
> > &g

RE: Any way to detect change to 4D Write Pro orientation.

2018-06-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi John,

I am already using the 4D Write Pro toolbar, and I like it! It also has most 
things the user needs, and I am also able to modify and extend it. I can't wait 
for a new version to show up.
However, as said, I am talking about programmatically setting defaults, because 
I don't think users like it when I say they have to click 5 buttons every time 
to create the view they want
For some defaults we have to use INVOKE ACTION and even more the Pro area has 
got to have the focus

Besides the fact that I find this not intuitive there is one thing I don't 
understand:
As I said (can someone confirm this?) the area has to have the focus to use 
INVOKE ACTION for setting the zoom for example.
But what if I want to show an area that is not enterable / disabled and I want 
to set the zoom to 150%? Is this even possible?

Gr,

Piotr


> -Oorspronkelijk bericht-
> Van: JOHN BAUGHMAN 
> Verzonden: donderdag 21 juni 2018 10:04
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Any way to detect change to 4D Write Pro orientation.
> 
> Hi Piotr,
> 
>   I highly recommend the 4D Write-Like toolbar…
> 
> 
>   http://download.4d.com/4DBlog/Tips/4DWriteLikeToolbarDemo.zip
> 
>   It has nearly everything needed including zoom and view mode that you
> mentioned. If for nothing else it’s  great to use as an example of how to
> manage most of the 4D Write Pro attributes. I have adopted it for all my 4D
> Write Pro areas with only a couple of additions. I added “4D Expressions” to 
> the
> Insert menu and added the orientation icons I mentioned earlier. Both were
> very easy to add using the tool bar's example.
> 
> 
> John
> 
> 
> John Baughman
> 1331 Auwaiku Street
> Kailua, Hawaii  96734
> (808) 262-0328
> john...@hawaii.rr.com
> 
> > On Jun 20, 2018, at 9:45 PM, Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > Hi John,
> >
> > I am on your side with this.
> > Especially the need to use INVOKE ACTION to set specific attributes is
> something I don't understand.
> >
> > Our users want to be able to set some defaults for the Write Pro area,
> > for example the default zoom % and the default view mode Now I have to use
> for example INVOKE ACTION("pageMode?value=draft";WP_WriteProArea) and
> INVOKE ACTION("zoom?value=150%";WP_WriteProArea) to accomplish this.
> > Even further, the Write Pro area needs to have the focus or else the
> > invoke action command doesn't work
> >
> > I know there are some workarounds / hacks for this, but I don't like it.
> >
> > Gr,
> >
> > Piotr
> >
> >
> >> On Jun 10, 2018, at 10:18 AM, JOHN BAUGHMAN wrote:
> >>
> >> 2. Have 2 icons in my tool bar, like in the print dialog, for Portrait and
> Landscape and be able to use them as one can from the contextual menu.
> >>
> >
> > There is a way to do set ordination programmatically...
> >
> > INVOKE ACTION("pageOrientation?value=landscape";WP_WriteProArea)
> >
> > Does anyone else find finding how to do something in 4D Write Pro a painful
> proposition. Everything is spread out...
> >
> > WP commands
> > ST Commands
> > OB Commands
> > Standard Actions/4D Write Pro Standard Actions/Invoke Action etc.,
> > etc...
> >
> > I would love a single place to go where I can find what is needed without
> having to guess what section of the LRM to go to?
> >
> > John
> >
> 
> **
> > 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
> >
> 
> **
> 

**
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: Re: Any way to detect change to 4D Write Pro orientation.

2018-06-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi John,

I am on your side with this.
Especially the need to use INVOKE ACTION to set specific attributes is 
something I don't understand.

Our users want to be able to set some defaults for the Write Pro area, for 
example the default zoom % and the default view mode
Now I have to use for example INVOKE 
ACTION("pageMode?value=draft";WP_WriteProArea) and INVOKE 
ACTION("zoom?value=150%";WP_WriteProArea) to accomplish this.
Even further, the Write Pro area needs to have the focus or else the invoke 
action command doesn't work

I know there are some workarounds / hacks for this, but I don't like it.

Gr,

Piotr


> On Jun 10, 2018, at 10:18 AM, JOHN BAUGHMAN wrote:
>
> 2. Have 2 icons in my tool bar, like in the print dialog, for Portrait and 
> Landscape and be able to use them as one can from the contextual menu.
>

There is a way to do set ordination programmatically...

INVOKE ACTION("pageOrientation?value=landscape";WP_WriteProArea)

Does anyone else find finding how to do something in 4D Write Pro a painful 
proposition. Everything is spread out...

WP commands
ST Commands
OB Commands
Standard Actions/4D Write Pro Standard Actions/Invoke Action
etc., etc...

I would love a single place to go where I can find what is needed without 
having to guess what section of the LRM to go to?

John
**
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: Write Pro: programmatically manipulate text expertise needed

2018-06-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Justin, Pat,

Using WP SELECT that is called in a method via CALL FORM seems to work, thanks 
for that!

I must say, I can't believe it's 4D's intention that we constantly have to use 
CALL FORM for thinks to work.
Maybe they implement a more sophisticated way for doing this.

Thanks again,

Piotr

> -Oorspronkelijk bericht-
> Van: Justin Carr 
> Verzonden: maandag 18 juni 2018 5:00
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Write Pro: programmatically manipulate text expertise needed
> 
> On 15 Jun 2018, at 10:01 pm, Pat Bensky via 4D_Tech <4d_tech@lists.4d.com>
> wrote:
> >
> > Hi Piotr,
> > I think you can use WP SELECT to do this - WP SELECT ( {* ;} wpArea {;
> > targetObj} | {; startRange ; endRange} )
> >
> > Let me know if you can't get that to work and I'll take a closer look at it.
> >
> > HTH
> >
> > Pat
> >
> > On Wed, 13 Jun 2018 at 07:35, Piotr Chabot Stadhouders via 4D_Tech <
> > 4d_tech@lists.4d.com> wrote:
> >
> >> Hi Pat,
> >>
> >> Your tips seem to work, but I am hoping you also know the answer to
> >> the next problem.
> >> See example 1 : After replacing the text with ST SET
> >> TEXT($wp_obj;$text;$start_pos;$end_pos) the cursor must be set after
> >> the last inserted character. This replacing is done in the On After
> >> Keystroke event of the Write Pro area and is triggered when the user types 
> >> a
> space.
> >> However, I don't succeed in setting the cursor at the end of the
> >> inserted text, it stays at the position where it was (position after
> >> the original
> >> space)
> >>
> >> Do you also have a tip how to set the cursor to a different position
> >> in the "On After Keystroke" event of the Pro Area?
> 
> WP SELECT is the way to go but, like many things in 4D Write Pro, you need to
> do it in a separate execution cycle (from the ST SET TEXT).
> 
> CALL FORM will work in this instance (it doesn't work in most of the instances
> where 4D Write Pro needs to complete the current execution cycle before any
> new changes can be applied).
> 
> So, have a separate method to which you pass your 4D Write Pro object and
> your $endpos and run the WP SELECT from there. Call the method after your ST
> SET TEXT using CALL FORM.
> 
> J
**
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: Write Pro: programmatically manipulate text expertise needed

2018-06-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Pat,

Thanks for your answer.

Sometimes the solution is quite obvious but you just don't see it

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Pat Bensky 
> Verzonden: dinsdag 12 juni 2018 13:40
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Write Pro: programmatically manipulate text expertise needed
> 
> Piotr,
> 1. I think you will need to use ST GET PLAIN TEXT to get all the text after 
> the
> specified range and then look for the first return character in that 
> selection. I
> believe this is the only way to get an accurate position with styled text.
> 
> 2. Again, use ST GET PLAIN TEXT to get a range of text from the cursor 
> position
> back n characters or to the beginning of the text.
> 
> HTH
> 
> Pat
> 
> On Tue, 12 Jun 2018 at 10:02, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > Hi all,
> >
> > We are in the progress of migrating from 4D Write to Write Pro A lot
> > of things are going fine, but there is one area that seems easy but I
> > am having difficulties with it and that is programmatically
> > manipulating text
> >
> > I give 2 examples that maybe seem obvious to others but are not for me:
> >
> >   1.  I am in a procedure where I have an Write Pro object (not perce
> > an area on screen, could be a range) and an expression has been
> > selected via $type:=ST Get content
> > type($wp_obj;$start;$end;$startBlock;$endBlock). I call the command ST
> > SET TEXT($wp_obj;$text;$startBlock;$endBlock) to replace the selected
> expression. So far no problems, but here it comes...
> > Now I want to find the first occurrence of a carriage return in the
> > text that comes after the replaced text (end inserted text - end whole 
> > text).
> > What is the best / easiest way to do this? Remember, this text can
> > contain styled text and/or expressions and/or pictures
> >   2.  Example 2 is like example 1 but now with an actual visual area.
> > The user types a couple of characters. At a certain point after typing
> > I want to procedurally replace the typed text from the cursor back
> > until the first space and replace it with another text. Maybe somebody
> > knows "Type it for me", this is what I am talking about. So, what is
> > the best way to find the first occurrence of a space from the cursor
> > back and replace this text with another text?
> >
> > Thanks in advance,
> >
> > Piotr
> >
> >
> 
> **
> > 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
> >
> 
> **
> 
> 
> 
> --
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *

**
4D Internet Users Group (4D iNUG)
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
**

Write Pro: programmatically manipulate text expertise needed

2018-06-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi all,

We are in the progress of migrating from 4D Write to Write Pro
A lot of things are going fine, but there is one area that seems easy but I am 
having difficulties with it and that is programmatically manipulating text

I give 2 examples that maybe seem obvious to others but are not for me:

  1.  I am in a procedure where I have an Write Pro object (not perce an area 
on screen, could be a range) and an expression has been selected via $type:=ST 
Get content type($wp_obj;$start;$end;$startBlock;$endBlock). I call the command 
ST SET TEXT($wp_obj;$text;$startBlock;$endBlock) to replace the selected 
expression. So far no problems, but here it comes... Now I want to find the 
first occurrence of a carriage return in the text that comes after the replaced 
text (end inserted text - end whole text). What is the best / easiest way to do 
this? Remember, this text can contain styled text and/or expressions and/or 
pictures
  2.  Example 2 is like example 1 but now with an actual visual area. The user 
types a couple of characters. At a certain point after typing I want to 
procedurally replace the typed text from the cursor back until the first space 
and replace it with another text. Maybe somebody knows "Type it for me", this 
is what I am talking about. So, what is the best way to find the first 
occurrence of a space from the cursor back and replace this text with another 
text?

Thanks in advance,

Piotr

**
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: 4D Write Pro: traverse throught all available headers and footers

2018-05-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Yes, I mean the loop doesn't take into account mixed content

I had the feeling that one of the goals of the tip 
(http://kb.4d.com/assetid=77422) was to make an efficient loop, meaning that 
homogenous parts of the content can be skipped
Why else use the variables $startBlock and $endBlock, but maybe I was wrong
, because then you also have to test on mixed type content
Starting with this :

$start:=ST Start text
$end:=$start+1

does the trick, but then again it means just testing every "character" in the 
content for being an expression.
This doesn't feel efficient to me

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako 
> Verzonden: dinsdag 29 mei 2018 17:30
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: 4D Write Pro: traverse throught all available headers and
> footers
> 
> when you say "it misses an expression"
> 
> do you mean ST Get content type doesn't report "ST Expression type" (for
> instance you get mixed type) or do you mean ST Get expression doesn't return
> an expression (maybe you should start from 1, not ST Start text)
> 
> ?
> 
> > 2018/05/30 0:05、Piotr Chabot Stadhouders via 4D_Tech
> > <4d_tech@lists.4d.com> のメール:
> > What do you think?
> 
> 
> 

**
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: 4D Write Pro: traverse throught all available headers and footers

2018-05-29 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Did you mean to respond to my "get all expressions" post?

For that I use a code snippet found in a tech tip on kb.4d.com that traverses 
through all expressions in a section, see http://kb.4d.com/assetid=77422
It finds all expressions using ST Get content type
Beside the fact that I don't completely understand the way the loop works, it 
misses an expression when it is the first element in the content

What do you think?

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako 
> Verzonden: vrijdag 25 mei 2018 23:46
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: 4D Write Pro: traverse throught all available headers and
> footers
> 
> Hello,
> 
> the command is ST Get content type
> 
> http://doc.4d.com/4Dv16/4D/16.3/ST-Get-content-type.301-3652488.en.html
> 
> > 2018/05/26 0:46、Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com> のメール:
> > I need to traverse through all expressions
> 
> 

**
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: Why are columns of a non-focusable listbox not enterable?

2018-05-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

you've got me there

OK, so 90% of the time the listbox doesn't need to be enterable
I don't want it to have the focus because I want other objects to keep the focus
At some point (the other 10%) I want it to be enterable
OBJECT SET ENTERABLE on a column doesn't work, because the listbox is not 
focusable
OK, so I set the listbox to focusable with wait, where's the OBJECT SET 
FOCUSABLE command?

Am I overlooking something?

Gr,

Piotr


> -Oorspronkelijk bericht-
> Van: Jeffrey Kain <jeffrey.k...@gmail.com>
> Verzonden: donderdag 24 mei 2018 13:03
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Why are columns of a non-focusable listbox not enterable?
> 
> "Why would you want to do that"?
> 
> How can something be enterable without getting the focus first?
> 
> 
> --
> Jeffrey Kain
> jeffrey.k...@gmail.com
> 
> 
> 
> 
> > On May 24, 2018, at 2:57 AM, Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > I need some listboxes that are not focusable However, as a side effect
> > then the columns of these listboxes are not enterable Does anybody
> > know the reason of this? Does this make sense?
> 

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

4D Write Pro: get all expressions

2018-05-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Below is a code snippet (not my own) that loops through all expressions in a 4D 
Write Pro document
It seems that when an expression is the very first element in the document it 
is not detected
Does anybody know a solution? Is there a better way to get all expressions?

Thanks,

Piotr


$done:=False
$start:=ST Start text
$end:=ST End text
While (Not($done))
$type:=ST Get content type($object_ptr->;$start;$end;$startBlock;$endBlock)
Case of
: ($type=ST Expression type)
$expression:=ST Get expression($object_ptr->;$startBlock;$endBlock)

End case

$start:=$endBlock
$end:=$endBlock+1
If ($startBlock>=$endBlock)
$done:=True
End if
End while

**
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: procedurally delete anchored image in 4D Write Pro

2018-05-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Justin, Miyako,

INVOKE ACTION works, but then I was realizing that this only works with an 
Write Pro on a Form and not when using an "offscreen" 4D Write Pro object 
variable
That's why I thought I must be overlooking a command to do the deleting

So there are 2 possibilities:
1. We are overlooking an existing command that can be used to delete an 
anchored image
2. 4D forgot to implement a WP delete picture command

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako 
> Verzonden: donderdag 24 mei 2018 2:02
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: procedurally delete anchored image in 4D Write Pro
> 
> 
> 
> I think you need to first change the layout to inline (by UI or code), in 
> order to
> delete an image.
> 
> but the attribute "wk anchor layout" is not settable with WP SET ATTRIBUTES
> http://doc.4d.com/4Dv16R6/4D/16-R6/4D-Write-Pro-Attributes.300-
> 3605889.en.html
> 
> so you need to use INVOKE ACTION instead.
> 
> syntax: anchorLayout?value=inline
> http://doc.4d.com/4Dv16R6/4D/16-R6/Using-4D-Write-Pro-standard-
> actions.200-3605850.en.html#3610756
> 
> only then can you clear the selected image.
> 
> > 2018/05/24 8:03、Justin Carr via 4D_Tech <4d_tech@lists.4d.com> のメー
> ル:
> > INVOKE ACTION(ak clear;ak current form)
> 
> 
> 

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

4D Write Pro: traverse throught all available headers and footers

2018-05-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Does anybody know of a way how to traverse through all available headers and 
footers of a document?
I have an 4D Write Pro object and in some circumstances I get an error when 
using WP SET FRAME
How do I know if, and so which frames are available in a 4D Write Pro object
I need to traverse through all available frames
The reason is I need to traverse through all expressions in all available frames

Gr,
Piotr

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

Why are columns of a non-focusable listbox not enterable?

2018-05-24 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I need some listboxes that are not focusable
However, as a side effect then the columns of these listboxes are not enterable
Does anybody know the reason of this? Does this make sense?

Gr,
Piotr

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

procedurally delete anchored image in 4D Write Pro

2018-05-18 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Sorry, but I don't see it:
How can I procedurally delete an anchored image in a 4D Write Pro document?

I know how to select the image with
WP SELECT(*;"WParea";$image_object)

But then what?
I hope somebody knows the answer.

Gr,

Piotr

**
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: Web Area display PDF

2018-05-15 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jeffrey,

We also have problems viewing PDF in a webarea with 4D 32-bit on High Sierra
Do you know if this is a 32-bit problem?
So going to 64-bit would solve the problem?

We are using 4d write and want to migrate it to 4D write pro
Now would be the time to do this if the PDF problem doesn't exist with 64-bit.

Thanks,

Piotr

> -Oorspronkelijk bericht-
> Van: Jeffrey Kain 
> Verzonden: zaterdag 21 april 2018 1:09
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Web Area display PDF
> 
> Which OS are you using? PDF display is broken in 4D 32-bit on High Sierra.
> 
> We got pdf.js to work in 4D on Mac but I haven’t gotten around to
> componentizing it yet or making it widely available.   If you’re interested I 
> could
> send you a little database and you could copy the methods in.  It works really
> well.
> 
> Sent from my iPad
> 
> > On Apr 20, 2018, at 7:04 PM, John Baughman via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > Myako, thanks for the link. GitHub frankly makes my eyes water. I don’t have
> any idea where to start with pdf.js to resolve my problem. Would your often
> touted pdf plug-in do anything that might help me resolve this problem?

**
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: Paste (ctrl-v) in textfield doesn't work with focusable listbox

2018-05-12 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Ok, thanks, i Will try to reproduce the problem in a sample database

"
I created a simple form with an array based listbox and a text field and it 
seems like I have no trouble pasting into the text field, but perhaps I am 
doing something different than you are doing.



Also, I don't see any bugs related to your described behavior, but if you can 
reproduce the issue I would suggest you create a simple sample database, raise 
a Tech Support (TAOW) case, and attach it to the case along with the steps to 
reproduce the issue. That way our tech support team can take a look."

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

Paste (ctrl-v) in textfield doesn't work with focusable listbox

2018-05-09 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v16R6
I have a form with a listbox and a textfield
When the listbox has the property focusable set, pasting text into the text 
field via ctrl-v doesn't work (menu item paste DOES work)
When I uncheck the focusable property pasting does work

Does anybody know about this behavior?

I need to set the listbox focusable because else I can not set columns 
enterable! Also something I don't quite understand

Gr,

Piotr

**
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: overlapping subforms

2018-03-21 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Thanks for diving into my subform problem


> another approach that results in the same UI.
I have converted the parent form, with 23 programmatically build listboxes on 
it that are show/hidden, into a parent form with 7 subforms with static 
listboxes (columns created in design mode)
This all advised by others in another thread you can read on the iNUG about 
programmatically creating listboxes and performance
I must say this exercise indeed resulted in a big performance gain

> The version you are using also may matter
I use 4D v16 R6 on Windows and OSX

> What does "save the form" mean? Saving the parent form or the subform?
In design mode, when putting the subform on the form in front of the other 
subforms  (I don't use OBJECT DUPLICATE) and close the parent form and reopen 
it (or even when I save the parent form) the subform I put in front goes to the 
back again. I am not able to keep it in front. All these subforms are on page 1.

> If it is on the parent form you really shouldn't have a problem.
So, all subforms are on page 1 of the parent form, and the problematic subform 
is shown by an action in the parent form
As I replied on another post maybe this could be because there is a webarea on 
it?
As far as I know the rendering of the webarea is differs from the rendering of 
the other objects on a form
It often happens that the webarea (and other plugins as well) are rendered 
earlier than other objects, resulting in ugly white parts on the screen while 
for example executing an object method

My final conclusions so far:
- There is some kind of bug in 4D because even when I set a subform object to 
the front it disappears to the back again when saving the parent form
- Because of difference between rendering of webareas (and other plugins) and 
other objects there are some redraw problems when setting objects to 
visible/invisible when webareas are involved

Gr,

Piotr




> -Oorspronkelijk bericht-
> Van: Kirk Brooks <lists.k...@gmail.com>
> Verzonden: dinsdag 20 maart 2018 15:57
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: overlapping subforms
> 
> Piotr,
> This sounds like a creative use of subforms. But it also sounds pretty 
> complex.
> So the first thought I offer is to look at what you are trying to do and be 
> sure
> using subforms in actually the best solution. It may be but there may also be
> another approach that results in the same UI.
> 
> For example, you could use OBJECT SET SUBFORM
> <http://doc.4d.com/4Dv15/4D/15.5/OBJECT-SET-SUBFORM.301-
> 3576522.en.html> to and simply change the displayed subform as required
> instead of managing multiple subform objects.
> 
> The version you are using also may matter. But to answer the question you
> asked:
> 
> On Mon, Mar 19, 2018 at 1:40 AM, Piotr Chabot Stadhouders via 4D_Tech <
> 4d_tech@lists.4d.com> wrote:
> 
> > I have a form with a couple of subforms on it Now I want to add
> > another subform, that is on top of 3 others, and becomes visible when
> > pressing a button
> >
> 
> ​First I'm assuming all 3 of these subforms are on the parent form and not
> nested (a subform on a subform) AND on the same form page. Also, are the
> subform objects, the variables that contain the subforms, process variables or
> form variables?
> 
> If the subform you are trying to display is on page 0 it would create this 
> issue.
> Either put all the subforms on page 0 or put a subform on each page for this
> purpose. Remember you can use ​ ​Are you using OBJECT DUPLICATE
> <http://doc.4d.com/4Dv15/4D/15.5/OBJECT-DUPLICATE.301-3576548.en.html>
> to add subforms? If so remember to ​specify the "boundTo" object. This param
> lets you manage the z order of the objects. If you don't use it the new 
> object is
> at the top of the stack. This could account for the issue.
> 
> The other possibility is the context. When you say "press a button" where is 
> that
> button? This is important.
> 
> If it is on the parent form you really shouldn't have a problem.
> 
> If it's on a subform you may be opening the popup subform within the subform
> with the button because the button on the subform runs in the context of the
> subform - not the parent form. This can be quite confusing.
> 
> Remember that the form events on a subform run BEFORE the parent form. So
> an On clicked event from a button on a subform runs:
> 1) in the subform button
> 
> 2) the subform form method
> 
> 3) the subform container (which is the 'subform object' on the parent form)
> 
> 4) the parent form method
> 
> 
> You can see it as a kind of popup viewer
> >
> ​The subform pops up - is it displaying fields from a record (which record) or
> something li

RE: overlapping subforms

2018-03-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Yes, I am sure I set it to the front, but when I do a "Save Form" the subform 
goes to the back again
I also tried setting the other subforms to invisible, and making the 4th 
subform visible
This also doesn’t work always
Maybe this problem has to do with some other facts :
I use a webarea in the 4th subform, and I also resize the subform before making 
it visible

Does anybody know of redraw problems when using a webarea in a subform?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: John Baughman <john...@hawaii.rr.com>
> Verzonden: maandag 19 maart 2018 17:08
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: overlapping subforms
> 
> If I understand you correctly, you have 3 subforms visible and want them to
> remain visible when you make a 4th subform visible on top of them? However,
> when you open the form and click the button to make it visible it appears
> behind the other 3 forms.
> 
> I just tested the above scenario and after in design mode I move the 4th
> subform to the front with Move To Front (control-F) then run it, the 4th 
> subform
> displays in front. If I move it to the back with Move To Back (control-B) in
> design mode, it properly opens behind the other subforms when run.
> 
> Are you sure that you in fact moved the 4th subform to the front while in 
> design
> mode?
> 
> John
> 
> 
> 
> > On Mar 19, 2018, at 3:02 AM, Randy Jaynes via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > I have a form with 3 subform container objects sitting on top of each 
> > other. I
> just use OBJECT SET VISIBLE to hide the ones that don’t need to be seen at the
> moment.
> >
> > They all occupy the same space on the parent form, so because I hide the 2
> not needed, the ordering on the form does not matter.
> >
> > I use a tab to control which one is visible at the moment. Your buttons 
> > could
> serve the same purpose.
> >
> > Randy
> >
> > --
> > Randy Jaynes
> > Senior Programmer and Customer Support
> >
> > http://printpoint.com <http://printpoint.com/> • 845.687.3741 •
> > PrintPoint, Inc • 57 Ludlow Lane • Palisades, NY 10964 Please send all
> > email contacts to supp...@printpoint.com
> > <mailto:supp...@printpoint.com>
> >
> >
> >
> >
> >> On Mar 19, 2018, at 4:40 AM, Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com <mailto:4d_tech@lists.4d.com>> wrote:
> >>
> >> Hi,
> >>
> >> I have a form with a couple of subforms on it Now I want to add
> >> another subform, that is on top of 3 others, and becomes visible when
> >> pressing a button You can see it as a kind of popup viewer Because
> >> the subform must show in front of the others, in design mode I put
> >> the subform container to the front However, when I save the form the
> >> subform container disappears to the back again
> >>
> >> Are there known problems putting subforms on top of each other?
> >>
> >> Gr,
> >>
> >> Piotr
> >>
> >>
> 
> *
> >> *
> >> 4D Internet Users Group (4D iNUG)
> >> FAQ:  http://lists.4d.com/faqnug.html
> >> <http://lists.4d.com/faqnug.html>
> >> Archive:  http://lists.4d.com/archives.html
> >> <http://lists.4d.com/archives.html>
> >> Options: https://lists.4d.com/mailman/options/4d_tech
> >> <https://lists.4d.com/mailman/options/4d_tech>
> >> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >> <mailto:4d_tech-unsubscr...@lists.4d.com>
> >>
> 
> *
> >> *
> >
> >
> 
> **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: https://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >
> 
> **
> 
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> john...@hawaii.rr.com
> 
> 
> 
> 
> 

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

overlapping subforms

2018-03-19 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I have a form with a couple of subforms on it
Now I want to add another subform, that is on top of 3 others, and becomes 
visible when pressing a button
You can see it as a kind of popup viewer
Because the subform must show in front of the others, in design mode I put the 
subform container to the front
However, when I save the form the subform container disappears to the back again

Are there known problems putting subforms on top of each other?

Gr,

Piotr

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

Procedurally set Movable Rows option for a listbox

2018-03-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v16R5
I must be overlooking it, but how can I procedurally set the Movable Rows 
option for a listbox?

Gr,

Piotr

**
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: On Column Resize event

2018-01-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Based on the tip op Chip (sounds nice), I have created a function that can be 
used in the "On Column Resize" event:


C_TEXT($listbox;$1)
C_BOOLEAN($mouse_in_listbox;$0)
$listbox:=$1

C_BOOLEAN($mouse_in_listbox)
GET MOUSE($mouseX;$mouseY;$mouseButton)
OBJECT GET COORDINATES(*;$listbox;$l;$t;$r;$b)

If ($mouseX>=$l) & ($mouseX<=$r) & ($mouseY>=$t) & ($mouseY<=$b)
$mouse_in_listbox:=True
Else 
$mouse_in_listbox:=False
End if 

$0:=$mouse_in_listbox




> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: vrijdag 5 januari 2018 10:06
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: On Column Resize event
> 
> Hi Chip, Miyako,
> 
> @Chip :
> Thanks, this is a nice tip!
> But don't you agree it should be easier, and 4D should have thought about 
> this,
> and implement it another way?
> 
> @Miyako :
> I know there is a new auto-resize feature, but this works not as how we want 
> it
> In fact we have implemented an auto-resize feature ourselves, and this is
> exactly why we have a problem now When a user resizes a column we
> determine the ratio's of the column widths (We do this in the "On Column
> Resize" event) When resizing the listbox (by resizing the window for example)
> in the "On Resize" event we set the widths proportionally based on the ratio's
> calculated earlier
> 
> Gr,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> > Verzonden: donderdag 4 januari 2018 18:22
> > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> > Onderwerp: Re: On Column Resize event
> >
> > Piotr,
> > 'On Timer' can be used to limit execution of the On Column Resize event.
> > I have seen a similar problem with other resizing situations.
> >
> > Basically - you start a timer for a .5 second or so, then On timer
> > executes the code.
> > This reduces the number of times the code runs.
> >
> > For differentiating between manual resizing of a column vs auto
> > resizing via a window resize, you could try setting a flag. Set the
> > flag in 'On Mouse Enter', and clearing it in 'On Mouse Leave', in the
> > context of the listbox. Then in the code for resizing if the flag is
> > set the user has the mouse in the listbox and is resizing manually. If not, 
> > then
> the user is resizing the window.
> >
> > Chip
> > On Thu, 4 Jan 2018 17:13:23 +, Piotr Chabot Stadhouders via
> > 4D_Tech
> > wrote:
> > > Hi,
> > >
> > > In 4D v16 there is a new feature so an "On Column Resize" event is
> > > triggered "live" during resizing of a listbox:
> > > https://blog.4d.com/execute-action-upon-listbox-column-resizing/
> > >
> > > I have a lot of code behind that event in our application that now
> > > is executed too many times, so I don't like this at all. I have to
> > > eliminate this code, because it is based on the idea a user resizes
> > > the column.
> > >
> > > Apart from this fact, there is something else :
> > > When setting the Horizontal sizing option of the listbox to grow,
> > > the listbox grows when resizing the window, and the last column of
> > > the listbox is also resized. This is common beheviour What I don't
> > > like is that then the "On Column Resize" event also is fired, so now
> > > when resizing the window, the code behind the event is executed many
> > > times.
> > > What I don't understand is how I can know if the event is triggered
> > > by a user resizing the column, or if it is triggered by something
> > > else (in this case resizing the window)
> > >
> > > Does anybody know of a way to detect this?
> > >
> > > Gr,
> > >
> > > Piotr
> > >
> > >
> >
> 
> > **
> > > 4D Internet Users Group (4D iNUG)
> > > FAQ:  http://lists.4d.com/faqnug.html
> > > Archive:  http://lists.4d.com/archives.html
> > > Options: http://lists.4d.com/mailman/options/4d_tech
> > > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> > >
> >
> 
> > **
> > ---
> > Gas is for washing parts
> > Alcohol is for drinkin'
> > Nitromethane is for racing
> 

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

RE: On Column Resize event

2018-01-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip, Miyako,

@Chip :
Thanks, this is a nice tip!
But don't you agree it should be easier, and 4D should have thought about this, 
and implement it another way?

@Miyako :
I know there is a new auto-resize feature, but this works not as how we want it
In fact we have implemented an auto-resize feature ourselves, and this is 
exactly why we have a problem now
When a user resizes a column we determine the ratio's of the column widths (We 
do this in the "On Column Resize" event)
When resizing the listbox (by resizing the window for example) in the "On 
Resize" event we set the widths proportionally based on the ratio's calculated 
earlier

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: donderdag 4 januari 2018 18:22
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Re: On Column Resize event
> 
> Piotr,
> 'On Timer' can be used to limit execution of the On Column Resize event.
> I have seen a similar problem with other resizing situations.
> 
> Basically - you start a timer for a .5 second or so, then On timer executes 
> the
> code.
> This reduces the number of times the code runs.
> 
> For differentiating between manual resizing of a column vs auto resizing via a
> window resize, you could try setting a flag. Set the flag in 'On Mouse Enter',
> and clearing it in 'On Mouse Leave', in the context of the listbox. Then in 
> the
> code for resizing if the flag is set the user has the mouse in the listbox 
> and is
> resizing manually. If not, then the user is resizing the window.
> 
> Chip
> On Thu, 4 Jan 2018 17:13:23 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> > Hi,
> >
> > In 4D v16 there is a new feature so an "On Column Resize" event is
> > triggered "live" during resizing of a listbox:
> > https://blog.4d.com/execute-action-upon-listbox-column-resizing/
> >
> > I have a lot of code behind that event in our application that now is
> > executed too many times, so I don't like this at all. I have to
> > eliminate this code, because it is based on the idea a user resizes
> > the column.
> >
> > Apart from this fact, there is something else :
> > When setting the Horizontal sizing option of the listbox to grow, the
> > listbox grows when resizing the window, and the last column of the
> > listbox is also resized. This is common beheviour
> > What I don't like is that then the "On Column Resize" event also is
> > fired, so now when resizing the window, the code behind the event is
> > executed many times.
> > What I don't understand is how I can know if the event is triggered
> > by a user resizing the column, or if it is triggered by something
> > else (in this case resizing the window)
> >
> > Does anybody know of a way to detect this?
> >
> > Gr,
> >
> > Piotr
> >
> >
> 
> **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >
> 
> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing

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

On Column Resize event

2018-01-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

In 4D v16 there is a new feature so an "On Column Resize" event is triggered 
"live" during resizing of a listbox:
https://blog.4d.com/execute-action-upon-listbox-column-resizing/

I have a lot of code behind that event in our application that now is executed 
too many times, so I don't like this at all. I have to eliminate this code, 
because it is based on the idea a user resizes the column.

Apart from this fact, there is something else :
When setting the Horizontal sizing option of the listbox to grow, the listbox 
grows when resizing the window, and the last column of the listbox is also 
resized. This is common beheviour
What I don't like is that then the "On Column Resize" event also is fired, so 
now when resizing the window, the code behind the event is executed many times.
What I don't understand is how I can know if the event is triggered by a user 
resizing the column, or if it is triggered by something else (in this case 
resizing the window)

Does anybody know of a way to detect this?

Gr,

Piotr

**
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: Stack level in 4DDebugLog.txt

2017-12-13 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip, Tim,

Could there be some other weird reason why the stack level increases and 
doesn't decrease?
Maybe calling plugin commands, or maybe EXECUTE METHOD?
Maybe a bug in the debug log?
Maybe something in Windows 10?

I know nearly for sure that there is no recursion, and still the stack level 
increases
At some point I am in a method I know it is stack level 2 (for example), but 
the debug level tells me I am in level 30. How is this possible?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: maandag 11 december 2017 19:21
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: Stack level in 4DDebugLog.txt
> 
> Piotr,
> don't forget the possibility of indirect recursion too.
> Method_A call Method_B which calls Method_C which calls Method_A
> 
> 
> On Mon, 11 Dec 2017 18:11:32 +, Timothy Penner via 4D_Tech wrote:
> > It could be recursion. The debug logs should help you determine
> > exactly what is being called.
> >
> > If method1 calls method1 which calls method1 again (and again and
> > again and again), it would increase the stack level each time it
> > calls itself.
> >
> > -Tim
> >
> >
> >
> >
> >
> 
> **
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> >
> 
> **
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing

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

RE: Stack level in 4DDebugLog.txt

2017-12-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

Thanks again for your answer.
I already thought so, however, in my case the stack level increases over time
It starts with zero
I see it decrease some times, but after 1000 log lines it already is at 262

So I guess this smells like a nesting problem?
I have to find out where and why

Or could there be another reason?

Gr,

Piotr


> -Oorspronkelijk bericht-
> Van: Timothy Penner [mailto:tpen...@4d.com]
> Verzonden: maandag 11 december 2017 18:31
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: Stack level in 4DDebugLog.txt
> 
> The stack level is how far down the call chain you are. When one method calls
> another you increase the stack level, if that method then calls another method
> you increase the stack level again. As methods complete the stack level
> decreases.
> 
> The following description on Wikipedia for Call Stack may help further explain
> the concept:
> https://en.wikipedia.org/wiki/Call_stack
> {
> A call stack is used for several related purposes, but the main reason for 
> having
> one is to keep track of the point to which each active subroutine should 
> return
> control when it finishes executing. An active subroutine is one that has been
> called but is yet to complete execution after which control should be handed
> back to the point of call. Such activations of subroutines may be nested to 
> any
> level (recursive as a special case), hence the stack structure. If, for 
> example, a
> subroutine DrawSquare calls a subroutine DrawLine from four different places,
> DrawLine must know where to return when its execution completes. To
> accomplish this, the address following the call instruction, the return 
> address, is
> pushed onto the call stack with each call.
> }
> 
> 
> -Tim
> 
> 
> Timothy Penner
> Senior Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> CA 95113 San Jose
> United States
> 
> Telephone : +1-408-557-4600
> Standard :  +1-408-557-4600
> Fax :   +1-408-271-5080
> Email : tpen...@4d.com
> Web :   www.4D.com
> 

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

Stack level in 4DDebugLog.txt

2017-12-11 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Can anybody explain to me what the "Stack level" column in the 4DDebugLog.txt 
means?
There is no further explanation of this column  in the docs
What can be done with this?

TIA,

Piotr

**
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: poor performance LISTBOX INSERT COLUMN

2017-12-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

Yes, I have opened a tech support case.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Timothy Penner [mailto:tpen...@4d.com]
> Verzonden: woensdag 6 december 2017 2:24
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: RE: poor performance LISTBOX INSERT COLUMN
> 
> > My only hope is that 4D will investigate the command.
> 
> If you haven't already done so, please open a tech support case on taow.4d.com
> or file a bug report on forums.4d.fr so that someone investigates this for 
> you.
> 
> -Tim
> 

**
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: poor performance LISTBOX INSERT COLUMN

2017-12-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip,

I understand what you are saying.
I did a quick test between append (position = column count + 1) and insert 
(position = 1)
I don't have the feeling it makes a lot of difference.
And remember, we are not talking about millions of elements. Maybe then it 
would make a difference.
We are talking about inserting 400 empty arrays

Nevertheless, I can understand a lot is going on in the command (I don't know), 
and don't say it is easy stuff
My only hope is that 4D will investigate the command.

And if nothing can be done, then I always can recode a couple of forms and use 
the tips mentioned by the iNUG community (you guys)

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: dinsdag 5 december 2017 15:59
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: RE: poor performance LISTBOX INSERT COLUMN
> 
> if I am correct...
> list boxes should/do behave as arrays.
> 
> So... you should - no I have not done the testing - that inserting (add to 
> location
> { end).
> 
> EVEN IF, the array's memory did not have to be reallocated (it does), if you
> insert into location 10 of a 100 element array, 90 elements have to be 
> "shifted"
> to their current location +1 (10 -> 11, 11-> 12 etc).
> This will/does/should add overhead.
> 
> If you are inserting - especially blank/empty columns - rather then appending
> the columns to your list boxes I would expect this to be slower.  In a 
> previous
> email I mentioned that I do dynamic list boxes every where I use them.
> 
> I always (generic code) append the new column(s).
> Listbox Insert column(listbox;size of listbox+1; colname; etc)
> 
> 
> On Tue, 5 Dec 2017 09:11:25 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> >
> > I suppose you mean with the same command? Do you mean you think
> > putting the column behind the last could be faster than when putting
> > columns in front others?
> I would expect this to be the case.
> 
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
**
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

RE: poor performance LISTBOX INSERT COLUMN

2017-12-05 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Arnaud,

Thanks for your thorough test.


>That's not surprising, IMHO, it's like concatenation: as the room is filled, 
>each piece added is harder to arrange than the previous. 

I understand this, but still I believe maybe there can be some performance 
improvement in the command. I cannot believe that after inserting 400 columns 
4D needs near to half a second to do this.



>each ctrl+D displays the wheel of death, each time longer than the previous. I 
>could never bear such waiting time!
->-> 4D appreciates much better duplicate at runtime. 

In my tests I also saw this happening. Duplicating each listbox in the form 
editor with 20 columns took longer and longer.
I didn't know / expected this to be faster in runtime.


Gr,

Piotr

**
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: poor performance LISTBOX INSERT COLUMN

2017-12-05 Thread Piotr Chabot Stadhouders via 4D_Tech
hi Alan,

Maybe calling the average was a bit misleading after all :

So I created a demo database with 1 form
On this form I have 12 listboxes with 1 column
On load of each listbox I insert 20 columns with LISTBOX INSERT COLUMN

Inspecting the 4D debug log I am seeing something I did mention below :
LISTBOX INSERT COLUMN becomes slower when more columns have been inserted

The first call executes in 0,001 second
The last call (240) executes in 0,029 second

Do you think this is normal behavior, because more "objects" are on the form? 
Or is this maybe a performance issue?

By the way, what did you mean with " I assumed that you were "appending" column 
instead of inserting column before existing columns " ?
I suppose you mean with the same command? Do you mean you think putting the 
column behind the last could be faster than when putting columns in front 
others?

Gr,

Piotr


> -Oorspronkelijk bericht-
> Van: Alan Chan [mailto:a...@belhk.com]
> Verzonden: maandag 4 december 2017 9:46
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Re: poor performance LISTBOX INSERT COLUMN
> 
> 4D iNug Technical <4d_tech@lists.4d.com> writes:
> >Maybe it does matter how many listboxes are on the form?
> 
> I assumed you built LB with one method per LB.
> >
> >Maybe LISTBOX INSERT COLUMN becomes slower when more columns are
> inserted?
> 
> I assumed that you were "appending" column instead of inserting column
> before existing columns.
> 
> Optimization is fun although some developers are against it.
> 
> Health warning : Optimization could be highly addictive and hazardous to your
> mentality.
> 
> Alan Chan
> 

**
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: poor performance LISTBOX INSERT COLUMN

2017-12-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip,

When the form is first displayed there are no elements in one of the arrays in 
the listboxes
Only after certain user action, like pressing a button, the arrays are 
populated, so this isn't the problem

Furthermore, I am not able to test with local 4D data because, surprise, we 
don't use the 4D datafile at all. We populate the arrays with Oracle data.

Gr,

Piotr


> maybe it is the remote data call/population of the listbox arrays?

> for comparison try:
> - populate the listbox from local (4D) data
**
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: poor performance LISTBOX INSERT COLUMN

2017-12-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Alan,

Thanks for testing! This is great news, because then maybe there is something 
else going on.
Remember, I only asked the community if this performance was normal behavior 
and if it could be confirmed.
Clearly not by you.

I tested this on an HP Intel Core i7-4710MQ 2.50GHz laptop with 24G memory
When showing the listboxes for the first time the arrays have 0 elements (after 
on load they are populated via 4D for OCI commands)
Maybe it does matter how many listboxes are on the form?
Maybe LISTBOX INSERT COLUMN becomes slower when more columns are inserted?

Miyako explained clearly LISTBOX INSERT COLUMN is a UI element, and that there 
are graphic engine calls involved
I use a 1920x1080 resolution.

I think I am going to test the creation of 20 columns for 10 listboxes on a 
blank form and see what happens.

Again, Thanks for testing Alan

Gr,

Piotr

> I just tested LISTBOX INSERT COLUMN command on array based LB that takes only 
> 0 to 1 ms to complete on my MBP 2.90GHZ with 16G memory. I'm not sure if size 
> of array is the factor.


**
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: poor performance LISTBOX INSERT COLUMN

2017-12-03 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

>I think we need to set reasonable limits on how the commands is expected to be 
>used,
>before we device that its performance is "poor".

Sorry, maybe you are right and I shouldn't have called it poor performance, but 
it was my feeling because the command takes 10 times longer to execute than all 
other commands


>is it really reasonable to insert 400 columns in one call?

When customers ask for showing 10 listboxes at once on screen, with each 
listbox having 20 columns I don't know if it is reasonable, but as you probably 
know customer is king.
Even worse, customers want 20 columns per listbox, but than are making 60% 
invisible
So, I could do a lot to make things faster. Maybe, at first only create 
listboxes that are visible, and maybe even only create at first columns that 
are visible. But I prefer not to.


>at what point in developer did you notice the "poor performance"?

I must say I don't quite remember, because it has been a while. We first had 
the issue with some forms that were less important, and not so heavily used
But I am sure it began when converting from one 4D version to another
I believe it was when we converted our app from 4D v2004 to 4D v13


>the command name suggests that it is designed to insert a single column.
>so you can imagine that it goes through the same check list for every call.

So this sounds to me that a command LISTBOX INSERT COLUMNS would be a great 
addition, maybe with a width parameter at the same time


>but the speed issue discussed in this thread,
>seem to me like a case where a command has been used in a way for which it was 
>not designed.

We use listboxes a lot and we really like them (We use array listboxes by the 
way, populated by an Oracle DB).
I think 4D invests a lot of time in making listboxes more advanced, and they 
succeed very well.
But I don't agree that inserting 400 columns in a list is something really 
spectacular.
When this command isn't designed for this, maybe they can give me another 
command that IS designed for this.

 
**
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: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Arnaud,

Array listboxes

>> Le 1 déc. 2017 à 15:49, Piotr Chabot Stadhouders via 4D_Tech 
>> <4d_t...@xxx.xxx> a écrit :
>> 
>> Hi,
>> 
>> In search of a performance problem in 1 of our forms I am asking for some 
>> advice.
>> 
>> I have succeeded in analyzing 10 4DDebuglog.txt files (using an Oracle DB by 
>> the way) and have come to following :
>> The problem is with the execution time of the "LISTBOX INSERT COLUMN"

> array or selection listbox?

> -- 
> Arnaud

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

RE: poor performance LISTBOX INSERT COLUMN

2017-12-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Tim,

> -Oorspronkelijk bericht-
> Van: Tim Nevels [mailto:timnev...@mac.com]
> Verzonden: vrijdag 1 december 2017 22:00
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Re: poor performance LISTBOX INSERT COLUMN
> 
> On Dec 1, 2017, at 2:00 PM,Piotr Chabot Stadhouders wrote:
> 
> > But, bottom line, we are skipping the fact that still the command
> > LISTBOX INSERT COLUMN is very slow compared to all other commands And
> > we wouldn't probably having this discussion if it was executed as fast
> > as the other commands
> 
> There is an old saying where a man goes to the doctor and says “when I move
> my arm like this it hurts, can you fix this” and the doctor replies “yes, 
> don’t
> move your arm like that”. :)

One could also say : "A man goes to a car mechanic and says : I have a flat 
tire. The mechanic says : Go walk" 


> 
> Is there a reason you MUST call LISTBOX INSERT COLUMN or is it just the way
> you have designed the form and your coding style. I know a lot of people think
> it is the best way to program to build all your list boxes programmatically. 
> Do it
> all with code and they have a dozen methods that do all the work. It’s a
> programming style.
> 
> The other option is to define your list boxes with the form editor defining 
> all the
> columns and properties. Then when the form is loaded all that column
> definition and insertion is eliminated. That is my personal programming
> preference.
> 
> If some of your list boxes are used for several purposes you could also create
> multiple list boxes that are stacked on top of each other, each setup exactly
> how you need it. Then you show/hide the ones you need as appropriate.

Defining the listboxes in the form editor was just the way I did it in the past.
Also putting listboxes stacked on top of each other is something I am doing 
frequently
Because I had to modify the listboxes on a regular basis (add columns in 
request of users) I decided to create them programmatically
Why does 4D implement all these new (listbox) object commands? I think just for 
this reason to create all things programmatically


> 
> I know this is probably not what you want to hear, but if you are determined 
> to
> cut down on load and display time, and you have found LISTBOX INSERT
> COLUMN is causing issues, you only have 2 choices:
> 
> 1. Wait for 4D to make a change to fix this (who knows if/when that would
> happen) 2. Don’t use LISTBOX INSERT COLUMN
> 

I am going to wait a bit more, but finally, if nothing happens, I am afraid I 
have to create al columns in the form editor again.


> Tim
> 
> 
> Tim Nevels
> Innovative Solutions
> 785-749-3444
> timnev...@mac.com
> 
> 

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

RE: CALL FORM and CALL WORKER

2017-12-01 Thread Piotr Chabot Stadhouders via 4D_Tech
In fact, the functionality explained below could be seen as setting an alarm
The alarm fires after a second (period of time)
In the meantime it can be reset to again wait for a period of time before it 
fires

Gr,

Piotr

Van: Piotr Chabot Stadhouders
Verzonden: vrijdag 1 december 2017 17:40
Aan: 4D iNug Technical <4d_tech@lists.4d.com>
Onderwerp: CALL FORM and CALL WORKER

Hi,

This is the first time I am going to use CALL FORM and CALL WORKER

I am going to convert a "Searchbox" mechanism where a user enters some 
characters and after 3 or more characters the search is started
This was done by a custom Timer mechanism implemented via a separate process 
and inter process arrays

I could call CALL FORM from within the "On After Keystroke" event of the search 
field, but there is a catch
The search isn't started right away after typing 3 characters, but waits for 1 
second to see if there are more characters typed

So, in the old way there is a method that adds a search request to the 
interprocess arrays and a process that handles the requests
However, after typing more characters within 1 second the request is reset and 
the 1 second waiting starts over again
If the 1 second passes the process calls the form with CALL PROCESS

It is this waiting part that is a problem for me to implement
I don't know how to do this with CALL FORM / WORKER

Does anybody know how to do this? Thomas Maul perhaps?

Gr,

Piotr

**
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: poor performance LISTBOX INSERT COLUMN

2017-12-01 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Chip,

Thanks for your quick response, it is much appreciated

First of all you are right that I could recode some parts and is also for other 
reasons sometimes no bad idea at all

> Load the list boxes as you go. Depending on your usage, you might only need 1,
> or 4 list boxes not 27(!)

In fact our customers have big screens an want to see a lot of data at once
They like how it is displayed right now.
I have counted the listboxes displayed at once and the number is 10 !!
So, after a lot of recoding they still have to wait for more than 5 seconds 


> When the form loads, the Tab control is used to determine what data to
> display, and the listbox is built appropriately

I know I could do something like this, and maybe there is no escaping of doing 
this
I also read about a way to create subforms and use OBJECT SET SUBFORM to 
dynamically change the subform


But, bottom line, we are skipping the fact that still the command LISTBOX 
INSERT COLUMN is very slow compared to all other commands
And we wouldn't probably having this discussion if it was executed as fast as 
the other commands


Again, thanks for your response,

Piotr


> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: vrijdag 1 december 2017 16:35
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Re: poor performance LISTBOX INSERT COLUMN
> 
> Piotr
> 
> recode this!
> On Fri, 1 Dec 2017 14:49:11 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> >
> > No big deal you could say, but for a couple of our forms it IS a big
> > deal We have a form with 27 listboxes on it, all dynamically build,
> > with a total of 477 columns
> recode this - I can't say this enough!
> 
> 
> I do not know what your interface looks like, however, I find it difficult to
> believe that more then 2 or 4 list boxes are on screen at one time, maybe not
> even that.
> 
> Load the list boxes as you go. Depending on your usage, you might only need 1,
> or 4 list boxes not 27(!)
> 
> Basic concept (assume 1 listbox on screen at a time - modify to meet your
> specific on screen needs, the base form has ONE listbox, with no
> columns)
> On load
>  - determine what is being displayed (which table/data set)
>  - setup the listbox for this data
> 
> during execution of the form.
> repeat as needed
>  - user changes 'page', using a tab control (or whatever user does to change
> displayed data)
>- determine which data set is needed based on user 'request' (above
> step)
>- (re)build the listbox for this new data set - using the SAME listbox <-- 
> this is
> the key... the SAME LISTBOX
> 
> using this approach you should not need to build/load more list boxes then are
> currently on screen.
> In addition to this you can reduce the form's complexity by removing
> 20+ list boxes, this in it self will help the form load faster, and use
> a far smaller memory footprint.
> Reducing your form complexity may increase code complexity - but the
> increase will be a LOT less then the decrease in your form's complexity.
> 
> As example:
> - Listing forms : for my systems I use a single form/listbox (selection
> based) for record listings. It is built based on the current table to be 
> displayed.
> The base listbox has NO columns in it. The listing form is a project form, 
> and in
> a few instances is used as a parent form for inheritance (when additional
> functionality is needed in addition to the standard functions provided).
> 
> - Entry forms : many of the entry forms in my systems display related data 
> (i.e.
> Invoice [parent], and Invoice items [children in listbox]).
> Some forms have as many as 11 "pages" of related information to be displayed,
> controlled by a Tab Control (not actual form pages). These entry forms have 1
> listbox on page 0 (zero), so the form has 2 pages, page 0 (zero) and page 1.
> When the form loads, the Tab control is used to determine what data to
> display, and the listbox is built appropriately. During form execution, when 
> the
> user selects a specific Tab in the control, the SAME listbox is re-built to 
> display
> that specific information.
> 
> In both of the instances (examples) above - interpretedly, in C/S, there is no
> noticeable time required to build the list boxes, regardless of how fast the 
> user
> changes tabs.
> 
> If you want some example code on how to do this, I can provide an example
> database (v11 or v13 I forget which) Actually, if anyone wants the demo - feel
> free to ask off list.
> Note: the demo stores data for building the list boxes in 3 tables in the
> database, and note THIS IS NOT a compon

CALL FORM and CALL WORKER

2017-12-01 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

This is the first time I am going to use CALL FORM and CALL WORKER

I am going to convert a "Searchbox" mechanism where a user enters some 
characters and after 3 or more characters the search is started
This was done by a custom Timer mechanism implemented via a separate process 
and inter process arrays

I could call CALL FORM from within the "On After Keystroke" event of the search 
field, but there is a catch
The search isn't started right away after typing 3 characters, but waits for 1 
second to see if there are more characters typed

So, in the old way there is a method that adds a search request to the 
interprocess arrays and a process that handles the requests
However, after typing more characters within 1 second the request is reset and 
the 1 second waiting starts over again
If the 1 second passes the process calls the form with CALL PROCESS

It is this waiting part that is a problem for me to implement
I don't know how to do this with CALL FORM / WORKER

Does anybody know how to do this? Thomas Maul perhaps?

Gr,

Piotr

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

poor performance LISTBOX INSERT COLUMN

2017-12-01 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

In search of a performance problem in 1 of our forms I am asking for some 
advice.

I have succeeded in analyzing 10 4DDebuglog.txt files (using an Oracle DB by 
the way) and have come to following :
The problem is with the execution time of the "LISTBOX INSERT COLUMN"
The performance of this command is very poor compared to other commands.
In fact, it takes about 10 times longer than every other 4D command in the logs

The LISTBOX INSERT COLUMN command takes on average 0.0286 seconds to complete, 
tested on a Intel Core i7-4710MQ 2.50GHz laptop
No big deal you could say, but for a couple of our forms it IS a big deal
We have a form with 27 listboxes on it, all dynamically build, with a total of 
477 columns

So 477 * 0.0286 seconds takes up 13.6422 seconds
This is all done in the On Load event so the user must wait terribly long for 
the form to show up on the screen

My question :
Do you think this performance of LISTBOX INSERT COLUMN is acceptable / normal 
behavior?
Can someone confirm this performance?
Is there something, other than putting listboxes on other pages, I can do about 
this?

Thanks in advance,

Piotr

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

New Log Parser says : this doesnt make sense

2017-11-30 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I am trying to use the new Log Parser, but without success

First of all, when I start logging I have 10 files of 10MB each within 1 
minute, but that's not the problem (or is it)

After loading the log files, I open the Process with the most (+200.000) debug 
entries.
After a while a get into a TRACE at the following code :

(alOpType{$a}<0) // stack level increase // negative operation means closing a 
previous call TRACE // this doesnt make sense

Does anybody know what this means?
Does it point to a problem in My code, or it it a problem of the Log Parser 
itself?

Gr,

Piotr

**
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: Subform initialize logic

2017-11-24 Thread Piotr Chabot Stadhouders via 4D_Tech
Kirk,

As an example I have the following scenario:
An employee form with a lot of fields and a checkbox “manager” on page 1
Other fields on page 2
The items of some “dropdown lists” (custom widget) on page 2 depend on the 
manager status (checkbox) on page 1

So when going through the records with next/previous buttons and being on page 
2 I have to re-populate the dropdown widgets when the manager status changes
But now, when being on page 1 and going to page 2 for the first time I also 
have to populate the dropdown widget.
So now I have 2 places where I have to populate (by method or not) the dropdown 
widget

I hope you understand what I am saying
Needing 2 calls instead of 1 is what I  don’t like

Gr,

Piotr

Piotr,

On Thu, Nov 23, 2017 at 11:01 AM, Piotr Chabot Stadhouders via 4D_Tech <
4d_t...@xxx.xxx> wrote:

> I have to do this “On Page Change”
>
​Yep, this is exactly the sort of situation that makes having the subform
config code in a process method useful - the subform doesn't need to even
know what page it's on because the parent form is controlling when it
configures itself. ​

​Is it the case your subform on page 2 changes configuration while the
parent form is displayed?​


--
Kirk Brooks
San Francisco, CA
===

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**
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...@xxx.xxx
**
**
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
**

  1   2   >