I'm using a Serial object that I initialize in B4XMainPage_Created sub.
I defined Serial_Connected sub in B4XMainPage also for handling the connected event.
I also have a Serial_Connected sub defined in another B4XPage object, a leftover from previous versions, that I was going to remove.
I observed that the Serial_Connected sub that gets called, is not the one into B4XMainPage, but the one on the topmost page which is shown at connection time.
Since the Initialize sub of the Serial object does not include a "parent" object parameter for the connected event, how are event subs dispatched?
How do I make sure the called _Connected sub is the one from in the MainPage?
I defined Serial_Connected sub in B4XMainPage also for handling the connected event.
I also have a Serial_Connected sub defined in another B4XPage object, a leftover from previous versions, that I was going to remove.
I observed that the Serial_Connected sub that gets called, is not the one into B4XMainPage, but the one on the topmost page which is shown at connection time.
Since the Initialize sub of the Serial object does not include a "parent" object parameter for the connected event, how are event subs dispatched?
How do I make sure the called _Connected sub is the one from in the MainPage?