Use of websockets in remobjects elements / oxygene

Hi there,
i have to build a software with remobjects elements / oxygene, that uses a websocket. I’ve found a sample in c# and i translated it with the oxidizer. When i build the solution, i get an error ‘(E266) Cannot access underlying field to raise event “websocket.MessageReceived”’.
Is there a documentation / howto / sample-solution that i can use to solve my problem?
Regards Werner

That sounds like Oxidizer probably just got the syntax slightly wrong here. Anything that works in C#, the same concepts will work in oxygene as well.

Can you post the relevant biota code, in original and the translation?

Hi Marc,

c# source(for example) is:

        websocket.MessageReceived += new EventHandler<MessageReceivedEventArgs>(websocket_MessageReceived);

oxidizer delivers:

        websocket.MessageReceived { NOT SUPPORTED } new EventHandler<MessageReceivedEventArgs>(websocket_MessageReceived);

i’ve corrected oxidizer to:

websocket.MessageReceived += new EventHandler<MessageReceivedEventArgs>(@websocket_MessageReceived);

and now it works!

Regards
Werner

Ok, that does sound like an Oxidizer bug, i’ll log.

FTR, this simpler version should also work:

websocket.MessageReceived += websocket_MessageReceived;

Thanks, logged as bugs://78545

bugs://78545 got closed with status fixed.