Hi,
I am porting a Godot 3 app. The code for the signal was generated when I have upgraded my project. I have a websocket client, and try to connect reception of a message to the main.gd, in order to be able to parse it:
class_name WebSocketClient
signal message_received(string: Variant)
...
func poll() -> void
...
. message_received.emit(get_message())
This part runs well, The last line is called (I see it with a break point)
on the reception side (Main.gd), I have this
_websocketclient = WebSocketClient.new()
...
func _ready():
_webocketclient.message_received.connect(Callable(onReceiveSocket))
...
func onReceiveSocket(string):
. ...
onReceiveSocket(string) is never called, no error shows up when app runs.
I don't know wether connect need an extra parameter in definition, like
_webocketclient.message_received.connect(Callable(onReceiveSocket).bind(msg))
But 'msg' is not declared in scope, so...