Hi i'm trying to use datebrowser.gadget with DATEBROWSER_MultiSelect,TRUE, but can't make it work (as I think it should)
It opens fine, M_today points to actual MONTH (dtarting from 0), Y_today -> actual YEAR and M_mydays[M_today] is an uint32 M_mydays[12] all filled with 0.
Clicking on a day adds it to my M_mydays[]
I have a CLEAR button too, it erases all days marked/selected:
But when I try to select again the days it acts "funny":
1)Selecting only one day, CLEARing and then trying to select same day again, doesn't reccess such day.
2)Selecting one day, CLEARing and then selecting another day marks previous (cleared) day.
Any ideas what I'm doing wrong?
TIA
Can post full source (200 lines of code, 10KB)
.. LAYOUT_AddChild, OBJ(GID_DATEBROWSER) = IIntuition->NewObject(DateBrowserClass, NULL, //"datebrowser.gadget", GA_ID, GID_DATEBROWSER, GA_RelVerify, TRUE, //DATEBROWSER_ShowTitle, TRUE, //DATEBROWSER_ShowWeek, TRUE, //DATEBROWSER_DayTitles, weeknames, //DATEBROWSER_Day, D_today, DATEBROWSER_Month, M_today+1, DATEBROWSER_Year, Y_today, DATEBROWSER_MultiSelect, TRUE, DATEBROWSER_SelectedDays, M_mydays[M_today], TAG_DONE), ..
.. case GID_DATEBROWSER: IIntuition->GetAttrs(OBJ(GID_DATEBROWSER), DATEBROWSER_SelectedDays,&NewSpecialDays, TAG_END); IDOS->Printf("MOD MONTH:%2ld = 0x%08lx -> 0x%08lx (%s)\n",M_today+1,M_mydays[M_today],NewSpecialDays,ILocale->GetLocaleStr(ll, MON_1+M_today) ); //if(NewSpecialDays == M_mydays[M_today]) break; M_mydays[M_today] |= NewSpecialDays; IIntuition->RefreshSetGadgetAttrs(GAD(GID_DATEBROWSER), windows[WID_MAIN], NULL, DATEBROWSER_Month,M_today+1, DATEBROWSER_Year,Y_today, DATEBROWSER_SelectedDays,M_mydays[M_today], TAG_DONE); break; ..
.. case GID_CLEAR: M_mydays[M_today] = 0; IDOS->Printf("\nCLR MONTH:%2ld = 0x%08lx (%s)\n",M_today+1,0,ILocale->GetLocaleStr(ll, MON_1+M_today) ); IIntuition->RefreshSetGadgetAttrs(GAD(GID_DATEBROWSER), windows[WID_MAIN], NULL, DATEBROWSER_Month,M_today+1, DATEBROWSER_Year,Y_today, DATEBROWSER_SelectedDays,M_mydays[M_today], TAG_DONE); break; ..