M melamoud Active Member Licensed User Longtime User Nov 7, 2012 #1 hi, is there a timer like class that can get a parameter ? any lib that has that ? (I know I can build it myself using some external MAP or something like that) I want to do something like this. Code: Copy Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) t1.Initialize("checkLog",1000*5,IncomingNumber) End Sub Sub checkLog_Tick (num As String) ' do something with the phone number End Sub thanks
hi, is there a timer like class that can get a parameter ? any lib that has that ? (I know I can build it myself using some external MAP or something like that) I want to do something like this. Code: Copy Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) t1.Initialize("checkLog",1000*5,IncomingNumber) End Sub Sub checkLog_Tick (num As String) ' do something with the phone number End Sub thanks
mc73 Well-Known Member Licensed User Longtime User Nov 7, 2012 #2 I think you can simply declare a variable in globals section and use it inside the timer. At least this is what I do in similar cases. Upvote 0
I think you can simply declare a variable in globals section and use it inside the timer. At least this is what I do in similar cases.
M MLDev Active Member Licensed User Longtime User Nov 7, 2012 #3 You can do something like this: Code: Copy Sub Globals Dim num As String End Sub Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) num = IncomingNumber t1.Initialize("checkLog",1000*5) End Sub Sub checkLog_Tick ' do something with the phone number in the global variable num End Sub Upvote 0
You can do something like this: Code: Copy Sub Globals Dim num As String End Sub Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) num = IncomingNumber t1.Initialize("checkLog",1000*5) End Sub Sub checkLog_Tick ' do something with the phone number in the global variable num End Sub
M melamoud Active Member Licensed User Longtime User Nov 8, 2012 #4 MLDev said: You can do something like this: Code: Copy Sub Globals Dim num As String End Sub Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) num = IncomingNumber t1.Initialize("checkLog",1000*5) End Sub Sub checkLog_Tick ' do something with the phone number in the global variable num End Sub Click to expand... the problem with that solution is that if I get two events within 5 second (even if two diffeerent events) the second one will override the first one, in my case I want to fire two events both with different parameters (two numbers) I can do this using map or some multi objects container, but I was wondering how come no one build such a thing before nir Upvote 0
MLDev said: You can do something like this: Code: Copy Sub Globals Dim num As String End Sub Sub PE_PhoneStateChanged(State As String, IncomingNumber As String, Intent As Intent) num = IncomingNumber t1.Initialize("checkLog",1000*5) End Sub Sub checkLog_Tick ' do something with the phone number in the global variable num End Sub Click to expand... the problem with that solution is that if I get two events within 5 second (even if two diffeerent events) the second one will override the first one, in my case I want to fire two events both with different parameters (two numbers) I can do this using map or some multi objects container, but I was wondering how come no one build such a thing before nir