Sub btnPlace_Click
...
PerformSearch(PlaceList, "PlaceSearchComplete")
' Wait For PerformSearch ' I would like to do this
... ' presently I can't put completion code here or it runs too soon
End Sub
Sub PlaceSearchComplete
Dim Status As String = "Found " & ResultList.Size & " Place"
If ResultList.Size <> 1 Then Status = Status & "s"
SetStatus(Status, Colors.Black)
End Sub
Sub PerformSearch(Data As List, Callback As String)
If edtSearch.Text = "" Then
Msgbox2Async("No search term provided!", "Error", "OK", "", "", Null, True)
Wait For Msgbox_Result(Result As Int)
CallSub(Me, Callback)
Return
End If
... ' might do a Sleep or two here to update the UI
CallSub(Me, Callback)
End Sub