Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
Genero BDL
>
dynamic dialog with menu
Most recent posts
Pages: [
1
]
« previous
next »
Reply
|
Print
Author
Topic: dynamic dialog with menu (Read 20309 times)
Stefan S.
Posts: 90
dynamic dialog with menu
«
on:
October 27, 2023, 09:34:35 am »
Hello,
we want to create with dynamic dialog an application like in attachment.
it is an form file with several buttons, but without input-fields or an array.
So in the 4gl-File we have an MENU for the diffrent actions.
in the documentation for dynamic dialogs (
http://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_dynamic_dialogs_create.html
) we don't find a function to create a dynamic menu (MENU - END MENU).
The static menu looks like this:
main
open form dyndiag from "dyndiag"
display form dyndiag
menu
on action but001
message "Button 1 clicked."
on action but002
message "Button 2 clicked."
on action but003
message "Button 3 clicked."
on action but004
message "Button 4 clicked."
on action but005
message "Button 5 clicked."
on action but006
message "Button 6 clicked."
on action but007
message "Button 7 clicked."
on action but008
message "Button 8 clicked."
on action zurueck
exit menu
end menu
close form dyndiag
end main
How we can create this dynamically?
A small example would be great.
thanks
Markus from Germany
example.png
(17.01 KB, 1273x431 - viewed 1927 times.)
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #1 on:
October 27, 2023, 10:53:29 am »
Hello Stefan,
We have an existing ticket for this, FGL-5420, but so far we do not plan any enhancement because we see no real added value.
What is the maximum number of menu options you need?
I think that you can achieve what you want, by using a classical MENU instruction, with many ON ACTION clauses, using abstract action names like option1, option2, ...
You can then decorate the menu options at runtime with appropriate text/icon, and disable and hide actions that are not used.
You can also create the Button, Toolbar item or TopMenu item elements in the form at runtime, or use the default action views created by visible menu actions, when no explicit action view (Button) exists in the form.
If i understand well, you just want to have a set of buttons in the form, correct?
Does it need to be responsive when resizing the window?
Seb
Stefan S.
Posts: 90
Re: dynamic dialog with menu
«
Reply #2 on:
October 27, 2023, 11:07:15 am »
Hello Seb,
thanks for your fast answer.
yes, a set of buttons.
We try to create something like a tile menu.
Responsive would be great.
Do you have any other tip's or hint's?
We want to create it with Genero 4.00.
Reuben B.
Posts: 1116
Re: dynamic dialog with menu
«
Reply #3 on:
October 27, 2023, 11:09:17 am »
I have an example at
https://github.com/FourjsGenero/ex_generic_menu
yes, the code "smells" because there is an arbitrary maximum (in my case 20) but the way I have coded it, it is pretty trivial to bump up the library to whatever maximum you want to cater for (change the constant, copy and paste the menuline lines)
Reuben
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
https://4js.com/ask-reuben
Contributor to
https://github.com/FourjsGenero
Stefan S.
Posts: 90
Re: dynamic dialog with menu
«
Reply #4 on:
October 27, 2023, 01:38:31 pm »
ok, thank you, we will try it.
one question in general:
please look at the attachment.
Is it possible to create such an view / tile menu with genero 4.00?
Do you think there is a way?
Maybe with images instead of buttons?
do you have any experiences?
tile menu.jpg
(59.27 KB, 672x533 - viewed 1923 times.)
Reuben B.
Posts: 1116
Re: dynamic dialog with menu
«
Reply #5 on:
October 27, 2023, 11:25:22 pm »
Yes, using WebComponents
https://github.com/FourjsGenero/wc_touchpad
. Similar is
https://github.com/FourjsGenero/ex_fontawesome_viewer
using SCROLLGRID
WebComponent is probably the way to go
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
https://4js.com/ask-reuben
Contributor to
https://github.com/FourjsGenero
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #6 on:
October 28, 2023, 11:12:10 am »
Hi,
I second Reuben about using a WEBCOMPONENT, that gives you the full control using HTML and layout solutions such as flexbox.
On the other hand, it's also possible to achieve something close to this with a MENU instruction and appropriate .per form + BUTTONs and styling.
Since I have worked on in, I share it now:
https://github.com/FourjsGenero/ex_dynmenu
Seb
Stefan S.
Posts: 90
Re: dynamic dialog with menu
«
Reply #7 on:
November 02, 2023, 04:40:35 pm »
Quote from: . on October 27, 2023, 11:25:22 pm
Yes, using WebComponents
https://github.com/FourjsGenero/wc_touchpad
. Similar is
https://github.com/FourjsGenero/ex_fontawesome_viewer
using SCROLLGRID
WebComponent is probably the way to go
ok, thank you, i think the webcomponent-way is our favorite way.
i try to test the "wc_touchpad" with Genero 4.00, but the result is not like in your picture.
For example when clicking on "Keyboard", all keys are on the same place... (see attachment)
what is the problem?
Markus
wc_touchpad_400.png
(11.1 KB, 1263x597 - viewed 1856 times.)
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #8 on:
November 02, 2023, 04:48:16 pm »
Hi Stefan,
You always mention 4.00 (four dot zero zero).
Can you clarify the exact version of the products that you are using? GDC, GBC, FGL ?
4.00 is no longer supported, latest release is 4.01
We will not provide any support for 4.00.
Seb
Stefan S.
Posts: 90
Re: dynamic dialog with menu
«
Reply #9 on:
November 02, 2023, 05:09:16 pm »
Hi Seb,
FGL 4.01.02
GDC 4.01.00
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #10 on:
November 02, 2023, 05:13:36 pm »
ok... before reporting any issue, please first try latest versions of FGL, GDC, GBC:
https://4js.com/download/products/?#toggle-id-4
Seb
Stefan S.
Posts: 90
Re: dynamic dialog with menu
«
Reply #11 on:
November 03, 2023, 12:38:00 pm »
ok, i tried it with GDC 4.01.06 and FGL 4.01.05, but the result is the same...
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #12 on:
November 03, 2023, 02:20:50 pm »
Hi Stefan,
What is your version of GBC (Genero BROWSER Client)?
Just tried wc_touchpad on my Linux Debian 11 with:
GDC Version 4.01.06 build-202309191103
GBC Version 4.01.15 Build 202309071649-d202309071703
FGLGWS 4.01.05 rev-68461dd0
The "Keyboard" and "Wordle" tests display correctly for me.
To see the images with the other options, you must set
FGLIMAGEPATH=$PWD/webcomponents/wc_touchpad/
(Reuben you may want to clarify this in the README)
Stefan, you should now contact FOURJS support.
Please provide all details (OS of the front end and where fglrun executes)
Seb
Reuben B.
Posts: 1116
Re: dynamic dialog with menu
«
Reply #13 on:
November 13, 2023, 08:39:35 am »
Just an update, we found that the issue was due to Stefan having DBFORMAT/DBMONEY with , as decimal point separator. Hence the HTML generated was of the form width: 50,00% and not the expected width: 50.00%
I'll put my thinking cap on as to how to make the webcomponent more robust in that area.
Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of
https://4js.com/ask-reuben
Contributor to
https://github.com/FourjsGenero
Sebastien F.
Posts: 545
Re: dynamic dialog with menu
«
Reply #14 on:
November 13, 2023, 09:59:03 am »
I have faced the same issue with
https://github.com/FourjsGenero/fgl_svg_chart
Check "isodec()" function.
Back in 2015, I suggested to have an API that converts decimal numbers to strings by always using the dot:
https://4js.com/support/issue/?id=FGL-04196#startissue
WA available in the resolution comment.
Not 100% sure "ISO" is the right term here, since ISO 80000-1 specifies that "the decimal separator is either a comma or a point on a line".
Maybe we could have some API like
util.Decimal.format( <expr>, <format-string>, <dbformat-spec> )
Seb
Pages: [
1
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...