- Jun 6, 2020
- 11,559
- 4,422
Hello all,
I am writing an app which uses MQTT, and I find a problem with "wait for".
In an activity "info" I must collect several data from MQTT: every datum is asked for by publishing a topic and waiting for the reply. I would like to write several lines like:
B4X:
Problem is that, as executing "sleep" or "wait for" causes a subroutine to
return to caller, I can't find a way to make it work this way. Instead, I
had to write:
B4X:
This is bloated (5 lines instead of one) and, moreover, causes the sub
Activity_Resume to be called before...
I am writing an app which uses MQTT, and I find a problem with "wait for".
In an activity "info" I must collect several data from MQTT: every datum is asked for by publishing a topic and waiting for the reply. I would like to write several lines like:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
Problem is that, as executing "sleep" or "wait for" causes a subroutine to
return to caller, I can't find a way to make it work this way. Instead, I
had to write:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
This is bloated (5 lines instead of one) and, moreover, causes the sub
Activity_Resume to be called before...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید