Function isLeapYear(year As Integer) As Boolean
// Returns True if a year is a leap year
If ((year Mod 4 = 0) And (year Mod 100 <> 0)) Or (year Mod 400 = 0) Then Return True
End Function
Spontaneous quitting, that is very strange⊠I will investigate.
As for windows 10 I have not tested it on windows, but not sure why one would get an out of bounds exception⊠Can you run it in the debugger and break on exceptions please? Let me know where it is going out of bounds, I can not get it to exhibit this behavior. Is the invalid argument a DateModule.Invalid argurment or Xojo.core?
This is very strange. I would love some input on this problem. So, if you download the project, create a new window and put a CalendarPicker on it, set that new window to be what opens when the app loads, everything runs fine. Save the project, try again, everything is fine. But, if you close the project, reopen it and try to run it, it will spontaneously quit.
This behavior is visible on Xojo 2018 r4,r2, and 20173r3
Ok, I got it. I do not know why, but for some reason the computed properties for multi-date and allow past date were getting referenced at startup (even if I removed all references from the code). But, those were getting referenced before the calendar was initialized, causing it to not have any days loaded -> outofbounds exception. I moved the internal call to refresh the UI out of those properties and allowed it to be accessed from outside via refresh(). So, if one changes either of those properties after the calendar is initialized, they will they have to manually call a refresh to update the calendar (this is demonstrated in the example project).
Thank you for taking a look at it. Let me know what else breaks or can be better!
[quote=425230:@erin jamroz]Ok, I got it. I do not know why, but for some reason the computed properties for multi-date and allow past date were getting referenced at startup (even if I removed all references from the code). But, those were getting referenced before the calendar was initialized, causing it to not have any days loaded -> outofbounds exception. I moved the internal call to refresh the UI out of those properties and allowed it to be accessed from outside via refresh(). So, if one changes either of those properties after the calendar is initialized, they will they have to manually call a refresh to update the calendar (this is demonstrated in the example project).
Thank you for taking a look at it. Let me know what else breaks or can be better![/quote]
[quote=425243:@erin jamroz]@Richard Duke I pushed new code, so pull again and it should work.
v1.0.1.
I just tested it again and it works.[/quote]
thanks/âŠworking nowâŠ