In Main I have
Sub Process_Globals
Dim btSerial As Serial
and in Activity_Create
btSerial.Initialize("serial")
also in Main
Sub serial_Connected (success As Boolean)
If success Then
etc.
In a class, whose pointer is in Main and is initialised from Main, I want to start the connect process (btSerial.connect).
If I do this from the class by calling a sub in Main, i.e.
CallSub2(Main,"Connect",meter.Mac)
and in Main
Sub Connect(mac As String)
btSerial.Connect(mac)
End Sub
then the serial_Connected sub is called as expected.
If i do it directly from the class, i.e.
Main.btSerial.connect(meter.Mac)
It compiles and at run time there is no error report (Java or otherwise) and nothing unusual in the unfiltered log, but serial_Connected is never called.
Should this direct call work or should it have caused some sort of error report?