Is corrert to do a wait for out of the resume function?
that is:
B4X:
Private Sub Button1_Click
'xui.MsgboxAsync("Hello world!", "B4X")
modDemo.MiMsgbox("hellow world#COLOR.RED# from #TYPEFACE.DEFAULTBOLD#Spain.#TYPEFACE.DEFAULT# end message")
Wait For msgbox_result(rp As Int)
If rp = DialogResponse.POSITIVE Then
modDemo.MiMsgbox("positive")
End If
End Sub
B4X:
public Sub MiMsgbox(Txt As String )
Dim Xui As XUI
Xui.Msgbox2Async(Txt ,"TITLE","yes","cancel","",Null)
[B] 'no wait for in modulse - can a put out... in a call to mimsgbox[/B]
End Sub
may be is evident, but when i can't use wait for in a module, i put OUT in a page called.
attacth a demo (this demo use csbuilder in msgbox and parse, but may be ignored.)
According with this message.
All my modules, are better transform to CLASS and get unique instance to use like modules, and use wait for when i need it.
Only one module, with one unique instance of my class's (now modules to tranform to class).
Sorry, but whatever you are using to translate to English is not doing a very good job. Code modules are a hangover from the past. Always uses classes instead,
I think of it in Spanish and I translate it myself, with my little knowledge of English.
I think I'll write it in Spanish, and translate it to English with some tool.
Thanks again for your help. Sometimes, you have to stop, think and ask.
(I have already written this message in Spanish and translated it.)