craigc
Member
I am still very new with B4X, but I think there must be a simple solution to my issue(s) since I think I have copied code from other answers in the Forum. I do not understand why "initialize" and "showtemplate" are "unknown members". Additionally, when I initialize the etInputTemplate, the log error thinks I have an array. I'm sure I have left something(s) out, since the code itself looks to me like quite a few examples I have found in my searches. Have I shown enough for someone to spot my errors? Thanks in advance!! Very much appreciated!!
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private etInputTemplate As B4XInputTemplate
Private btnQuit As B4XView
Private btnSubmit As B4XView
Private etNoRemem As B4XView
Private memberID As Int
End Sub
'This event will be called once, before the page becomes visible.
Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root1.LoadLayout("MainPage")
B4XPages.GetManager.LogEvents = True
Dim etInputTemplate As B4XInputTemplate
etInputTemplate.Initialize("etID_ClickProcess")
End Sub
Sub etID_ClickProcess
Dim etID As EditText = etInputTemplate.TextField1
etInputTemplate.ConfigureForNumbers(True, True) 'no decimals and no negatives
etInputTemplate.lblTitle.Text = "Enter your OGS ID with 1 to 4 digits - leading zeros unnecessary"
Wait For (DialogResponse.ShowTemplate(etInputTemplate, "OK", "", "CANCEL")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log(etInputTemplate.text)
memberID = etInputTemplate.text
End If
End Sub
Private Sub btnQuit_Click
B4XPages.GetNativeParent(Me).Finish
End Sub