I am not sure the above describes my problem!
I have two _click event handlers.
and
In butLoad_Click there are no errors BUT in the other :-
Line 160 is CASE "SowPage"
PO is defined in main with following code
I know images are not advised but I can not help myself, this makes in more clear.
I have two _click event handlers.
B4X:
Private Sub butLoad_Click
Main.po.NuRecord = False
Select Main.po.Operations.Get(Main.po.CurrOp)
Case "SowPage"
B4XPages.ShowPage("NotImpPage")
End Select
B4XPages.ShowPage(Main.po.Operations.Get(Main.po.CurrOp))
End Sub
and
B4X:
Private Sub butLastOp4Pad_Click
Main.po.NuRecord = False
Select Main.po.Operations.Get(Main.po.CurrOp)
Case "SowPage"
Dim qStr As String = $"Select Max(OpDate) As OpDate, ID, PadID, PlannedSeedRate,
PlannedFertRate, SeedTypeId, SeedCultivarID, MeteredRateSeed, MeteredRateFert,
AreaSown, FertTypeId, Comment, Depth FROM SowingData WHERE PadID = ${Main.po.SowData.Get("PadID")}"$
' Above query string returns only one record (list item)
Dim l As List = DBUtils.ExecuteListOfMaps(Main.po.SQL1,qStr)
Main.po.SowData = l.Get(0)
Log($"SowData loaded For PadID = ${Main.po.SowData.Get("PadID")}"$)
Utils.LogSowData
End Select
B4XPages.ShowPage(Main.po.Operations.Get(Main.po.CurrOp))
In butLoad_Click there are no errors BUT in the other :-
B4XMainPage - 160: Syntax error.
B4XMainPage - 159: Unknown member: po
B4XMainPage - 158: Unknown member: po
Line 160 is CASE "SowPage"
PO is defined in main with following code
B4X:
Sub Globals
Public PO As PadObs
End Sub
Sub Activity_Create(FirstTime As Boolean)
PO.Initialize(Activity)
Activity.Title = "Paddock observations"
End Sub
I know images are not advised but I can not help myself, this makes in more clear.