Creating NSPopUpButton displays all of my iCal calendars.

I have an NSPopUpButton and I want to display iCal custom calendars in it. From there, I want it depending on which code I’ve selected to change.

CalCalendar *calendar = [[store calendars] objectAtIndex:0];

The code determines which iCal calendar to synchronize with, at the moment it is the default calendar, however I want to change the calendar for synchronization depending on the calendar selected in PopUp.

My question is: how to make NSPopUpButton display all iCal user calendars and depending on which one is selected to change the calendar for synchronization? Currently, I only use code that sets it by default.

0
source share
1 answer

NSPopUpButton iCal:

for (CalCalendar* cal in [[CalCalendarStore defaultCalendarStore] calendars])
    [myPopUpButton addItemWithTitle:[cal title]];
0

All Articles