iOS Question Class Timers

iCAB

Well-Known Member
Licensed User
Longtime User
Hi All

I have a class that I use to show Toast like custom message (popup).
The class depends on an internal timer to remove the popup.

Using B4A, just like ToastMessageShow, I call the class from anywhere (any sub from within an activity), the message gets displayed properly and the timer event gets triggered as expected, at which point the popup is removed.

Using B4I, it is not working properly, unless I create a global class that I reference everywhere.. for this particular case, I can live with that, but I have other similar classes that depend on internal timers, that shouldn't be created/referenced globally.

Does anyone have a solution for the above?

Thanks
 

iCAB

Well-Known Member
Licensed User
Longtime User
The class is removed from the memory if there is no more reference to it.
Use Module instead

Thanks Narek, I did read your previous post with regards to this question before I posted this. But I am not 100% sure that this is exactly the case...This doesn't sound right to me.
In this particular case, the class is displaying a popup like a toast message.. The popup is still alive and being displayed.. therefore the class should still be alive and at least should have a reference to itself..
If you read: https://www.b4x.com/android/forum/threads/button-event-not-triggered.69998/#content
I think the 2 share a similar issue
 
Upvote 0
Top