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: Tuesday - Breakout - Less code with Dynamic Dialogs ... - Leo Schubert  (Read 2592 times)
Reuben B.
Four Js
Posts: 834


« on: November 17, 2020, 12:02:10 pm »

Quote
Dynamic Dialogs can cut down on the number of lines of code you need to support. Leo will review the use of Dynamic Dialogs and show how Interface and new Reflection methods can be used to improve your productivity.

This thread will be used to collate questions and answers from the live chat of Leo's presentation and any questions you may have after watching a recording.



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


« Reply #1 on: November 19, 2020, 02:12:52 am »

Hello,

Just wondering if there is plans to add support for ON SORT action in dynamic dialogs.

Thanks

Rick
Leo S.
Four Js
Posts: 102


« Reply #2 on: November 19, 2020, 11:08:54 am »

Hi Rick , there are a couple of triggers not implemented yet because no one asked so far over the past years.
Obviously if one wants to master ON FILL BUFFER , one needs ON SORT too.
There are also a couple of other open things such as
the ROWBOUND action attribute and the ON ACTION IN FIELD feature.
It's probably not difficult to add, but Rene needs to comment on the time frame.
Thanks for bringing that up. I'll check with Rene and come back to you.
(Are you using ROWBOUND and ON ACTION IN FIELD in classic mode btw ?)
Regards, Leo
Reuben B.
Four Js
Posts: 834


« Reply #3 on: November 19, 2020, 10:41:54 pm »

Hi Rick , there are a couple of triggers not implemented yet because no one asked so far over the past years.
Obviously if one wants to master ON FILL BUFFER , one needs ON SORT too.
There are also a couple of other open things such as
the ROWBOUND action attribute and the ON ACTION IN FIELD feature.
It's probably not difficult to add, but Rene needs to comment on the time frame.
Thanks for bringing that up. I'll check with Rene and come back to you.
(Are you using ROWBOUND and ON ACTION IN FIELD in classic mode btw ?)
Regards, Leo


Leo,

Before anyone points it out, it has been requested https://4js.com/support/issue/?id=FGL-05135

Using the Issue tracker you can see that there are a number of requests out there for dynamic dialog and some have been worked on and are ready to go in 4.00 https://4js.com/support/issue/?product=&stat=OPEN&fixed_in=&words=Dynamic+Dialog&Search=Search.  Ideally we'd get to the point where any syntax you can use in a dialog statement can be implemented in a dynamic dialog

I'd like to reiterate a point I made in one of my presentations is that if you participate in EAP and try out new features it is a lot easier to add in suggestions on top of the new features there and then.  Dynamic Dialogs have proved popular but it has been frustrating that there are areas like this where in hindsight we should have been more complete with the original implementation of Dynamic Dialog.

Reuben





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


« Reply #4 on: November 20, 2020, 02:12:09 am »

Hi,

In classic dialogs we do use ROWBOUND and INFIELD.

I was one of the people that requested ON SORT. Using ON FILL BUFFER without ON SORT proved challenging, at first I I had it, so it would sort whenever the user scrolled, however It did not feel logical, so I ended up creating a sort combobox that they can be used to trigger sort instead.

I will make sure to provide as much feedback as possible during the EAP, as We have high hopes for the libraries we can create using dynamic dialogs + reflection API

Thanks


Rick


Leo S.
Four Js
Posts: 102


« Reply #5 on: November 20, 2020, 01:01:04 pm »

Hi Rick, apologies that I didn't see that the ON SORT was already in the issue tracker.
According to Rene particulary that is not difficult to add, it will be there in 4.00 .
Rene promised to look also  thru the other requests regarding dynamic dialogs , so there will be very likely further improvements.
I will work a bit on my PoC library in-between , checking multidialogs in particular .
Hope we can fulfill the high hopes:-)
Regards, Leo
HJ W.
Posts: 2


« Reply #6 on: November 23, 2020, 08:50:28 am »

Hello Leo,

Would you mind I ask the code put on git hub:  https://github.com/leopatras/generic_dlg_reflect ?
It seems depend on Genero v4.00, because there are having commadn "var" in utlis.4gl? so, Is it just for explanation ?

thanks.

Regards,
alex
Leo S.
Four Js
Posts: 102


« Reply #7 on: November 23, 2020, 10:27:13 am »

Hi Alex, the whole code in this repository depends heavily on 4.00 , so I used also all other features from 4.00 including the new VAR feature.
If you find code useful in utils.4gl which you want to use in earlier Genero versions,
you need to fallback on DEFINE and define variables on the 1st line.
Regards , Leo
richard v.
Posts: 4


« Reply #8 on: November 24, 2020, 05:33:57 pm »

Hello Leo,


I am glad to hear ON SORT should be added for 4.00,

If I was to pick one other feature I wish dynamic dialogs supported it would be the MENU dialog

There is an example on 4js github, that creates a "dynamic menu" however in reality its just a static menu with generic field names.

The disadvantage of this is the lack of action default support.

A Dynamic Dialog Menu would allow the menu choices dynamically passed in, to take on the action defaults of those actions such as icons and localized text.

I did open a feature request for this issue as well.

Thanks

Rick
Leo S.
Four Js
Posts: 102


« Reply #9 on: November 24, 2020, 11:24:42 pm »

Hi Rick, yes I know that one. I passed over to Rene to answer that.
ON SORT is fixed btw for 4.00 , will be available in the EAP.
Regards, Leo
Leo S.
Four Js
Posts: 102


« Reply #10 on: November 25, 2020, 02:54:25 pm »

Rick , I assume you are referring to the ex_generic_menu sample on GitHub.
It could be extended to use the action defaults (by reading either the global action defaults file or by reading the forms action defaults from the .42f or the ui tree) instead of being forced to set text,comment,image etc explicitly .
Let me know if you want to get a sample for that.
Regards, Leo
richard v.
Posts: 4


« Reply #11 on: November 25, 2020, 03:37:03 pm »

Hello Leo,

Thanks for the suggestion, a sample is not needed. I will create a util function that can load action default information using the global actions default file and experiment with that.


Rick
Reuben B.
Four Js
Posts: 834


« Reply #12 on: November 26, 2020, 01:11:47 am »

Leo,

FYI The dynamic request is also an existing request https://4js.com/support/issue/?id=FGL-5420

Examples such as my ex_generic_menu and also from FGLDIR/src/fgldialog.4gl fgl_winButton() with an arbitrary maximum number of actions will always be viewed less complimentary than a library routine containing some simple dynamic dialog code of

Code
  1. LET d = ui.Dialog.createMenuDialog()
  2. CALL d.addTrigger("ON ACTION ????")
  3. ...
  4.  

There was also an interesting discussion once on what should ui.Dialog.createMultipleDialog() do if there are no sub-dialogs added, is that then a Menu?

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines