Hi, I found an unexpected behaviour of the DataAvailable event:
My main module calls a codemodule (repshare) to initialize and use the felUSBSerial
in repshare.mUSBinit i setup the callback event
I expected that the event Sub should be declared in the code module as:
However it never fires here. Instead if I move it to the Main module it works.
What I don’t understand is why it belongs in the main and not in the repshare code module?
Furthermore it is frustrating that there are no warnings about missing event declaration!
Can anybody please clarify, thanks
My main module calls a codemodule (repshare) to initialize and use the felUSBSerial
B4X:
repshare.mUSBInit
in repshare.mUSBinit i setup the callback event
B4X:
…
usbserial.Initialize("evtUSBSerial", device, 1)
I expected that the event Sub should be declared in the code module as:
B4X:
Sub evtUSBSerial_DataAvailable (Buffer() As Byte)
However it never fires here. Instead if I move it to the Main module it works.
What I don’t understand is why it belongs in the main and not in the repshare code module?
Furthermore it is frustrating that there are no warnings about missing event declaration!
Can anybody please clarify, thanks