Alessandro71 Well-Known Member Licensed User Longtime User Jun 16, 2021 #1 B4A 10.9 adds an additional check for Resumable Subs The following code now raises a warning #36 B4X: Wait For (B4XT_checks.SetData(data)) Complete We should add a return parameter after Complete, but which is the correct one? The SetData floating info does not specify the returned values, probably because it is unused. In such cases, what is the correct behavior?
B4A 10.9 adds an additional check for Resumable Subs The following code now raises a warning #36 B4X: Wait For (B4XT_checks.SetData(data)) Complete We should add a return parameter after Complete, but which is the correct one? The SetData floating info does not specify the returned values, probably because it is unused. In such cases, what is the correct behavior?
Peter Simpson Expert Licensed User Longtime User Jun 16, 2021 #2 @Alessandro71 The easiest solution is just to do the following Code: Wait For (B4XT_checks.SetData(data)) Complete (Completed As Boolean) Now just add 'Return True' at the bottom of the B4XT_checks...... sub Upvote 0
@Alessandro71 The easiest solution is just to do the following Code: Wait For (B4XT_checks.SetData(data)) Complete (Completed As Boolean) Now just add 'Return True' at the bottom of the B4XT_checks...... sub
Alessandro71 Well-Known Member Licensed User Longtime User Jun 16, 2021 #3 SetData is not a sub of mine, it's from B4XTable I just have to comply my code to the value it returns, but I don't know what type is it Upvote 0
SetData is not a sub of mine, it's from B4XTable I just have to comply my code to the value it returns, but I don't know what type is it
Alessandro71 Well-Known Member Licensed User Longtime User Jun 16, 2021 #4 I resorted to looking at the B4XTable source to find out SetData returns a Boolean. The question becomes: when the source is not available, and the returned value is of no use, any return type will suffice, or something like (unused as Object) ? Upvote 0
I resorted to looking at the B4XTable source to find out SetData returns a Boolean. The question becomes: when the source is not available, and the returned value is of no use, any return type will suffice, or something like (unused as Object) ?
Peter Simpson Expert Licensed User Longtime User Jun 16, 2021 #5 Alessandro71 said: (unused as Object) ? Click to expand... This would work just fine, I've done this a few times... Upvote 0
Alessandro71 said: (unused as Object) ? Click to expand... This would work just fine, I've done this a few times...
Erel B4X founder Staff member Licensed User Longtime User Jun 17, 2021 #6 Object is indeed safe, though this information should be documented. Fixed for the next version of B4XTable: Upvote 0
Object is indeed safe, though this information should be documented. Fixed for the next version of B4XTable: