PDA

View Full Version : Open a window on client



st4lk3r87
August 19th, 2018, 13:58
Hello!

I'm trying to create an extension and I'm having difficulty on achieving these steps:

- The host open manually "Window A" which contains a button
- The host click on that button
- After the click of the button all clients will automatically open a new "Window B".

Window B and A are different WindowClasses so I can't use the share() method on Window A.

I hope it's clear enough. Thank you for the answer!

st4lk3r87
August 19th, 2018, 14:27
I'm planning to solve it by using Comm.deliverOOBMessage function. I wonder if it's the right choice.

Trenloe
August 19th, 2018, 14:34
OOB messaging is the usual way to offload code from one instance to others.

damned
August 19th, 2018, 14:50
Please do post your code when you work it out!

Andraax
August 19th, 2018, 14:55
There is a "ready check" extension out there that does this (opens a window on all the clients when the GM clicks a button, and then monitors the responses from the various clients).

Bidmaron
August 19th, 2018, 15:19
I think this (https://www.fantasygrounds.com/forums/showthread.php?42676-CoreRPG-based-Extention-ReadyCheck&p=379037&styleid=5) is it.

st4lk3r87
August 19th, 2018, 15:35
There is a "ready check" extension out there that does this (opens a window on all the clients when the GM clicks a button, and then monitors the responses from the various clients).

Yes, I got inspiration from that extension but I don't want to share the same window. As Trenloe said I'm going to use OOBMessage to open the window on other clients.

Bidmaron
August 19th, 2018, 15:40
Good luck, st4lk3r87.

Andraax
August 19th, 2018, 16:49
Yes, I got inspiration from that extension but I don't want to share the same window. As Trenloe said I'm going to use OOBMessage to open the window on other clients.

Yeah, that's what that extension does. It opens a different window on each client (and it's custom for the client - each client sees a different window).

st4lk3r87
August 19th, 2018, 17:01
Yeah, that's what that extension does. It opens a different window on each client (and it's custom for the client - each client sees a different window).

It shares the same WindowClass and set different visibility for all the items. It's the same Window but with different logic. I checked the code :)

Moon Wizard
August 19th, 2018, 20:28
If it was me, I would use one of those two methods. Either use the same window class with embedded subwindows that you activate depending on whether it's host/client (like extension); or use OOB to open a different window class (like you were thinking). The only difference is how you want your code to look.

Regards,
JPG