How to get array index with hierarchical listbox when using on mouse move

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

I want to use a hierarchical listbox with arrays
When I am in the on mouse move event of the listbox, how can I determine which 
element this is?
I have found a tech tip where is explained how to get the row number.
But how can I get from row number to array index?

Say I have 6 elements in a 1 parent and 1 child array, and there are 3 
different parents, than the last row number returns 9, but there are only 6 
elements in the arrays.

It must be something simple I've overlooked.

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

Entry Field questions

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

I have 2 questions about entry fields :

  1.  Although I know the best answer on forehand (Use system behavior), is 
there an (easy) way to customize entry fields (fields and variables). For 
example rounded borders, yellow background when having focus instead of blue 
border?
  2.  What is the best way to prevent users to copy / paste values with crlf in 
it?

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

RE: 4D Write Pro using expressions with XML merge file (or JSON)

2017-03-29 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Koen,

The reason I tend to XML is that I am planning to generate the merge data in 
Oracle
Only since Oracle 12c plus there are some JSON functions
So as I see it XML is kind of the standard in Oracle

Have you done something like I am planning to do in 4D Write?
I am hoping for someone having already done this and saving me some pitfalls.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Koen Van Hooreweghe [mailto:bvbacomp...@telenet.be]
> Verzonden: woensdag 29 maart 2017 11:25
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: 4D Write Pro using expressions with XML merge file (or
> JSON)
> 
> Hi Piotr,
> 
> I would advise JSON or rather 4D objects. 4D objects and JSON are not
> exactly the same, but very closely related. JSON is actually a text
> representation of a 4D object. The 4D debugger handles objects nicely too.
> You can store your data into a 4D object and then retrieve the values in your
> 4D Write area using your proposed commands. Unfortunately there is no dot
> notation (yet) available.
> But if your needs are not too complex, you could easily implement a basic
> version yourself.
> 
> HTH
> Koen
> 
> Op 29-mrt.-2017, om 09:02 heeft Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com> het volgende geschreven:
> 
> > Has anybody already done "my new way" and have experience with this?
> > Does this make sense or is there a better way to do this?
> > Is JSON for example a better alternative over XML?
> 
> 
> 
> 
> Compass bvba
> Koen Van Hooreweghe
> Kloosterstraat 65
> 9910 Knesselare
> Belgium
> tel +32 495 511.653
> 

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

Re: 4D Write Pro using expressions with XML merge file (or JSON)

2017-03-29 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Bruno,

Because it is easy to use xpath in 4D and easy to generate XML in Oracle this 
is exactly why I think this is a nice solution.

I am glad you think the same:-)

I assume one can also use attributes in xpath in 4D.

Gr,

Piotr

Op 29 mrt. 2017 21:37 schreef Bruno LEGAY :
Hi Piotr,

I have quite a bit of experience in xml as well ;-)

So if I understand well, you want to use an xpath to some xml structure 
containing the data to merge…

Also the xml is data store in Oracle (or generated on the fly by Oracle).

something like :


   
 my value
 the name
   


It is pretty easy to write a 4D function which will return the value for the 
given xpath…
Let me know I can help you on this ;-)

Let say before the merge an instance of the document you parse the xml and keep 
the xml dom ref in a global var.
Your function uses this global var to perform the xpath and return the value.
When you finished the merge of the document, don’t forget to free the dom ref 
(or you will leak memory).

Xpath in 4D is pretty basic. It makes namespace pretty transparent (namespace 
can be a pain in a properly implemented xpath « engine »).
But on the other hand, advanced xpath are not supported.
It does relative or absolute path. You can use index (default is [1])
So  parameters/debtor/nr   <=>   parameters/debtor[1]/nr[1]

In the approach above the structure will depend on your data and you will use 
4D xpath to get the data.

This is a good idea.

You could also do something like this :


   my value
   the name
   ...


In the approach the xml structure is always the same. The key attribute is used 
to get the value.
This is a pretty flexible way to do key-value arrays. It does not have the 
index flexibility that xpath has.


Cordialement,

Bruno LEGAY - A Consulting
Tél. : +33 (0)1 41 74 13 79
http://www.ac-consulting.fr

 Des compétences réunies pour des applications réussies

[cid:84BBEDAE-FDE8-4E61-8DAB-D1B1514121A0@home]
  Merci de penser à l'environnement avant d'imprimer





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

4D Write Pro using expressions with XML merge file (or JSON)

2017-03-29 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi All,

We are using 4D Write for about 20 years now.
With 4D v16R2 we think it is time to migrate to 4D Write Pro.
One thing we use a lot is expressions to merge data with document templates.
We don't use 4D records but we use 4D for OCI to connect to an Oracle database.
20 years ago we didn't know of XML (or maybe it even didn't exist) so we did it 
the array way.

The old way (still used) :
In the 4D Write template insert expressions, for example :  
INSERTFIELD("[DEBTOR_NR]") or INSERTFIELD("[DEBTOR_NAME]")
When merging the template with data retrieve data into 2 attribute-value arrays.
INSERTFIELD is executed by 4D, which looks for DEBTOR_NAME in array 1 and 
returns the value in Array 2

The new way (just an idea) :
In the 4D Write template insert expressions, for example : 
INSERTFIELD("debtor/nr") or INSERTFIELD("debtor/name")
When merging the template with data retrieve data into XML file
INSERTFIELD is executed by 4D, which handles the parameter of INSERTFIELD as 
xpath notation and finds the right element / attribute in XML file and returns 
in
An alternative could be using JSON

My question :
Has anybody already done "my new way" and have experience with this?
Does this make sense or is there a better way to do this?
Is JSON for example a better alternative over XML?

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

RE: 4D Write Pro using expressions with XML merge file (or JSON)

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

I was thinking : Wouldn't it be nice if 4D implemented some commands where we 
can easily do this kind of stuff in 4D Write Pro?
1 command to link a xml / json data file to a 4D write pro document, and 1 
counterpart to detach data file
Extend ST INSERT EXPRESSION (maybe ST INSERT XPATH) where you can insert 
directly a xml path or json dot notation string.

Gr,

Piotr


> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: woensdag 29 maart 2017 22:00
> Aan: 4d_tech@lists.4d.com
> CC: Bruno LEGAY 
> Onderwerp: Re: 4D Write Pro using expressions with XML merge file (or
> JSON)
> 
> Hi Bruno,
> 
> Because it is easy to use xpath in 4D and easy to generate XML in Oracle this
> is exactly why I think this is a nice solution.
> 
> I am glad you think the same:-)
> 
> I assume one can also use attributes in xpath in 4D.
> 
> Gr,
> 
> Piotr
> 
> Op 29 mrt. 2017 21:37 schreef Bruno LEGAY :
> Hi Piotr,
> 
> I have quite a bit of experience in xml as well ;-)
> 
> So if I understand well, you want to use an xpath to some xml structure
> containing the data to merge…
> 
> Also the xml is data store in Oracle (or generated on the fly by Oracle).
> 
> something like :
> 
> 
>
>  my value
>  the name
>
> 
> 
> It is pretty easy to write a 4D function which will return the value for the
> given xpath… Let me know I can help you on this ;-)
> 
> Let say before the merge an instance of the document you parse the xml and
> keep the xml dom ref in a global var.
> Your function uses this global var to perform the xpath and return the value.
> When you finished the merge of the document, don’t forget to free the dom
> ref (or you will leak memory).
> 
> Xpath in 4D is pretty basic. It makes namespace pretty transparent
> (namespace can be a pain in a properly implemented xpath « engine »).
> But on the other hand, advanced xpath are not supported.
> It does relative or absolute path. You can use index (default is [1])
> So  parameters/debtor/nr   <=>   parameters/debtor[1]/nr[1]
> 
> In the approach above the structure will depend on your data and you will
> use 4D xpath to get the data.
> 
> This is a good idea.
> 
> You could also do something like this :
> 
> 
>my value
>the name
>...
> 
> 
> In the approach the xml structure is always the same. The key attribute is
> used to get the value.
> This is a pretty flexible way to do key-value arrays. It does not have the 
> index
> flexibility that xpath has.
> 
> 
> Cordialement,
> 
> Bruno LEGAY - A Consulting
> Tél. : +33 (0)1 41 74 13 79
> http://www.ac-consulting.fr
> 
>  Des compétences réunies pour des applications réussies
> 
> [cid:84BBEDAE-FDE8-4E61-8DAB-D1B1514121A0@home]
>   Merci de penser à l'environnement avant d'imprimer
> 
> 
> 
> 

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

form fields and variables with rounded borders

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

Is there a (smart) way to set rounded borders to fields and variables on a form?
In other apps I am seeing the use of rounded borders for fields a lot.
I know I can set border to none and put a rounded rectangle beneath, but I was 
hoping for something easier.

Also, I often see fields without border where a (blue) line appears below the 
field when it has the focus

Is there a 4D GUI expert out here that knows how to deal with these kind of 
wishes?

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

Property list in 4D 16.1HF2 looks old

2017-07-15 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

Windows 10, 4D v16.1 hotfix 2
I noticed that the property list looks "old", i.e. with sunken checkboxes
The look and feel looks like something from years ago
Does anybody know what could be the reason of 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
**

Citrix and sys_GetEnv alternative for getting CLIENTNAME

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

For a couple of years now we use the WIN32API command sys_GetEnv to get the 
CLIENTNAME
However, we have found out that when an user is taking over his citrix session 
on another machine, the OLD CLIENTNAME is returned when using this command and 
not the name of the new machine

My questions:
We are using 4D v16, does someone know of an 4D alternative command?
If not, is there another way to get this CLIENTNAME variable?

Thanks,

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

Form with Custom Grow Box

2017-09-19 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I think I have read somewhere that it is possible somehow to create a form with 
a custom grow box.
I am not talking about maximize / minimize but on Windows the area in the right 
bottom corner of a window
I want to open a Modal form dialog box and create my own grow box.

Was I dreaming, or is this possible?

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: Form with Custom Grow Box

2017-09-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Cannon,

Thanks for the reply, I am certainly going to try it!

Do you perhaps know if there is a way to open a Movable form dialog box without 
title bar?
Because I didn't find how to do that, I want to create the grow box on a Modal 
form dialog box

Or is the reason you know how to create a custom grow box exactly for this 
reason?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Cannon Smith [mailto:can...@synergyfarmsolutions.com]
> Verzonden: dinsdag 19 september 2017 18:10
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Form with Custom Grow Box
> 
> Here is a way for doing that:
> 
> 1. Create a picture that looks like a window grabber and place it in the 
> bottom
> right of the form. Put an invisible button over top of it.
> 
> 2. In the invisible button, capture On Mouse Move and use "SET
> CURSOR(9005)” to change the mouse cursor to a resize icon.
> 
> 3. In the On Clicked event of the invisible button, capture the mouse position
> (GET MOUSE) and window position and size (GET WINDOW RECT) and store
> that information somewhere (probably process variables). Then start timer
> (every 1 ticks works fine).
> 
> 4. Every time the timer runs, capture the current mouse position and
> compute the difference from the original position. From this you can figure
> out how large the window should be at the moment and you can change it
> using SET WINDOW RECT. You should also check to see if the mouse button
> has been released (GET MOUSE) and stop the timer if it has. In the timer you
> can do the math to make sure the window doesn’t get too small, etc. as well.
> 
> HTH.
> 
> --
> Cannon.Smith
> Synergy Farm Solutions Inc.
> Hill Spring, AB Canada
> 403-626-3236
> <can...@synergyfarmsolutions.com>
> 
> 
> 
> > On Sep 19, 2017, at 9:51 AM, Piotr Chabot Stadhouders via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
> >
> > What I am actually want to do is create a form window without title bar, but
> that still is resizable.
> > Is there someone that knows how to accomplish 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: Form with Custom Grow Box

