Android Question Class routine not executed in b4a v6.50 beta1

Levit

Member
Licensed User
Longtime User
It is a small class with some buttons (Keypad).
The routine 'Keys_Click' is not executed, but you can hear the buttons click sound.
Only happens in b4a 6.50 beta1.
Regards
 

Attachments

  • Keypad.zip
    8.7 KB · Views: 96

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code is completely wrong:
B4X:
Do While(result=1)
   Try
     DoEvents
   Catch
     Log(LastException)
   End Try
Loop

I did revert the change in the Click event implementation so it will continue to work (due to usages of the click event in modal dialogs).

You should never try to hold the main thread. It will only cause problems and it is not needed.
 
Upvote 0

Levit

Member
Licensed User
Longtime User
Thanks for the tip @Erel .
I did find an example somewhere in the forum holding the main thread to achieve a modal effect. I just added the 'Try.... catch', and it worked.
I still don't know how to make a right coded modal dialog. Can you please give some directions?
Thank you !
 
Last edited:
Upvote 0

Levit

Member
Licensed User
Longtime User
if if understand it right, I MUST have a routine outside the class only to handle the Click Events.
I can not come back to the point, in main thread, following the call to the class.
Thank you.
 
Upvote 0
Top