Bug? B4A Initialising Socket after Sleep

Starchild

Active Member
Licensed User
Longtime User
I copied a class from B4J across to B4A that initialises a Socket (from Network lib) following a Sleep() function. The Socket works OK, but it's parentage was lost.
That is, it fires a "Connected" event back into "Main" not the class that contains the Socket.

I have attached a simple B4A example demonstrating this bug.

By the way, it works fine with the Sleep() function in B4J.
 

Attachments

  • Socket Bug.zip
    2.5 KB · Views: 248

Starchild

Active Member
Licensed User
Longtime User
Thanks.

I understand the benifit of Starter service for sockets. Just thought the class would migrate to B4A without functional changes.

NB: When my class was in B4J, I introduced the Sleep() into the class just prior to initialising the SOCKET, to overcome the problem in B4J where if the SOCKET was initialised in the sub Initialize, of the class, then it would neven connect to anything, without any errors.
 
Top