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: MENU (STYLE="popup" on browser through GBC  (Read 294 times)
Jeff M.
Posts: 42


« on: May 23, 2025, 12:57:45 pm »

Does MENU (STYLE="popup") not work through a browser via GBC?

When used, it just locks up the application and requires you to click 'close' to exit the menu that has not shown up.

Can I please ask how others are getting around this if they do not work in a browser?

To open a form with a list would be such a backward step.

I appreciate any help.
Reuben B.
Four Js
Posts: 1143


« Reply #1 on: May 26, 2025, 05:10:59 am »

Hi Jeff,

I'd expect it to work.  It is documented as doing so. https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_menus_004.html

There has been odd issue many years where it would popup in the wrong place https://4js.com/support/issue/?product=GBC&stat=&fixed_in=&words=popup+menu&Search=Search so I'd wonder if it was appearing off screen or is similar to some of those prior cases.

Suggest you try the example in the documentation, and raise a support call where you can provide more details.

Reuben

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


« Reply #2 on: May 27, 2025, 01:45:59 pm »

Thanks Rubin, for reminding me to go back to the basics.

We use routines to build and execute all of our popup menus, and I had failed to spot it was trying to add in 'fixedfont' to the "popup" menu style.

I'm not sure if we once had that defined as a style in our .4st or whether that was ever a thing for MENU styles, but it is not needed and all is working.
Reuben B.
Four Js
Posts: 1143


« Reply #3 on: May 27, 2025, 11:31:15 pm »

Hi Jeff,

Does raise an interesting issue case with regards syntax like ...

MENU ATTRIBUTES(STYLE="dialog foo")

MENU ATTRIBUTES(STYLE="popup foo")

Does the GBC code test for STYLE="dialog", STYLE="popup" when it perhaps should test for membership of a space separated list.

As to why you might have wanted a popup in a fixedfont, is it possible at some stage you were displaying two columns or accelerators.  So getting the Y and N in ...

Code
  1. Yes    (Y)
  2. No     (N)


to line up, that sort of thing

Reuben



Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Sebastien F.
Four Js
Posts: 547


« Reply #4 on: Today at 08:16:01 am »

Reuben,

About:

Code
  1. MENU ... ATTRIBUTES(STYLE="dialog foo")

Providing multiple style names in the STYLE attribute of a MENU is not expected and not documented.

In fact, unlike other STYLE usages, with MENU, there is no corresponding <Style/> definition required in the .4st file!

Yes, this is confusing.

When MENU + STYLE was introduced, maybe the intention was to do something similar to OPEN WINDOW + ATTRIBUTES(STYLE="..."), but it ended up as a kind of implicit menu type without any .4st definition.

For sure, in .4st files, we have no Menu class with a menuType="modal" style attribute, similar to Window / windowType="modal".

I think we should have defined another syntax since the beginning, to define the general rendering of a MENU:

Code
  1. MENU ... ATTRIBUTES( TYPE=MODAL )

We did it with OPEN WINDOW ... ATTRIBUTES( TYPE=... ) when we introduced splitviews for mobile.
BTW this is desupported since 4.00 (but the .4gl grammar is still there!):
https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_Migrate_to_400_paradlg_desupport.html

For consistency, I think we should have TYPE=MODAL for both MENU and OPEN WINDOW instructions, AND a STYLE attribute for style attribute indirection, so you could write:

Code
  1. MENU ... ATTRIBUTES( TYPE=MODAL, STYLE="foo bar", ... )

+ some additional cleanup is required, to remove TYPE = POPUP/LEFT/RIGHT/NAVIGATOR from the .4gl grammar.

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines