when I call application.showFormInDialog is there a way to wait untill the box is closed before continuing execution of the method that called it?
eg:
while (application.showFormInDialog)
The function returns void so I doubt this is possible.
It may already do this, but since the dialog is Modal, The method editor stops responding. I can’t tell if it’s waiting or not.
Yes, the method will continue to execute if there is code after the application.showFormInDialog.
Try this code:
application.showFormInDialog(forms.messages, -1,-1,-1,-1, 'Tester', false, false, true);
plugins.dialogs.showInfoDialog( 'After Close', 'This is after show dialog', 'OK')
I have this reusable piece of logic in FileMaker which relies on a ‘Pause’ command to wait for some user input before setting some globals and resuming execution of the script it was originally called from – Had not yet worked out how to do this in Servoy since there is no indefinite ‘Pause’ command in Servoy.
Now, Does anyone know if on the form in the dialog I have a save button. Will the method that opened the form finish before executing the button’s method?
I figure that the entire method is pushed on the stack before the form ever even shows.
OK, I know why I couldn’t get this to work the first time round. Since my dialog is called from numerous locations/contexts, I wanted to encapsulate a bit more to avoid having the
application.showFormInDialog
all over the place, so I put it into its own method.
We have the following situation:
Methods A calls Method B
Method B calls application.showFormInDialog and returns some result to the A Method.
Method C is attached so some button on the form and closes the dialog.
It looks like Method A calls Method B, then finishes execucting. Method B will wait for Method C to close the dialog before continuing.
Is this the expected behaviour? I was hoping Method A would wait for Method B to finish…
because this will completely block the ui and the CPU usage will go to the roof… if methodB doesn’t show a dialog or something like that and returns false every time.
Stalling things should be done with application.updateUI()
but with the example given above this isn’t needed anyway. Because dialogs that are shown (formdialog or dialogs from the dialog plugin) are always modal. And if you have modal dialogs then the script will stop running on the line you call to show it.
on this subject, sort of, i’d like to put up a message
window in front of the current form, letting the user
know we’re doing some time-consuming task.
when that task is complete, i want to close that window,
without any user interaction.
i can’t seem to do this with showFormInDialog though.
or any other method that is triggerd by that form
like a method that is attached to the button OK
(which you enaled of everything is done)
I don’t know what exactly would happen if you close the form dialog again in a onShow method (because you are in the on show flow where you suddenly close it again)
i use showFormInDialog to implement a very simple
password scheme.
suddenly, i find that the password dialog (created with showFormInDialog)
is no longer modal; in other words, i call application.showFormInDialog(),
the dialog shows, but before the user does anything else, showFormInDialog() returns to my code!
quitting & restarting servoy solves the problem. closing & reopening
the solution does not.
It would be nice if when calling up a dialog using showFormInDialog() I could return a value from the dialog (based on the user’s choice in the dialog) using a “return” statement rather than a global. Is that possible?
On a related note: It would be useful to call an FID from an FID, and show them as stacked. It does not appear to be supported at this time. Any plans for such in the near future? I am reaching back to FMP-think for workarounds, and would rather not!
I cant keep the onshow method on the queue form… form running when the FID is closed. So I have to open the FID and run the search again and it works.
How can I close the FID and perform the search and display a differnt form. I cannot run the FID search as an Onshow event of the search result listing form.