Four Js Development Tools Forum

Discussions by product => GAS and GBC => Topic started by: Gary C. on May 09, 2022, 06:07:18 pm



Title: GBC General Queries
Post by: Gary C. on May 09, 2022, 06:07:18 pm
Hi
I have a couple of questions re GBC 4.01.00 that I cannot spot the answers to in the documentation and hoped someone may be able to help.

Firstly, are the users' windows preferences honoured? For example, I open a form, resize it and, in GDC version 3.20, on next opening it would displayed resized. This does not seem to be the behaviour in GBC.

Secondly, if using a browser, is there a method to trap a user closing a tab via the browser, rather than the close icon? Many of our modules check that it is safe for a user to exit before doing so. With the browser, I cannot see how we can trap this.

Many thanks

Gary


Title: Re: GBC General Queries
Post by: Reuben B. on May 10, 2022, 02:07:44 am
Quote
Secondly, if using a browser, is there a method to trap a user closing a tab via the browser, rather than the close icon? Many of our modules check that it is safe for a user to exit before doing so. With the browser, I cannot see how we can trap this.

I have an Ask-Reuben article on this https://4js.com/ask-reuben/ig-74/


Title: Re: GBC General Queries
Post by: Reuben B. on May 10, 2022, 02:38:45 am

Quote
Firstly, are the users' windows preferences honoured? For example, I open a form, resize it and, in GDC version 3.20, on next opening it would displayed resized. This does not seem to be the behaviour in GBC.
In GDC you can't resize a form, you can resize a window.  With a browser, the window is a browser tab.  You are effectively asking if a web program can change the size of the current browser tab.  See discussions such as https://ux.stackexchange.com/questions/9903/why-is-resizing-the-browser-window-bad-practice/9962#9962

If you are launching from some form of portal you can use the arguments from javascript window.open() to influence how a new window is opened with a good position and size.  For example with https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open try with

Code
  1. function myFunction() {
  2.  window.open("http://localhost:6394/ua/r/gwc-demo", "", "top=200,left=200,width=600,height=800");
  3. }
  4.  

If you are using GDC+UR then the GDC should remember window position and size within stored settings when opening a new program




Title: Re: GBC General Queries
Post by: Gary C. on May 10, 2022, 12:37:32 pm
Hi Reuben
Thanks for the Ask-Reuben article, this has given me the info I needed.

With regards to the window preferences, firstly, excuse my form vs window error, secondly, I should have mentioned that I am interested in modal windows.

I have attached a screenshot of a dialog window being opened (screen01), I then resize it (screen02) and when I reopen it, it reverts to the original layout.

If/when we get fully to grips with UI, then the intention would be to rely solely on a browser and retire our use of GDC.


Title: Re: GBC General Queries
Post by: Reuben B. on May 10, 2022, 01:52:38 pm
Modal was the important word to mention.  There is an outstanding issue in the system https://4js.com/support/issue/?id=GBC-2476.  Ask your support contact to add you to the list of customers requesting that feature that was in GDC but not GBC. 

I understand part of the complexity for not implementing is how to handle the case when the browser window is resized.  What happens if all or part of the modal window would now be positioned outside the visible area.  I'd argue to apply the same rules as for GDC but there maybe some additional factors.

Also if your colour/size table is being rendered with only one row visible and your user is having to continuously resize the window, you can influence the initial height of the TABLE, see http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ui_tables_rendering.html

Reuben