Android Question DataPickerExtended Exit the app without selecting a date

fifiddu70

Well-Known Member
Licensed User
Longtime User
hello everyone, I'm using the DataPickerExtended library on my app with sdk min 9 and sdk max 26 when I open the calendar and select the date everything works fine, but when I open the calendar and wait a few seconds before selecting the date, the application closes, can anyone tell me why? I noticed that the ret variable is marked in red but the application works the same but with the problem just described.
ret is color red, in logs i have a this message: undeclared ret variable (warning #8) but this program launch withouth problems

DataPickerExtended:
mp1.Load(File.DirAssets,"click.wav")
    mp1.Play
    DateTime.DateFormat="dd.M.yyyy"
    dpe.Year = DateTime.GetYear(DateTime.now)
    dpe.Month = DateTime.GetMonth(DateTime.now)
    dpe.DayOfMonth = DateTime.GetDayOfMonth(DateTime.now)
    
    dpe.CalendarViewShown = False 'Calendar is not in View
    
    ret = dpe.Show("", "SCEGLI DATA", "Conferma", "Cancella", "", Null) ' ret is in red color, undeclared ret variable'
    'ToastMessageShow(ret & " :: " & " Giorno: " & dpe.DayOfMonth & " . Mese: " & dpe.Month & " . Anno: " & dpe.Year, False)
    
    If ret = -1 Then 'if -1 then show Date in Label
        txtdataentrataprodotto.Text = dpe.DayOfMonth & "." & dpe.Month & "." & dpe.Year
    End If
 
Top