I have web page that is using web dialog, so I have added web dialog component to it (it shows as little icon at the bottom in the IDE).
I can show this web dialog using Show method.
In Xojo2018 I think the web dialog component is instanciated when the web page is open as I was able to set variables in the web dialog before invoking Show method to show it.
In Xojo2023r3 it seems that this is not the case. Can someone please help me to understand this?
Background: this is a typical scenario where the web page shows the list and user needs to drill in the list line to open dialog on which there is some additional info to enter and save in the database.
OK, here is the issue:
In my web dialog in the Event Handler Open/Opening (Xojo2018/Xojo2023r3) I have following code:
mFileFormatId = New NumberField
mFileFormatId.Name = “mFileFormatId”
The web page opening this web dialog sets some properties (aka variables such as mFileFormatId) and then does Show the web dialog. In Xojo2018 my web dialog upon Show had mFormatId populated with the number value as expected whereas in Xojo2023r3 the mFormatId shows nil.
This suggests to me that the mFormatId is initialized when invoking Show method to open the web dialog. If that is the case then I need to set the mFormatId property after doing Show.
There are few more properties that needs to be set in addition to mentioned mFormatId.
I don’t know if Opening should fire every time, but this is the case, even if the dialog is already showing and you do another dialog.show it will fire the opening event: