Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: GBC multiple windows simoultaneously  (Read 12530 times)
Alessandro (Efisio) R.
Posts: 42


« on: February 05, 2021, 10:09:51 am »

Hi,

I've been asked if displaying multiple windows at the same time is possible with GBC.
Let's say for example I have 2 instances of the same 42r program opened with GDC which are showing the same form with different data in 2 separate windows, I am able to position them side by side so I can compare their data in a very pratical way.
I think I well understand how GBC works and what are its limits and this thing could be achieved only opening more GBC sessions (browser tabs or windows), but still I'm asking here if maybe I am missing something.
Do you have any suggestion?

Thanks
Alessandro
Reuben B.
Four Js
Posts: 1116


« Reply #1 on: February 08, 2021, 11:05:00 pm »

The GBC is not a Windows Manager, hence the ability to only display the top most normal window plus one modal window.

In terms of missing something, you can use the Left hand sidebar to quickly toggle between two instances of the same application in the same GBC session.  If you are trying to spot differences this may help (you will notice the flicker as values change), although probably not as good as having two instances of the same program side by side.

If you want to launch child programs in a new tab, there is the browserMultiPage presentation style http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/r_fgl_presentation_styles_userinterface_style_attributes.html which will do so without creating a new session.  That was introduced mid-release to satisfy a customers pressing need and as such it does not solve everyones requirement, the typical request is to launch RUN in the current tab and RUN WITHOUT WAITING in a new tab.  There will hopefully be an improvement in this area in the next major release. (it requires changes GAS and GBC so limited what we can do mid-release).  Hence I tend to suggest using launchUrl front-call instead of RUN WITHOUT WAITING so a child launches in a new tab.

If launching from a web page, you can use the window.open method to launch in a new tab and control position and size e.g. window.open("http://localhost:6394/ua/r/gwc-demo", "Window A", "width=800,height=600,top=0,left=0"); window.open("http://localhost:6394/ua/r/gwc-demo", "Window B", "width=800,height=600,top=0,left=800"); will position two windows side by side

Hope that helps,

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Snorri B.
Posts: 104


« Reply #2 on: March 18, 2021, 05:11:04 pm »

The GBC is not a Windows Manager, hence the ability to only display the top most normal window plus one modal window.


Hi Reuben.

Maybe this has been discussed before, but we have a major problem with this behavior. Why can you only display ONE modal window at a time?

In our code we display a list (display array) in a normal window and the user can see the detail for each record (in a modal window) by pressing tab. Then the user can do updates etc. We have a feature  that the user can enter a few characters in a field and press <TAB>. Then we open a new modal window that the user can pick values from.
The style of this window is:
Code
  1. <Style name="Window.lookup">
  2.    <StyleAttribute name="sizable" value="no" />
  3.    <StyleAttribute name="windowType" value="modal" />
  4.    <StyleAttribute name="border" value="frame" />
  5.    <StyleAttribute name="actionPanelPosition" value="none" />
  6.    <StyleAttribute name="ringMenuPosition" value="none" />
  7.    <StyleAttribute name="toolBarPosition" value="none" />
  8.    <StyleAttribute name="position" value="field" />
  9.    <StyleAttribute name="forceDefaultSettings" value="1" />
  10.    <StyleAttribute name="statusBarType" value="lines6" />
  11.  </Style>
  12.  
  13.  

So the window appears below the field and looks more or less like a combobox.
In GBC however, the detail modal window below disappears and this small window is presented at the top-left corner.
This will prevent us to migrate to universal rendering (my understanding is that GDC 4.0 will only support that)
Thanks,
-Snorri
Reuben B.
Four Js
Posts: 1116


« Reply #3 on: March 18, 2021, 10:47:53 pm »


Quote
Maybe this has been discussed before, but we have a major problem with this behavior. Why can you only display ONE modal window at a time?

that has been the behaviour since around 2.10.  I had historically believed that it was performance based (the browser only has to worry about at most two windows), but I believe it was actually a deliberate design decision based around ergonomics of web apps and also mobile apps. 

You may find some clues in documents about material design https://material.io/ (perhaps in the section of elevation https://material.io/design/environment/elevation.html#default-elevations, our main window is a card, we then have a modal above that with one more layer of elevation for dialog/picker i.e widgets, and MENU STYLE=dialog)

Quote
This will prevent us to migrate to universal rendering (my understanding is that GDC 4.0 will only support that)
Feel free to raise this early in the upcoming EAP https://4js.com/download/eap/.  If I was to suggest an angle to work, it would be that your third window is emulating a widget and is at the dialog/picker level of elevation as mentioned above.  So just as you can have a COMBOBOX, COMPLETER in a modal window, then you could argue why can't you have a similar looking list appear when you click on a BUTTONEDIT in a modal window.  This would also capture those that have for whatever reason emulated a DATEEDIT with a BUTTONEDIT that displays their own calendar.  So something like windowType="widget" to indicate that it will appear above modal window. 

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Snorri B.
Posts: 104


« Reply #4 on: March 22, 2021, 05:41:50 pm »

Thanks Reuben.
I will raise this during the eap.

Best regards,
-Snorri
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines