Android Question [SOLVED] Wait For () In activity keypress

hatzisn

Expert
Licensed User
Longtime User
Hi everyone,

I would like to ask something which is not obvious to me.

if we add the following code in a Activity_KeyPress event,

B4X:
If KeyCode = KeyCodes.KEYCODE_BACK Then
    If bHasToSave = True Then
        wait for(AskToSave) Complete (Result As Int)       
    End If
End If

It shows a curly red line of an error in the editor and if I put my mouse on it, I get:
"Resumables Subs return type must be resumable sub"

How is it possible to overcome this?

Thanks in advance.
 

hatzisn

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…