Reset default webpage to explicit instance

I have read the posts about the benefits of using explicit instances of web pages and understand how to create them with one exception. A property of the app is DefaultWebPage. I am assuming this is an implicit instance. Can the default be made to be explicit or is best practice to make the initial implicit page something like a splash screen or login page that won’t need to be called again?

You can leave the App.DefaultWebPage pointing to a a blank page and then use its Shown event (or Session.Open) to load up the actual page you want displayed.

I’m missing something here. The purpose of using the explicit instance of the webpage is to eliminate the need to look up all the page parameters. If I point App.DefaultWebPage to WebPage1 and WebPage1.Shown says

[quote]Dim page as WebPage2[/quote]
it seems to me that any time I want to refer to page I will need to use which would defeat the whole purpose of not having to look up a webpage.

While I only looked at about 10 of the web examples, none of them had ImplicitInstance set to Off. Are there any examples of how to use this feature? The person who wrote UserGuide-Development.pdf seems to think its important, more so than whoever wrote the examples. Too bad there isn’t one, or if there is, too bad it is not labeled as such.

Well, Windows and WebPages are ‘special’ objects. Nowhere else in the Xojo universe is there an object that can be created via the new operator and can also be opened via the show method (without using new first). It’s a relatively new (last 6 years or so??) innovation to turn implicit instance off - so historically it’s been that way forever (hence all of the examples using it)

Many Xojo developers think implicit instance is a (good) feature. I call it a way to sometimes get subtle and hard to track down errors. I, personally, put as many things as possible with implicit instance to off. At least the compiler will squawk when you do something wrong.


Here’s the deal on that. Web Edition has been a quickly evolving product from its inception. What might have been thought of as great standard practices at first, aren’t thought of as such now. And today’s best practices will probably evolve a lot over the next 6 months to a year. So the best practices, per se, might not be perfectly consistent. This is one instance where that holds…

Another instance is the Session pseudo-global. Ask me about it, and I’ll tell you it’s the absolute devil. I’ve solved a lot of problems over the past 12-15 months for me and other developers by eschewing it completely. Ask Daniel Taylor (a very accomplished WE developer) and you’ll get an opposite view. We’re just at a place where a lot of things are fluid, but they’re coming closer to settling.

To Bob’s point… My view is that Session and implicit instance are near imperative to make WE accessible to developers who haven’t built web apps under the WE model, i.e. basically everyone. It’s good to learn with them, but when you encounter their sharp edges, best to quickly wean off of them. Basically, a giant conundrum.