i have a tabhost where i am loading some layout files. The tabhost works fine and loads the edittexts that are in the layouts. The problem is when i try to add values to the texboxes programmatically, i get "object should first be initialized(edittext)" error.
e.g, after loading the layouts via tabhost, when i do
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("parceldetails")
TabHost1.AddTab("Description","parcelnew")
TabHost1.AddTab("Location", "parcelnew2")
txtDelvery.Text=Main.newvalue
End Sub
The parcelnew layout file has txtDelvery edittext. The Main module has the "newvalue" variable defined in Process_Globals which is later assigned a value before being passed to this module with error. If i do
B4X:
Msgbox(Main.newvalue,"Test")
in this module, i can see the newvalue but assigning it to an edittext says that the edittext must be initilialized, yet the edittext was added in the designer