Hey Piotr,

On Wed, Mar 21, 2018 at 2:50 AM, Piotr Chabot Stadhouders via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> > 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
>
​I recall that thread. yeah, building all those listboxes as you were was -
heroic.​

> The version you are using also may matter
> I use 4D v16 R6 on Windows and OSX
>
​Being on the bleeding edge like this can be problematic. And there are
differences between 32 bit and 64  bit that crop up in unexpected places.

This is a complex form. Do you need to be on R6? Could you be on v16.3 just
for the sake of stability? ​


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

​It might well be a bug. ​


> 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
>
​Maybe but I doubt it. The web area is more or less like any other object
on the form at that level. I don't think there is anything about it that's
going to 'bleed out' as it were and contaminate the other objects.

Y
​ou touch on a good point about the order that your objects load. Remember
it goes like this:

Objects on subforms
Subform form method  (but the On load event only fires once - when the
parent form loads the first time)
objects on parent form
parent form method


​If you do alot, or all, of the ​form configuration in the On load form
event of the Parent Form you must remember that you are doing so AFTER
everything else has already run.

I'm not saying not to do that config there. I do it in almost all my forms.
It's just you have to set up the form to accommodate it. It's not hard. I
use EXECUTE IN SUBFORM from here to configure my subforms, for example. I
also deselect the On load event on all the subform objects (the ones on the
parent form) just to keep control.

Also, if you have an input form that allows you to navigate through some
records (next, previous, etc) and you have a subform on it the subform form
method will only fire the first time the parent form loads. It DOES NOT
fire each time you change records like the parent form does. This can be
very confusing.

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
>
​maybe​


> - 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
>
​It may not be an issue with _what_ the objects render but the _sequence_
they render in. ​If you expect these subforms to load in a particular order
or they depend on data in another subform this will be really challenging
unless you centralize this setup work.

-- 
Kirk Brooks
San Francisco, CA
=======================

*We go vote - they go home*
**********************************************************************
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
**********************************************************************

Reply via email to