I’m sure this has been discussed ad nauseum but I can’t find it. I’ve tried a number of options and my only success has been creating a global class and the getting the contents of that class when the Window opens. There’s nothing regarding this in the language reference.
Isn’t there a way to pass arguments to a Window’s Open/Show/ShowModal call?
I suspect that my archaic dependence on Implicit window instances is my downfall here. I had added Constructor() methods to this and a couple of other windows, but it never dawned on me that the Constructor() was executed when the implicit instance was created …
Thanks for those pointers. Another crutchthing to consider when refactoring old-world projects.
I overload the showmodal method and as a picture is worth a thousand words you can have a look at this demo project which also shows how to return a value from a modal window.
So obvious that I feel a bit embarrassed. The use of overloaded events needs to be a series of Xojo vids. I was so busy working AROUND what I thought was a missing feature, I’ve never once in my 16+ years of using RB/RS/Xojo used the combobox feature when adding a new method to a window …
Hey @Paul Lefebvre - how about a new series on things like this?
Don’t. It took me ages to work this out. Mostly tips from @Norman Palardy here & elsewhere. Thanks for the tip on the combobox - I just typed in the method name - that exposes a lot of options I have yet to discover
BTW I’ve updated that demo project and added comments along with renaming the controls. The action button on the dialog has comments worth looking at