2017-09-19 Thread Piotr Chabot Stadhouders via 4D_Tech
@chip : Thanks for the suggestion, I will try this

@Miyako : Ok, then the question is : Is there a way to mimic this behavior?

What I am actually want to do is create a form window without title bar, but 
that still is resizable.
Is there someone that knows how to accomplish this?

Thanks,

Piotr

> -Oorspronkelijk bericht-
> Van: Chip Scheide [mailto:4d_o...@pghrepository.org]
> Verzonden: dinsdag 19 september 2017 15:59
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Re: Form with Custom Grow Box
> 
> having not done this
> this *might* work
> a button (picture probably)
> on mouse down - get current mouse/window coords on mouse up - get
> mouse position - resize window to that position
> 
> 
> On Tue, 19 Sep 2017 06:58:40 +, Piotr Chabot Stadhouders via 4D_Tech
> wrote:
> > Hi,
> >
> > I think I have read somewhere that it is possible somehow to create a
> > form with a custom grow box.
> > I am not talking about maximize / minimize but on Windows the area in
> > the right bottom corner of a window I want to open a Modal form dialog
> > box and create my own grow box.
> >
> > Was I dreaming, or is this possible?
> >
> > 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: Setting a detail subform's scroll position programmatically

2017-09-08 Thread Piotr Chabot Stadhouders via 4D_Tech

> On Jul 18, 2015, at 8:56 AM, Jeff Grann wrote:

>

> 4Dv14/v15

>

> There doesn't seem to be a way to set a detail subform's scroll position 
> programmatically. OBJECT SET SCROLL POSITION doesn't work with detail 
> subforms.

>

> Am I missing something? Is there a workaround?

>


Dear Jeff Grann,

Windows 10, 4D v16
2 years after your post I have the same question : Is there a way to 
programmatically set the scroll position of a detail subform.
Is this already possible some way or the other? Or do you already have a 
workaround?

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

OBJECT get variable type

2017-09-08 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

V16

Maybe this is a stupid question but I just don't see it :
When putting a variable on a form and set a variable name to t I attach a 
variable to the object, for example a C_TEXT variable
However, there is also a property "Variable Type", that doesn't necessarily has 
to be of type text, but can be string from example

How can I get the value of this property?
I can retrieve the type of the attached variable, but how can I get the 
"Variable Type" property?

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

RE: OBJECT get variable type

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

Thank you for clarifying this.

My reason for asking is this :
We are using 4D for OCI to interact with an Oracle database
In our tables we have text columns (VARCHAR2) with length 255, text columns 
with length 4000 and CLOBs
I was hoping that I could use the variable type property to determine if I am 
dealing with a 255 or 4000 variable for example so I can prevent the user from 
typing more characters than possible for the corresponding column

I know I can solve this with object naming for example "my_text_field", 
"my_string_field" but I was thinking of another way
When I know the "subtype", I can then handle typing in the "On before keystroke"

Off course setting a max length field as property for an object would be the 
ideal world.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> Verzonden: zaterdag 9 september 2017 2:18
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: OBJECT get variable type
> 
> Hello,
> 
> the variable type property serves two purposes:
> 
> to filter the display in the property list, and to declare the data source
> variable type in case no variable name is defined.
> 
> otherwise, you only need to know OBJECT Get type which is constant for the
> object, and OBJECT Get pointer which tells you the type of the current bound
> variable.
> 
> notice the term "current".
> 
> the bound variable can change at runtime (see OBJECT SET DATA SOURCE),
> so the initial "variable type" has no real value in code.
> 
> > 2017/09/09 3:18、Piotr Chabot Stadhouders via 4D_Tech
> > <4d_tech@lists.4d.com> のメール:
> >
> > How can I get the value of this property?
> > I can retrieve the type of the attached variable, but how can I get the
> "Variable Type" property?
> 
> 
> 

**
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: Widget questions

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

Thanks for your clear explanation, it is much appreciated.
I must say that when reading all this below, it is no invitation to create 
widgets, but I am not giving up.
I am trying to create a custom dropdown list that I can use wherever I want, on 
every form and every page I want.
I don't understand why this must be so complicated. Is it because of overcoming 
technical problems, or is it designed like this for a reason?

I have put some comments below. I hope you are willing to look at them.
If all of this is already explained in some document I am eager to read it.

Thanks again,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> Verzonden: maandag 4 september 2017 17:28
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Widget questions
> 
> the challenge is a bit more complex than that.
> 
> the "On Load" event for a widget is fired when a widget is created, which is
> when the page is displayed for any pages other than 0 or 1.
> 
> this is documented.
> 
> http://doc.4d.com/4Dv15/4D/15.4/Form-event.301-3274360.en.html

Thanks for pointing this out. When something is documented, it isn't some kind 
of bug. Glad to know!


> 
> > • On Load and On Unload: respectively opening and closing of the subform
> (these events must also have been activated at the parent form level in
> order to be taken into account). Note that these events are generated
> before those of the parent form. Also note that, in accordance with the
> operating principles of form events, if the subform is placed on a page other
> than page 0 or 1, these events will only be generated when that page is
> displayed/closed (and not when the form is displayed/closed.
> 
> the widget is destroyed when you leave the page, but the variables are not,
> because their scope is the form or process.
> so you need to differentiate between the first and subsequent occurrences
> of "On Load".
> you can do that with a "flag" variable, kind of "pragma once" signal inside 
> the
> widget.

OK, I think I know how to set "attributes" in a widget by putting hidden 
objects on the form and setting the values of these objects (I took this by 
example from your widgets)
I am beginning to teach my self not to use variables when not needed. So how 
(in what form) do you store this "flag" variable? Is it a real variable, or an 
object on the form containing the value?

Is this technique also used in one of your widgets?

You say "The widget is destroyed , but the variables are not". What do you mean 
with "The widget is destroyed" this?

> 
> but that is not all.
> 
> normally, when you resize the window, all objects on pages that are not
> currently displayed are also logically resized, so their size and position are
> adjusted according to their resize property (grow or move) when you switch
> to that page.
> 
> however, inner objects of a widget cannot respond to form resize events
> while a different page is displayed, because the parent object (the subform
> container) exists but the inner objects do not.
> 
> so, when you switch pages,
> you need to update the size and position of each inner object of a widget
> according to its container size, which might have changed while a different
> page was being displayed.
> 
> an you might have guessed,
> but this applies to page 1 as well.
> if you move to a second page,
> the widget on page 1 is destroyed (not the variables) and the resizing can go
> out of sync.
> 
> so really, it is not good enough to keep all widgets on page 0 or 1, it is 
> also
> important to not have multiple pages (or otherwise fix the window size).

So what you are saying is better to keep all widgets on page 0 and only 1 page 
forms when using widgets, or else you have a lot of problems to overcome? This 
doesn't sound developer friendly.


> 
> widgets can go any number of levels deep, so I think it is reasonable that 4D
> does not bubble and capture events for all widgets on all levels on all pages.
> 
> to design complex forms on a single page, you could take advantage of
> "object views".
> 
> http://doc.4d.com/4Dv15/4D/15.4/Using-object-views.300-3285345.en.html
> 

Thanks for the tip.


> > 2017/09/04 23:48、Piotr Chabot Stadhouders via 4D_Tech
> > <4d_tech@lists.4d.com> のメール:
> > It looks like a subform on a page is only recognized when this page has
> been fully loaded and drawn?
> 
> 
> 

**
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: [ANN] 4D v16.2 ready for download

2017-09-06 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Brian,

Windows 10
I notice something strange (I also noticed this in 16.1 HF2 and posted this 
here without a response) :
In the property list the checkboxes and also the edit button look like an 
"earlier" windows version,
i.e. the checkboxes have a sunken border and the button a raised border
In v16.1 these object look as expected in Windows 10, i.e. "flat", i.e. 
checkboxes flat black border and edit button flat gray border

This is not a problem of course but I am wondering if there lies another 
problem beneath.

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Brian Young [mailto:byo...@4d.com]
> Verzonden: dinsdag 5 september 2017 21:00
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: [ANN] 4D v16.2 ready for download
> 
> We are pleased to announce the availability of the latest update to our 4D
> v16 product line:
> 
>4D v16.2
> 
> 
> In addition to bug fixes, 4D v16.2 contains the open source Xerces library
> upgrade to version 3.1.4.
> 
> Registered users may download 4D v16.2 for free from the 4D download
> page, where the latest compatibility matrix and release notes are also
> available.
> 
> Download:
> http://www.4d.com/downloads/products.html
> 
> Compatibility matrix:
> http://download.4d.com/Documents/Products_Documentation/LastVersion
> s/Line_16/VIntl/4D_v16_2_Certif_EN.pdf
> 
> Release notes:
> http://download.4d.com/Documents/Products_Documentation/LastVersion
> s/Line_16/VIntl/4D_v16.2_ReleaseNotes.pdf
> 
> 
> 
> 
> 
> Stay Connected:
> https://twitter.com/4Dsoftware
> https://www.linkedin.com/company/4d
> https://www.youtube.com/user/4Dsoftware
> https://www.facebook.com/4Dsoftware/
> http://forums.4d.com/
> http://blog.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
**

font color with disabled 3D button

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

We are setting a font color for 3D buttons

However, when the button is disabled on Windows this font color becomes gray, 
but on OSX the color stays the same as the original color

Is this normal behavior (So the behavior on OSX and Windows differs) ?

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

Widget performance

2017-08-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v16, Windows 10

Despite all advice saying to use standard 4D objects, I am on the verge of 
creating my own dropdown menu.
We have a multi-platform application and want to have its own unique L

I think I can create a dropdown as a widget, but what I am worried about is 
performance
As a test I have created a form with 100 Date entry Widgets on it
Opening the form compiled on a quite fast Windows laptop took about 2 seconds.

I am not saying that I am going to create forms with 100 dropdowns on it, but 
it worries me.
Does anybody else have experience with the use of a lot of widgets on a form?

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: Listbox header OSX

2017-08-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Thanks for your answer. As I understand correctly the only way to get rid of 
the lines is by changing system appearances in OSX.

Gr,

Piotr




Miyako wrote :

"Hello,



the Header of a listbox takes after the appearance of a standard menu bar.

on Windows 10, the menu bar happens to be white and has no borders and so does 
the Header.

but you can configure system appearances (themes) and that will have an effect 
on Headers too.



as for borders on Mac, you should be able to see that the borders of the 
Listbox itself can be hidden,

in which case the borders of the Header on the sides are also gone.



the lines above and below the Header are thinner than what you can define as a 
line in 4D,

I would assume that it originates with the system."


> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: vrijdag 25 augustus 2017 9:56
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Listbox header OSX
> 
> Hi,
> 
> 4D v16, OSX
> 
> When I set the border line style of a listbox to none OSX still shows a line
> above the header. On windows this line disappears as expected.
> Does this make sense? Does anybody know how to get rid of the line above
> the listbox header on OSX?
> 
> 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: Widget performance

2017-08-26 Thread Piotr Chabot Stadhouders via 4D_Tech
Thanks Miyako and Jody,

The thing I most worry about is the performance overhead of subforms.
I would suspect a subform is "heavier" than a simple field or button for 
example.

Can someone tell me what the subform performance overhead is?
After all, when inserting 100 widget I am in fact inserting 100 subforms.

Gr,

Piotr



> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: vrijdag 25 augustus 2017 9:40
> Aan: 4d_tech@lists.4d.com
> Onderwerp: Widget performance
> 
> Hi,
> 
> 4D v16, Windows 10
> 
> Despite all advice saying to use standard 4D objects, I am on the verge of
> creating my own dropdown menu.
> We have a multi-platform application and want to have its own unique L
> 
> I think I can create a dropdown as a widget, but what I am worried about is
> performance As a test I have created a form with 100 Date entry Widgets on
> it Opening the form compiled on a quite fast Windows laptop took about 2
> seconds.
> 
> I am not saying that I am going to create forms with 100 dropdowns on it, but
> it worries me.
> Does anybody else have experience with the use of a lot of widgets on a
> form?
> 
> 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
**

Listbox header OSX

2017-08-25 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

4D v16, OSX

When I set the border line style of a listbox to none OSX still shows a line 
above the header. On windows this line disappears as expected.
Does this make sense? Does anybody know how to get rid of the line above the 
listbox header on OSX?

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: Widget questions

2017-09-04 Thread Piotr Chabot Stadhouders via 4D_Tech
> Do you know of problems when using widgets on pages > 1? Or should there
> be no problems?

OK, I narrowed down the problem, and maybe someone can tell me what is the best 
way to handle this:
I want to enable/disable or set some value to objects / widgets in On load of 
the main form
Because my widget (=subform) is on page 2 for example, for some reason, 4D 
doesn't find the pointer to the variable of the object in the on load event

So  $object_ptr:=OBJECT Get pointer(Object named;$objectName;$widgetName)  
returns Nil

(Furthermore it seems that the on load of the subform is executed AFTER the on 
load of the form)

Maybe this is normal standard behavior, but I didn't expect this.
Now, to initialize the widget (disable + set value) I run the command SET 
TIMER(1) at the end of the on load event (Even CALL FORM did't help me)

So, what is the best way to initialize widgets that are on page 2, 3 ?

Thanks,

Piotr

> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders
> Verzonden: vrijdag 1 september 2017 20:46
> Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Widget questions
> 
> Hi Miyako,
> 
> Since I discovered you are a widget expert (in fact I believe you are an 
> expert
> on everything concerning 4D) I hope you can answer some other questions 
> 
> I am developing another widget based on a subform with a vertical scrollbar
> (i.e. a calendar with 12 vertical months). On this subform I have 3D
> checkboxes
> - When the mouse is over the 3D buttons the scrollbar doesn't respond when
> using the scrollbar. Do you have an answer / solution?
> - When selecting a date by programming, 5 october for example, I want to
> scroll down to that date, but I can't find how I can scroll on a input 
> subform by
> programing. Do you know how this can be done?
> 
> Do you know of problems when using widgets on pages > 1? Or should there
> be no problems?
> 
> Gr,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> > Verzonden: donderdag 31 augustus 2017 9:03
> > Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> > <4d_tech@lists.4d.com>
> > Onderwerp: RE: Widget performance
> >
> > Hi Miyako,
> >
> > Searching for some tips about widgets (subforms) and handling focus,
> > setting disabled, etc. I found this link on the iNUG:
> > https://github.com/miyako/4d-widget-custom-picture-button/wiki
> >
> > I must say I really like what you have done, and the source code is
> > really helpful understanding how to implement widgets.
> > I would advise everybody to have a look at this widget, and others,
> > you have created.
> >
> > These widgets most of the time are created with 4D v14.
> > Would you do (some) things differently when using v16?
> >
> > Thanks,
> >
> > Piotr
> >
> > > -Oorspronkelijk bericht-
> > > Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> > > Verzonden: zaterdag 26 augustus 2017 0:32
> > > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > > Onderwerp: Re: Widget performance
> > >
> > > there is a "duplicate by matrix" menu in the form editor, which
> > > allows you to quickly experiment with tens of thousands of objects.
> > > maybe it is the execution code setup code that is taking 2 seconds.
> > >
> > > in my experience, a form with thousands of form objects is nothing
> > > uncommon.
> > >
> > > > 2017/08/25 16:39、Piotr Chabot Stadhouders via 4D_Tech
> > > > <4d_tech@lists.4d.com> のメール:
> > > > Opening the form compiled on a quite fast Windows laptop took
> > > > about
> > > > 2
> > > seconds.
> > >
> > >
> > >

**
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: Widget questions

2017-09-04 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Jim,


Jim Dorrance wrote :
" I put on page 0 and set visible/invisible."


Yes, I noticed that when putting the widget on page 0 it works.
Unfortunately I want to use widgets a lot
In this example I have a form with 9 pages, with on some pages more than 5 
widgets
This will create a lot of mess when putting all on page 0 and set it visible / 
invisible

I am hoping for some other solution

It looks like a subform on a page is only recognized when this page has been 
fully loaded and drawn?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders
> Verzonden: maandag 4 september 2017 13:39
> Aan: '4D iNug Technical' <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: RE: Widget questions
> 
> > Do you know of problems when using widgets on pages > 1? Or should
> > there be no problems?
> 
> OK, I narrowed down the problem, and maybe someone can tell me what is
> the best way to handle this:
> I want to enable/disable or set some value to objects / widgets in On load of
> the main form Because my widget (=subform) is on page 2 for example, for
> some reason, 4D doesn't find the pointer to the variable of the object in the
> on load event
> 
> So  $object_ptr:=OBJECT Get pointer(Object
> named;$objectName;$widgetName)  returns Nil
> 
> (Furthermore it seems that the on load of the subform is executed AFTER
> the on load of the form)
> 
> Maybe this is normal standard behavior, but I didn't expect this.
> Now, to initialize the widget (disable + set value) I run the command SET
> TIMER(1) at the end of the on load event (Even CALL FORM did't help me)
> 
> So, what is the best way to initialize widgets that are on page 2, 3 ?
> 
> Thanks,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Piotr Chabot Stadhouders
> > Verzonden: vrijdag 1 september 2017 20:46
> > Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> > <4d_tech@lists.4d.com>
> > CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> > Onderwerp: Widget questions
> >
> > Hi Miyako,
> >
> > Since I discovered you are a widget expert (in fact I believe you are
> > an expert on everything concerning 4D) I hope you can answer some
> > other questions 
> >
> > I am developing another widget based on a subform with a vertical
> > scrollbar (i.e. a calendar with 12 vertical months). On this subform I
> > have 3D checkboxes
> > - When the mouse is over the 3D buttons the scrollbar doesn't respond
> > when using the scrollbar. Do you have an answer / solution?
> > - When selecting a date by programming, 5 october for example, I want
> > to scroll down to that date, but I can't find how I can scroll on a
> > input subform by programing. Do you know how this can be done?
> >
> > Do you know of problems when using widgets on pages > 1? Or should
> > there be no problems?
> >
> > Gr,
> >
> > Piotr
> >
> > > -Oorspronkelijk bericht-
> > > Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> > > Verzonden: donderdag 31 augustus 2017 9:03
> > > Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> > > <4d_tech@lists.4d.com>
> > > Onderwerp: RE: Widget performance
> > >
> > > Hi Miyako,
> > >
> > > Searching for some tips about widgets (subforms) and handling focus,
> > > setting disabled, etc. I found this link on the iNUG:
> > > https://github.com/miyako/4d-widget-custom-picture-button/wiki
> > >
> > > I must say I really like what you have done, and the source code is
> > > really helpful understanding how to implement widgets.
> > > I would advise everybody to have a look at this widget, and others,
> > > you have created.
> > >
> > > These widgets most of the time are created with 4D v14.
> > > Would you do (some) things differently when using v16?
> > >
> > > Thanks,
> > >
> > > Piotr
> > >
> > > > -Oorspronkelijk bericht-
> > > > Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> > > > Verzonden: zaterdag 26 augustus 2017 0:32
> > > > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > > > Onderwerp: Re: Widget performance
> > > >
> > > > there is a "duplicate by matrix" menu in the form editor, which
> > > > allows you to quickly experiment with tens of thousands of objects.
> > > > maybe it is the execution code setup code that is taking 2 seconds.
> > > >
> > > > in my experience, a form with thousands of form objects is nothing
> > > > uncommon.
> > > >
> > > > > 2017/08/25 16:39、Piotr Chabot Stadhouders via 4D_Tech
> > > > > <4d_tech@lists.4d.com> のメール:
> > > > > Opening the form compiled on a quite fast Windows laptop took
> > > > > about
> > > > > 2
> > > > seconds.
> > > >
> > > >
> > > >

**
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: Widget questions

2017-09-01 Thread Piotr Chabot Stadhouders via 4D_Tech
Sorry,

I meant : When the mouse is over the 3D buttons the scrollbar doesn't respond 
when using the SCROLL WHEEL

> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders
> Verzonden: vrijdag 1 september 2017 20:46
> Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> <4d_tech@lists.4d.com>
> CC: Piotr Chabot Stadhouders <p.stadhoud...@timeff.com>
> Onderwerp: Widget questions
> 
> Hi Miyako,
> 
> Since I discovered you are a widget expert (in fact I believe you are an 
> expert
> on everything concerning 4D) I hope you can answer some other questions 
> 
> I am developing another widget based on a subform with a vertical scrollbar
> (i.e. a calendar with 12 vertical months). On this subform I have 3D
> checkboxes
> - When the mouse is over the 3D buttons the scrollbar doesn't respond when
> using the scrollbar. Do you have an answer / solution?
> - When selecting a date by programming, 5 october for example, I want to
> scroll down to that date, but I can't find how I can scroll on a input 
> subform by
> programing. Do you know how this can be done?
> 
> Do you know of problems when using widgets on pages > 1? Or should there
> be no problems?
> 
> Gr,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> > Verzonden: donderdag 31 augustus 2017 9:03
> > Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> > <4d_tech@lists.4d.com>
> > Onderwerp: RE: Widget performance
> >
> > Hi Miyako,
> >
> > Searching for some tips about widgets (subforms) and handling focus,
> > setting disabled, etc. I found this link on the iNUG:
> > https://github.com/miyako/4d-widget-custom-picture-button/wiki
> >
> > I must say I really like what you have done, and the source code is
> > really helpful understanding how to implement widgets.
> > I would advise everybody to have a look at this widget, and others,
> > you have created.
> >
> > These widgets most of the time are created with 4D v14.
> > Would you do (some) things differently when using v16?
> >
> > Thanks,
> >
> > Piotr
> >
> > > -Oorspronkelijk bericht-
> > > Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> > > Verzonden: zaterdag 26 augustus 2017 0:32
> > > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > > Onderwerp: Re: Widget performance
> > >
> > > there is a "duplicate by matrix" menu in the form editor, which
> > > allows you to quickly experiment with tens of thousands of objects.
> > > maybe it is the execution code setup code that is taking 2 seconds.
> > >
> > > in my experience, a form with thousands of form objects is nothing
> > > uncommon.
> > >
> > > > 2017/08/25 16:39、Piotr Chabot Stadhouders via 4D_Tech
> > > > <4d_tech@lists.4d.com> のメール:
> > > > Opening the form compiled on a quite fast Windows laptop took
> > > > about
> > > > 2
> > > seconds.
> > >
> > >
> > >

**
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: Widget questions

2017-09-02 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Timothy,

Thanks for your answer!

We are 4D partner but I don't know if I can, and if so how I can vote for your 
bug.

Do you know how I can do that?

Thanks,

Piotr

> -Oorspronkelijk bericht-
> Van: Timothy Penner [mailto:tpen...@4d.com]
> Verzonden: vrijdag 1 september 2017 21:22
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>; Keisuke Miyako
> 
> CC: Piotr Chabot Stadhouders 
> Onderwerp: RE: Widget questions
> 
> Hi Piotr,
> 
> > I meant : When the mouse is over the 3D buttons the scrollbar doesn't
> respond when using the SCROLL WHEEL
> 
> Although I don't recall trying with a 3D Button, I am aware of the following
> bug that I filed for a v16 case:
> 
> ACI0096405  [135202] Scrolling a subform stops when the mouse is above an
> enterable object
> 
> Basically, if you had a scrollable subform, and you scrolled it using the 
> mouse
> wheel, it would stop scrolling when the mouse gets positioned above an
> enterable object. This behavior was seen in both v15.x and v16.x plus v13.6
> and v14.6 (I didn't test v12 or older versions) so the behavior has existed 
> for
> at least 4 major versions (13-16).
> 
> The bug is listed as in progress.
> 
> Hope this helps!
> 
> -Tim
> 
> 
> 
> Timothy Penner
> Technical Services Engineer
> 
> 4D Inc
> 95 S. Market Street, Suite #240
> San Jose,CA 95113
> United States
> 
> Telephone: +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
**

Widget questions

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

Since I discovered you are a widget expert (in fact I believe you are an expert 
on everything concerning 4D) I hope you can answer some other questions 

I am developing another widget based on a subform with a vertical scrollbar 
(i.e. a calendar with 12 vertical months). On this subform I have 3D checkboxes
- When the mouse is over the 3D buttons the scrollbar doesn't respond when 
using the scrollbar. Do you have an answer / solution?
- When selecting a date by programming, 5 october for example, I want to scroll 
down to that date, but I can't find how I can scroll on a input subform by 
programing. Do you know how this can be done?

Do you know of problems when using widgets on pages > 1? Or should there be no 
problems?

Gr,

Piotr

> -Oorspronkelijk bericht-
> Van: Piotr Chabot Stadhouders [mailto:p.stadhoud...@timeff.com]
> Verzonden: donderdag 31 augustus 2017 9:03
> Aan: Keisuke Miyako <keisuke.miy...@4d.com>; 4D iNug Technical
> <4d_tech@lists.4d.com>
> Onderwerp: RE: Widget performance
> 
> Hi Miyako,
> 
> Searching for some tips about widgets (subforms) and handling focus, setting
> disabled, etc. I found this link on the iNUG:
> https://github.com/miyako/4d-widget-custom-picture-button/wiki
> 
> I must say I really like what you have done, and the source code is really
> helpful understanding how to implement widgets.
> I would advise everybody to have a look at this widget, and others, you have
> created.
> 
> These widgets most of the time are created with 4D v14.
> Would you do (some) things differently when using v16?
> 
> Thanks,
> 
> Piotr
> 
> > -Oorspronkelijk bericht-
> > Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> > Verzonden: zaterdag 26 augustus 2017 0:32
> > Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> > Onderwerp: Re: Widget performance
> >
> > there is a "duplicate by matrix" menu in the form editor, which allows
> > you to quickly experiment with tens of thousands of objects.
> > maybe it is the execution code setup code that is taking 2 seconds.
> >
> > in my experience, a form with thousands of form objects is nothing
> > uncommon.
> >
> > > 2017/08/25 16:39、Piotr Chabot Stadhouders via 4D_Tech
> > > <4d_tech@lists.4d.com> のメール:
> > > Opening the form compiled on a quite fast Windows laptop took about
> > > 2
> > seconds.
> >
> >
> >

**
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: Widget performance

2017-08-31 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Miyako,

Searching for some tips about widgets (subforms) and handling focus, setting 
disabled, etc. I found this link on the iNUG:
https://github.com/miyako/4d-widget-custom-picture-button/wiki

I must say I really like what you have done, and the source code is really 
helpful understanding how to implement widgets.
I would advise everybody to have a look at this widget, and others, you have 
created.

These widgets most of the time are created with 4D v14.
Would you do (some) things differently when using v16?

Thanks,

Piotr

> -Oorspronkelijk bericht-
> Van: Keisuke Miyako [mailto:keisuke.miy...@4d.com]
> Verzonden: zaterdag 26 augustus 2017 0:32
> Aan: 4D iNug Technical <4d_tech@lists.4d.com>
> Onderwerp: Re: Widget performance
> 
> there is a "duplicate by matrix" menu in the form editor, which allows you to
> quickly experiment with tens of thousands of objects.
> maybe it is the execution code setup code that is taking 2 seconds.
> 
> in my experience, a form with thousands of form objects is nothing
> uncommon.
> 
> > 2017/08/25 16:39、Piotr Chabot Stadhouders via 4D_Tech
> > <4d_tech@lists.4d.com> のメール:
> > Opening the form compiled on a quite fast Windows laptop took about 2
> seconds.
> 
> 
> 

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

Subform initialize logic

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

4D v16.2
I am using a subform in my app (a widget)
As I understand correctly, when not on page 1, this subform is only initialized 
when the page is loaded
In my widget I have an attribute defined called "enabled"
When using a dropdown for example, I can disable the dropdown "On load", even 
when the dropdown is on page 2
Because the widget is not initialized on load (because it is on page 2), I have 
to "remember" the disabled state in a variable, or re-execute the disable 
logic, when changing to page 2

Am I correct in this? Or am I missing something.
While trying to eliminate variables I have to introduce others. This doesn't 
make sense to me

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-23 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi Kirk,

Thanks for your comprehensive explanation.
I think I am on the right track.
A lot of things you are saying I am already doing, based on some example 
components

My widget is a “custom dropdown list” widget
I am converting system dropdown lists to this widget
The system dropdowns are populated by arrays in the form on load event
However, in the process of converting, I have to remember that populating the 
custom ones on load has no effect when the widget is not on page 0 or 1
I have to do this “On Page Change”

Gr,

Piotr


Piotr,

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

> As I understand correctly, when not on page 1, this subform is only
> initialized when the page is loaded
>

​I assume you are talking about a subform you placed in the design
environment and not one where you used OBJECT SET SUBFORM.
I'll also assume by "initialized" you mean it fires an On load form event.

When and how often a subform gets the On Load form event depends on what
page it's on, as you have noticed.
If the subform is on:

page 0 - On Load ONLY the first time the parent form is loaded
page 1 - When the form is loaded AND each time you re-load page 1
(assuming the parent form has more than 1 page)
page 2+ - Each time that page is loaded - which means each time you use
GOTO PAGE (n)


​You can see this for yourself: make a simple subform with a single
variable. The form method simply writes the form event to this variable and
then calls the parent method. Make a 2 page form and put this subform on
Page 0, 1 and 2 (label them to keep them straight). Load the parent form
and watch the how each form event is handled.


> In my widget I have an attribute defined called "enabled"
> When using a dropdown for example, I can disable the dropdown "On load",
> even when the dropdown is on page 2
> Because the widget is not initialized on load (because it is on page 2), I
> have to "remember" the disabled state in a variable, or re-execute the
> disable logic, when changing to page 2
>
​
Now we're talking about strategies for managing subforms. As with most
things 4D there isn't a single strategy that's 'best' for every situation
and especially with subforms because they can be used in so many different
ways. ​With that in mind my preferred strategy for handling subform config
is to put the subform config in a process method and call it from the
parent form.

There's no rule that says the subform has to initialize itself or if it
does the code has to be in the subform method. Sometimes it's easier if you
control when this happens. So just move all the subform config code to a
process method and call it using EXECUTE METHOD IN
SUBFORM("subform";"Subform_config_method"). A bonus here is you can pass
params, like a c-obj, to dial in the setup. You can also call it from the
subform method if you need to.

​This is especially handy if, as you describe, you want to do all the
config while the parent form is loading. This way you can. ​Or to circle
back to the case of using OBJECT SET SUBFORM this is a reliable way to
handle config.

While trying to eliminate variables I have to introduce others. This
> doesn't make sense to me
>
​True but it's a matter of scope. ​A subform, especially a widget, is like
a mini-process within the parent form that can have its own variables and
it's own set of form events it responds to. That can be quite useful but it
means you have to have a little more infrastructure on the subform to take
advantage of it. Again a couple of strategies:

you can have invisible subform variables

you can use duplicate object to populate a subform with specific objects

you can use the parent form object as the data object

​#3 is especially useful in v16 since the subform object can be a c-object.
​In your specific case I bet you already have a form boolean var called
'enabled'. You know it doesn't have to be visible and it doesn't have to be
big - you can set it's coords to 0 width and 0 height.

Gr,
>
​Hope this gives you some ideas.
​
--
Kirk Brooks
San Francisco, CA
===
**
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
**

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

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

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

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

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

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

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

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

BUG in ST Get content type?

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

4D v16R4

I use the "loop example" to get all expressions in a WP area
However, when the first "character" of the text in the area is an expression, 
this expression is skipped (not seen)
It seems that when I call  $type:=ST Get content 
type*;"WParea";$start;$end;$startBlock;$endBlock) for the first time, with
$start:=ST Start text
$end:=ST End text

It returns $type=3, with $startBlock=1 and $endBlock=2, while it should return 
in my opinion $type=2 (i.e. expression type)

Does anybody think, as I do, this is a bug? Or am I missing something.

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

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

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

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

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

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

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

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

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

Selecting tables in a Write Pro Area

2017-10-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

I am experimenting with 4D Write Pro.
Because WP only supports inline pictures I thought to give tables a try, i.e to 
insert a picture in a cell and text in a next cell (what is a "workaround" for 
wrapping text around a picture)

Inserting a table with some cells is no problem, but I have no idea how to 
select a table in an area by programming.
Even more, I find selecting other objects, like pictures, not intuitive as well

Does anybody know how to select a table in an WP area by programming?

Thanks,

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

4D Write Pro and SMTP_Body

2017-10-20 Thread Piotr Chabot Stadhouders via 4D_Tech
Hi,

We use 4D to send HTML emails
Until now we used 4D Write to generate the mail body, and convert it to HTML 
(WR SAVE DOCUMENT ($area;$docpath;wr HTML 4 document))

Now we want to convert this to 4D Write Pro.
In WP there is a command WP EXPORT VARIABLE to convert an area to HTML ("wk 
mime html" or "wk web page html 4D")
Because we don't use SMTP_QuickSend but SMTP_Send with SMTP_Body, we cannot use 
"wk mime html" but have to use "wk web page html 4D"

My questions :

  *   Am I right that we can't use use "wk mime html" but have to use "wk web 
page html 4D"?
  *   Is it true that the use of bullets in HTML is not supported when sending 
by email?

Thanks,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >