function calls and arguments mimic the dialog plugin 100%
dialogs can be used in multiple instances of a solution window
support for default button (first button of the right) just like in Smart-Client
fixed the select dialog issue in version 0.9
removed the requirement for FIMD’s to use the dialogs_base form as parent
showFormInModalDialog() function arguments now mimics the application.showFormInDialog() function excluding the last parameter (isModal)
lots of small fixes and additions (the devil is always in the details)
You can download the Dialog module here.
See for more info in the wiki.
Check out the screenshots.
Thanks to Paul Bakker for all the code and support.
Actually also thanks to Johan Compagner for fixing the few bugs we found in the process in 5 and 6.
chico:
This looks awesome! How hard would it be to make it work in Servoy 4.1?
Well, 4.1 does have Form Inheritance and the SolutionModel but not the function controller.recreateUI() which was implemented in 5.0.
So it requires some work but in theory it should be doable, assuming that the Rhino version in 4.1 also supports Continuations.
But why not upgrade to 5.2 or 6.0 instead. 6.0 is just around the corner anyway.
Robert - not sure how to report an issue on the Forge so postingh here instead:
First time trying the new module and have this error:
Too deep recursion while parsing (E:\Dropbox\ServoyWorkspaces\WorkSpaceMay2011_RelationLess\mod_dialog\globals.js#89(eval)#1)
at E:\ServoyWorkspaces\WorkSpaceMay2011_RelationLess\mod_dialog\globals.js:89 (showDialog)
Can you enlighten me if this is something I’m doing wrong? as a first test all I did was this in the smart Client - it works fine with the standard ‘plugins.dialogs.’ format
var goOn = globals.DIALOGS.showInfoDialog("Copy Record Data","You are about to copy this current record data to a new record."
+ "\n The new record will be added at the end of the table of records."
+ " All support tables DWG's Links & Areas etc will be reproduced also if the 'Copy Button' check box is ticked"
+ "\n otherwise those tables will not be reproduced \n Do you want to continue ?","OK","Cancel")
I get the same error with this from a sandbox form too:```
var output = globals.DIALOGS.showWarningDialog(‘TestBIGD’,‘msg’,‘OK’)
Kahuna:
Robert - not sure how to report an issue on the Forge so postingh here instead:
Just log into ServoyForge with your account (you are a registered member) and go to the project’s New Issue tab.
Kahuna:
First time trying the new module and have this error:
Too deep recursion while parsing (E:\Dropbox\ServoyWorkspaces\WorkSpaceMay2011_RelationLess\mod_dialog\globals.js#89(eval)#1)
at E:\ServoyWorkspaces\WorkSpaceMay2011_RelationLess\mod_dialog\globals.js:89 (showDialog)
Can you enlighten me if this is something I’m doing wrong? as a first test all I did was this in the smart Client - it works fine with the standard ‘plugins.dialogs.’ format
var goOn = globals.DIALOGS.showInfoDialog("Copy Record Data","You are about to copy this current record data to a new record."
+ "\n The new record will be added at the end of the table of records."
+ " All support tables DWG's Links & Areas etc will be reproduced also if the 'Copy Button' check box is ticked"
+ "\n otherwise those tables will not be reproduced \n Do you want to continue ?","OK","Cancel")
I get the same error with this from a sandbox form too:```
var output = globals.DIALOGS.showWarningDialog('TestBIGD','msg','OK')
ROCLASI:
I just send you a test version with a possible fix.
Fixed Robert - Thanks for the effort on this module Robert - long awaited from Servoy - and you’ve beaten them to it with essential functionality for Web Client.
ROCLASI:
I released version 1.0.1 with this fix.
You can download it here.
Two fix’s in one day - you work fast Robert
Q. In Modal Dialog If the last argument is retained in the string (modal setting argument) will the function simply ignore it or fall over Robert? I’m hoping its a global search and replace but changing that argument is not a big deal (around 200 forms I believe in our system at the moment).
Kahuna:
Q. In Modal Dialog If the last argument is retained in the string (modal setting argument) will the function simply ignore it or fall over Robert? I’m hoping its a global search and replace but changing that argument is not a big deal (around 200 forms I believe in our system at the moment).
Your DIALOG global is working brilliantly Robert - that’s excellent work for sure. I think McCourt is going to contact you separately to mention a couple of points he’s discovered in its use.
We have been wondering if some of this code could be applied to other controls in web client too.
For example, we change the colour of menus to show that they have registered a click and then after the function has run we change the colour again to show it is the selected menu item and it’s ready to work.
With WC obviously this doesn’t work for the same reason the Dialogs don’t - the WC code is just run without halting to allow the called procedures to run before completing, hence the UI changes are too fast to register.
We figured there may be some method in your global that we could apply to halt the code execution whilst other functions are run, and then return and complete the UI stuff, but the concept doesn’t seem to apply in this context. Or perhaps we have missed a point or two.
What’s your view on using continuations in this context Robert? Possible - Sensible???
Kahuna:
Your DIALOG global is working brilliantly Robert - that’s excellent work for sure. I think McCourt is going to contact you separately to mention a couple of points he’s discovered in its use.
If he can do it on short notice, I am almost ready to push out a new bugfix version of the module. If he has something that needs to be fixed I can put it in with it.
Kahuna:
We have been wondering if some of this code could be applied to other controls in web client too.
For example, we change the colour of menus to show that they have registered a click and then after the function has run we change the colour again to show it is the selected menu item and it’s ready to work.
With WC obviously this doesn’t work for the same reason the Dialogs don’t - the WC code is just run without halting to allow the called procedures to run before completing, hence the UI changes are too fast to register.
We figured there may be some method in your global that we could apply to halt the code execution whilst other functions are run, and then return and complete the UI stuff, but the concept doesn’t seem to apply in this context. Or perhaps we have missed a point or two.
What’s your view on using continuations in this context Robert? Possible - Sensible???
With menus you mean popup menus ? In any case it would be something for me to look at and spend time on. I can’t really say what would be best in this case.
Thanks for the feedback Robert - I’ll chat with McCourt this am and see what we can draught.
With menus you mean popup menus ? In any case it would be something for me to look at and spend time on. I can’t really say what would be best in this case.
I was talking about our own created menus which are essentially buttons. And of course its the same with our buttons on a form.
Right now (in SC) we colour the buttons when the user clicks them to show they have been activated, and colour them again when the activity is done. So on our menu buttons, the text goes red when the user clicks them, and stays that way until the form is loaded and shown at which point the button is text is coloured orange to show that is the active menu selection.
With action buttons we colour the background and change the text to ‘working…’ after the user clicks it. After the task is performed the button is reset to its original state.
Right now in the WC the buttons change so fast that the user gets no information about state - and that’s because the code runs straight through - not waiting for the intermediate calls to complete.
That’s why we thought continuations may be an answer - but its the concept we are struggling with - where to place the continuation break and where restart it again etc. Also not sure which aspects of your dialog code would be useful rather than building our own continuation code?
Kahuna:
Right now in the WC the buttons change so fast that the user gets no information about state - and that’s because the code runs straight through - not waiting for the intermediate calls to complete.
Are you sure this is the case? Isn’t it just a case of not redrawing while the method runs?