We are going to try to resurrect the old Einhugur forums here. Hopefully we can keep out spam and keep the forum clean this time.

How to integrate EnetServer into a Xojo Module?

edited May 2017 in Xojo

The sample shows how to integrate the Server part of EnetServer with a form. But how can I do that with a module?
This is from the sample code: server = new MyServer(self)

I created a private property in the module called server As ENetServer. In an initialization method of the module, I perform this code "server = New MyServer", note it leaves out the "owner" part which is normally there according to your sample code.

Can you please tell me what I am doing wrong and how to fix it?
Thank you,
Tim Seyfarth

---- Editing yours since its not giving me reply box

Hello Tim

Your don't give much info above so I am guessing a bit into what your asking.

You always want to inherit the ENetServer one way or another, though you can still use module of course as long as your inheriting. Since if you do not inherit then your not going to get any events. It does not matter if its with form or something else, if you check the code then it is only taking form as parameter to post back to the form. You can let it post back to anything you want. So you will always want to create class like the MyServer that Inherits from ENetServer, then your property in the module wants to own MyServer not ENetServer.
Sign In or Register to comment.