Android Question B4Xpreference Dialog

bluedude

Well-Known Member
Licensed User
There is not more information, I just want to disable one of the buttons based on some logic. I understand validation but that's not what I'm referring to.
 

bluedude

Well-Known Member
Licensed User
Hi,

Smal question about IsValid event. I want to do a httpjob to validate. However, this can only work when using Resumablesub in the http sub that I use. This however does not work with the IsValid event because it needs to be a Boolean while B4A asks me to change it to Resumablesub.

All should happen when the dialog is open. Otherwise I have to open and close the dialog all the time when a value is not valid.

Any suggestions?
 

DonManfred

Expert
Licensed User
You can return any Value in your resumeable sub. Even a boolean.

Resumeable subs that return a value.

B4X:
Sub Button1_Click
   Wait For(Sum(1, 2)) Complete (Result As Int)
   Log("result: " & Result)
   Log("after sum")
End Sub

Sub Sum(a As Int, b As Int) As ResumableSub
   Sleep(100)
   Log(a + b)
   Return a + b
End Sub
For ANY other question you should start a new thread. NEVER post multiple question in the same thread.
 
Last edited:

bluedude

Well-Known Member
Licensed User
That's not the issue or question, I understand that. However, the IsValid event cannot be changed/is not supporting ResumableSub it seems.
 
Top