Order of events

Hi

I’d like to come back to a discussion we already had two years ago: Its about a hook for a parent form to configure child forms. We still have the same problem and are forced to build workarounds to solve the problem:

Imagine a main form M and a subform S. The order of onLoad/onShow is as follows:
M.onLoad
S.onLoad
M.onShow
S.onShow

In the main form we would like to set a selected menu item in the subform. But in the M.onShow method, S does not have any data loaded. And when S has data loaded, M has no hook to get informed. We think the right order would be:
M.onLoad
S.onLoad
S.onShow
M.onShow
to prevent cross dependencies between M and S.

Could you please have a look at this long term problem we encounter and think about the event order again?

The thread was:
http://forum.servoy.com/viewtopic.php?f=1&t=6865&st=0&sk=t&sd=a&start=30#p33870

Thank you and regards

Hi Birgit,

Maybe you should make it a poll.

I tend to agree with the current order so you would receive a NO vote from me but I might be one of the few.
With a poll you (but Servoy as well) would know how many want this…

Just my 2cents

I agree with Marcel.

Usually a child form is there to further customize the parent form, and usually it is the child form that is aware of / is able to use the parent form, not the other way around. In your case, isn’t it possible to use S as main form and M as child form?

I had a look now at the old posts - and it was about tab-panel “parent-child” relations. The comment above was really meant for form inheritance…

I’m about to check the literature (and hope to find something supporting me :-)).
Will come back to the topic as soon as I know more.

Thank you and regards

to also say a bit on this area
the current way is correct

a child cant be called show on if the parent isnt already shown itself. Because how can a child be visible if the parent isnt visible yet? Thats impossible so therefor the current behavior is correct

i guess what you want is on the main form an event like “fullyInitialized” or “afterShow” that is another event that is called after show

Correct. That’s exactly what I thought of. A hook for a parent to allow child initialization.
I would appreciate it a lot.

Regards
Birgit