I have a webpage with a container on it. The container calls a web dialog to allow the user to change something. I want the web dialog to tell the container that it made a change or did not make change.
I tried changing a property on the container from the web dialog but that does not work.
I tried returning a value from the web dialog to the container and that does not work.
That all of web is asynchronous. You can’t return values from modal UI on web. You have to retain references and properties. User actions will cause events, then in those handlers check the properties of the references.
Tim, thank you for the reply, but I’m not sure that explains how to determine if the user changed a value in the dialog.
I’m using an AddHandler to know when the dialog is closed so I can update the listbox on the webpage/container that is calling it, but I don’t want to update a listbox on the webpage/container unless I know if they changed the item in the dialog. Am I being clear?
If you can provide a sample project (you can zip it and upload to your post), it will be easier to understand what you are trying to do, where you have problems and solutions/alternatives to help you.
The idea is to upload only a simpler sample project.
What version of Xojo are you using?
Do you know that newer version can allow edits in place? Take a look at the example that comes with Xojo, it may help:
I’m using rb2025r2 and yes I’m aware that you can do edits in place. In many cases, my list boxes do not contain all the data that you might want to change, hence, the need to call a web dialog that allows them to change any or all of the data. Editing in a list box is not always practical.
Add a flag to the dialog bUserChanged. If the user changes something on the dialog, set the bUserChanged property true. In the Closed event handler check the dialog’s bUserChanged property and act accordingly.
Though the controls are gone and inaccessible, it is possible to access properties on dialogs that have closed.
You will have to be more specific than “it does not work” for anything more than theory explanations.