GetActiveWindow not returning current active window form

Forum to discuss the new web client version of Servoy.

GetActiveWindow not returning current active window form

Postby dev-ws-011 » Wed Sep 23, 2020 3:04 pm

Hi All,

I am working with NG Desktop client application. I observed a problem in NG Client with application.getActiveWindow().controller.getName() that it is not returning current active window controller name at time of 'onResize' event and after form is loaded/shown completely, it then returns correct form name.

However, in Smart Client it returns correct form name i.e. current active window controller name even at 'onResize' event, this seems to be change in functionality.

Any help is highly appreciated.

Attached a demo solution to reproduce the scenario. Run the same solution in Smart Client and NG Client, after generating popup you will notice difference in 'Parent Form (At Resize event): <form_name>'.

Steps to run demo:
1) Click 'Generate Popup' on main form
2) Popup is displayed with a nested form with boundary. This nested form will be displaying the Parent Form fetched at 'onResize' event.
3) To check Parent form after nested form is loaded/shown, click 'Fetch Parent Form Name'. (In NG Client, incorrect form name is displayed at 'onResize' event, while correct form is fetched after form is loaded.)

Regards
You do not have the required permissions to view the files attached to this post.
Servoy Developer
dev-ws-011
 
Posts: 73
Joined: Fri Oct 21, 2016 8:23 am

Re: GetActiveWindow not returning current active window form

Postby mboegem » Wed Sep 23, 2020 10:46 pm

What are you trying to achieve in the onResize event?

I've often used it to center elements and keep them there.
In NG this can be done way better using css.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: GetActiveWindow not returning current active window form

Postby dev-ws-011 » Thu Sep 24, 2020 4:49 pm

In actual scenario, we have child forms 'FormA' & 'FormB' which are displayed in two different screens.

-One is having 2 split panels(having FormA as top split panel, and FormB as bottom split panel), so rearranging divider in either top split panel or bottom split panel, will rearrange divider in other split panel. So, the form resizing only allowed here.

-Second is popup, which does not require rearranging as it is only split panel there and no need to rearrange divider for other.

Regards
Servoy Developer
dev-ws-011
 
Posts: 73
Joined: Fri Oct 21, 2016 8:23 am


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests

cron