Open window in another session

Is there a way to open a window in another session? This would be for users requesting approval for something at the administrator. Any examples on how I can do something like this? Thanks

Yes there is a way, but it’s not very easy. Switching Session context seems to be a hassle at the moment. We’re discussing reaching into another Session context in this thread: Calling a method as another WebSession?

As far as examples, I can offer TP_WebKit which has a MessageAllSessions function. This example shows how to clear the session context, establish one, and send it a message. As far as I know, Xojo does not have an official example for how to do this.

ok thanks for the information. Im still back on web 1.0, so ill keep looking through old documentation.

One way to accomplish this today is to have a message array somewhere global that an admin session can query for new messages periodically. If one were found, you could then grab the message and display it.

If you wanted it to be two-way, you could use a dictionary or JSONItem to pass the sender session identifier, the TO identifier and the message. Each session could query the array to see if any new messages exist that need to be displayed.

Good idea. I will try that out. Thanks!