Android Question "Wait for" not working in Return Subs

Scantech

Well-Known Member
Licensed User
Longtime User
Not sure if its a bug or not allowed?

B4X:
Sub KeyPressWorkaround(KeyCode As Int) As Boolean
   
    Msgbox2Async("Test", "Test", "OK", "Cancel", "", Null, True)
    Wait For Msgbox_Result(Result As Int)
   
End Sub

B4A version: 7.00 BETA #1
Parsing code. Error
Error parsing program.
Error description: Resumable subs cannot return a value.
Occurred on line: 116 (Main)
Sub KeyPressWorkaround(KeyCode As Int) As Boolean
 

derez

Expert
Licensed User
Longtime User
It is not allowed. Move the actions that are based on the returned result to this sub after the wait for.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…