S Scantech Well-Known Member Licensed User Longtime User May 18, 2017 #1 Not sure if its a bug or not allowed? Code: Copy 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 Click to expand...
Not sure if its a bug or not allowed? Code: Copy 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 Click to expand...
derez Expert Licensed User Longtime User May 18, 2017 #2 It is not allowed. Move the actions that are based on the returned result to this sub after the wait for. Upvote 0
It is not allowed. Move the actions that are based on the returned result to this sub after the wait for.
Erel B4X founder Staff member Licensed User Longtime User May 18, 2017 #3 This is not a bug. You need to understand how the code flow goes and you will see why it is not possible to return a value. If you want to wait for a resumable sub to complete: https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/page-2#post-499130 Upvote 0
This is not a bug. You need to understand how the code flow goes and you will see why it is not possible to return a value. If you want to wait for a resumable sub to complete: https://www.b4x.com/android/forum/threads/b4x-resumable-subs-sleep-wait-for.78601/page-2#post-499130