Hi Istech,
Thank you for your kind words.
I tried to load 2000 random dates over 4 years into Calendarius and it worked without a hitch, so you have a lot of leeway.
You could check the datechanged message for a calendar event with something like this in the script of the widget
(or of course anywhere else)
Code: Select all
on dateChanged pDate
local tMarkedDates, tDate
put the datesToMark of me into tMarkedDates
put word 1 of pDate into tDate
filter tMarkedDates with tDate
if tMarkedDates is empty then
put "No Calendar event"
else
put "There is a Calender event for " && tDate
end if
end dateChanged
To load a lot of test data into Calendarius you could to something like this
Code: Select all
on mouseUp
local tToDoDates
local tYear, tMonth, tDay
local tTheYears
local tTheMonths
local tTheDays
local tDatesA, tCount
local t, t1
put "2020,2021,2022,2023,2024" into tTheYears
put "01,02,03,04,05,06,07,08,09,10,11,12" into tTheMonths
put "31,28,31,30,31,30,31,31,30,31,30,31" into tTheDays
put "2020,2021,2022,2023,2024,2025" into tTheYears
repeat 2000 -- or whatever
put any item of tTheYears into tYear
put any item of tTheMonths into tMonth
put random(item tMonth of tTheDays) into tDay
if the number of chars of tDay is 1 then
put 0 before tDay
end if
put tYear & "-" & tMonth & "-" & tDay & cr after tToDoDates
end repeat
put tToDoDates into tDatesA
split tDatesA by return as set -- eliminate duplicates
put the keys of tDatesA into tDatesA -- the keys are the dates
put the number of lines of tDatesA into tCount -- the number of dates without dupes
put the milliseconds into t
set the datesToMark of widget "calendarius" to tDatesA --tToDoDates
put the milliseconds -t into t1
put t1 && "ms" && the long time & return & tCount && "NumDates"
end mouseUp
Kind regards
Bernd