Web 1.0 events order


first Season Greeting to all !


I have a page, say it’s called TicketDetail, with a Container already inserted, say it’s called Header. Below Header there is an empty Container, already inserted, into which some Containers, say there are called Comm, will be embedded using EmbedWithin().

In Header.Event.Shown, I set the Header fields. In a TicketDetail method, called in TicketDetail.Event.Shown I embed the Comm containers.

In Comm containers, once embedded, I set their fields in Comm.Event.Shown. Nothing really complex.

Now this is where it gets out of control. What I wish to do is if there is a problem in Header.Event.Shown, I want to skip embedding Comm containers and display a message to the user using a WebDialog. Thing is it happens that the message is displayed when there is no problem with the Header, and it also happens that when there is a problem with the Header, the message is not displayed.

I assumed that the Header.Event.Shown would arise before the Comm.Event.Shown, but that’s not the case. Sometimes the event occur i the reverse order, I know because I used System.DebugLog to learn in which order they are received.

Why would the events be received in the reverse order since one action occurs before the other one ?


These events are actually triggered by the browser itself as an http request back to the server and regardless of the order when they leave the browser, they may not arrive in the same order just because they may take completely different geographic routes back to your app.

Hi Greg,

thanks for the tip. I moved all the code to PageEventShown and now the code work fine !

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.