I have been having issues about using ADP in a form and assigning values to the ExpDatADP (this is the name of the customview on the form).
I have some dates stored in a database (sqlite) and the format is: mm/dd/yyyy (a string)
If I use an ExpDatADP by adding a new date, there is no problem. Just touch the ExpDatADP panel and assign the dates. The problem arises when I load the values of the cursor to the ExpDatADP field. I keep getting the error: "Object should first be initialized (label)"
The debugger stops at the: If UpdateLabel Then targetLabel.Text = DateTime.Date(selectedDate)
and throws the error "Object should first be initialized (label)".
My question is, what do I need to initialize and where? I have initialized the ExtDatADP as a customview and declared it in the sub global of the form.
I have some dates stored in a database (sqlite) and the format is: mm/dd/yyyy (a string)
If I use an ExpDatADP by adding a new date, there is no problem. Just touch the ExpDatADP panel and assign the dates. The problem arises when I load the values of the cursor to the ExpDatADP field. I keep getting the error: "Object should first be initialized (label)"
The debugger stops at the: If UpdateLabel Then targetLabel.Text = DateTime.Date(selectedDate)
and throws the error "Object should first be initialized (label)".
B4X:
Private Sub SelectDay(day As Int, UpdateLabel As Boolean)
selectedDate = DateUtils.SetDate(year, month, day)
selectedDay = day
selectedMonth = month
selectedYear = year
If UpdateLabel Then targetLabel.Text = DateTime.Date(selectedDate)
End Sub
My question is, what do I need to initialize and where? I have initialized the ExtDatADP as a customview and declared it in the sub global of the form.