I didnt understood.
The following code is inside a Class
B4X:
Sub Class_Globals
Dim tmrShow As Timer
End Sub
Public Sub Initialize(eventName As String, Inter As Int,color As Int,Receiver As Panel)
tmrShow.Initialize("tmrShow",Inter)
tmrShow.Enabled=True
pnlReceiver=Receiver
CircleColor=color
EventStr=eventName
cInterval=Inter
End Sub
Private Sub TmrShow_Tick
Log("tick")
End Sub
If you declare a reference to the class as a local variable, then it is likely that the class will be destroyed once the sub it's declared in is completed. You will need to hold a reference in a Global variable or a collection that is a Global variable (Array,List or Map) for the class instance to persist.