Android Question [SOLVED: use class, no modules] Wait for in other point not habitual. Is Correct?

netsistemas

Active Member
Licensed User
Longtime User
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.)
 

Attachments

  • DemoWaitFor.zip
    11.6 KB · Views: 69
Last edited:

netsistemas

Active Member
Licensed User
Longtime User
thanks, Erel.

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).
 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
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.)
 
Upvote 0
Top