Windows, desktop here. In the older days, for example, to show a modal window named help4 in the current window, I could use: help4.showmodal and it worked fine. Now that doesn’t work anymore (2024r2), I get errors.
Yes, the documentation isn’t much help. How would I do this now? The window (help4) is set as a modal dialog already. With API 2, did this change?
Nope, checked that. I did notice it was set as API 2 (the ‘DesktopWindow’ thing). Did the functionality of showmodal change in API 2? I looked in the Docs, no notes about a change.
“confuse the compiler” in the sense that you can’t have two project items named the same thing, hence producing the error he showed. I wouldn’t consider that a bug.
I did name my backdrop help4 and the window help4. Changing the backdrop graphic to help41 after deleting the old backdrop fixed it. I did notice the help4 window was named to the API 2 thing of DesktopWindow, and I changed it back to Window, if that matters. The other 2 help windows, help1 and help2, didn’t have this backdrop conflict and they both work fine.
In the OP, he said it compiled and run in the past and now it fires an error. I said the same as you said above, clashing names should not compile and errors pointed for fixing.
Hmmm, and I thought it was only me and my dodgy code. I recently upgraded to 2024r2 and my Showmodal calls all stopped working with the same error you have. but if i created a new project and used Showmodal it worked fine.
I can’t work out why it does it. The only 100% reproducible scenario in my project is that I have graph controls on the modal window. If i add a dataset to a graph that turns out to be empty then showmodal fails.
I just put in extra checks in my code to prevent an empty dataset, and assumed i was using Showmodal wrong.