[Project_owners] creating calendar entries outside of calendar

Adam Raitanen adamr at rogers.com
Wed Mar 8 12:32:09 EST 2006


Hello everyone,

I'm building an extension that pulls out sender and subject information 
from an e-mail in thunderbird, then sends that data directly to a 
mozilla calendar event. I am able to extract the sender and subject from 
the e-mail no problem, as well as send it to a newevent dialog in 
calendar. The only thing i can't do is save the calendar entry. I 
believe it's because calendar isn't actually loaded, so it's internal 
functions which handle that process aren't available. Even if calendar 
is loaded when i run my extension, i still can't use the functions 
inside calendar, and i get no results. Here is the code I am working with:

var server = getSelectedCalendarPathOrNull();
args.server = server;   
args.onOk = refreshRemoteCalendarAndRunFunction( calendarEvent, server, 
"addEvent" );   


The getSelectedCalendarPathOrNull function is inside calendar.js and it 
checks to see which calendar file is currently highlighted and uses that 
one to save the new event to. The refreshRemoteCalendarAndRunFunction 
one just takes the calendarEvent and the server previously called and 
saves it using the addEvent function.

These args are sent to the new event window, which does work properly 
when I call it seperatly from my extension. The only problem is that the 
server field is blank, and the ok button does nothing when clicked.

Does anyone have any ideas that could help?

Thanks,
Adam



More information about the Project_owners mailing list