In tweaking up some webDialog interfaces I ran into a minor problem in that they seem to get their size information when you drag them into the window and then dont change it if you change the size of the dialog settings in the IDE. The webDialog keeps opening at the old size in the page until you delete it and re-add it to the window.
I opened a feedback report: <https://xojo.com/issue/42112> which is now closed by design but I remain confused. The comparison to a ContainerControl in the feedback report may be correct under the hood, but its not treated that way in the IDE. Yes, if I drag a container control into a window and then go back and change the size of the container control parent in the IDE the size of the one I dragged into the window doesnt change.
That comparison is confusing to me, its not a container control, its a window. With a real container control I can just drag it out to the appropriate size or enter the new size in the Inspector if I changed it, thats no problem. In that it behaves like every other control that is dragged into a window. When you drag a webDialog into a window there is no interface for its size at all, there is no way to change it to the new size in the IDE. You either have to set the size in code, or you have to delete the dialog from the window and then drag it in again, reimplementing all events and copying in all the code again. This just cant be right.
Im absolutely certain that if there was no way to change the size of a container control after you dragged it into a window except to delete it and drag it in again that it would be classified as a bug.
Well, there is no way to change the size of a webDialog once you drag it into a window except by deleting it and dragging it in again.
Is that a bug? Or am I totally confused about how to use the things? Perhaps the error is not that they dont change their size automatically like every other window instance, but that there is no interface to manually changing it in the IDE once its in there? Being able to enter a width and height for it in the IDE would make it more similar to how a container control is managed. But again, its NOT a container control, its a window.
Its exactly the same - a sub “panel” that has its own copy of the properties as they existed when you added it to the layout
If you want to reinherit those base class properties you have to recreate it (although I’ve seen folks post hacks of VCP projects that can force this to occur)
Imagine that instead of a dialog (or container) this was a button
And you wanted some behaviour but certain malleable properties - like the Caption
If you altered the super & every instance then got that caption property I can be certain you’d be upset
Now there could be a way to force this to happen and I believe there is a FR for such a thing so that you can control when this occurs
hmmm … but height & width SHOULD be settable after you drag an instance on to a page
just they wont take on the parent values IF you change the parent …
looking into this as not being able to adjust the size IS a bug
It NOT taking on the size of the parent once on a layout is NOT a bug
If that helps
I would be happy with being able to change the size of them in the IDE, that would work just fine But I think the documentation then is also in error calling them a window or a dialog. window types do not behave that way, container controls behave that way. Perhaps they should be called something else as Im not the only person who is going to assume that a window opens to the default size of its parent object unless you change it.
Im having another problem now though with webDialogs in the IDE. Every time I change anything about the parent, or maybe even when not Im getting errors on compilation that say:
nameOfWebPage.NameOfDialog.Name Layout (property name)
Type mismatch error. Expected Boolean, but got TextLiteral
The only way to make them go away that Ive been able to find is to delete the dialog from the page and add it again. I am working in that project again today a little bit and will try to narrow down what Ive done that makes it happen. It might be that every time I reload the project the errors come back. I will experiment.
Yup, deleting and re-dragging the dialog into the window makes the error go away, but it comes back every time I close and re-open the project in the IDE. I will try to duplicate this in a separate project, but Im not sure what led to this in the first place, it didnt start doing it until I was fighting with changing parents and moving the dialogs around to try to get around the size error thing.
This turns out to be a bug in the XML file handling! I didnt even notice that I had saved the project at some point in the distant past as an XML project. once saved as a regular binary project file type I am able to delete and re-add those dialogs just once more and have the fix for the error stick. Something in the XML handling doesnt know something important about webDialogs that it should be saving but isnt. I did create a feedback report with a greatly simplified sample project that easily demonstrates the error with the XML file type.
The sample is incomplete
Can you send the items I noted
Forgot those were external items… Ive removed them from the project and it still shows the interesting issue. New example project is in the feedback report. Thanks!
It actually was the same issue as the other case I had been looking at and is already fixed for a future release