printf("%d", icalcomponent_is_valid(iCalComp));
prints a 1.
What could be going wrong?
On 7/26/06, Teresa Thomas <[EMAIL PROTECTED]> wrote:
I am trying to add an event into my ECal, using the following code:
...
// Convert vevent into iCalComponent
icalcomponent* iCalComp = icalcomponent_new_from_string(Filecontents);
// Create an object in calendar
gboolean is_create = e_cal_create_object(ecal, iCalComp, (char **)&uid, &error);
printf("%s%d","Did event add successfully? = ",is_create);
printf("%s%s","\nError message = ",error->message);
g_error_free (error);
...
where my Filecontents is a (sample) string that contains the following:
BEGIN:VEVENT
UID:[EMAIL PROTECTED]
DTSTAMP:20060901T1300Z
DTSTART:20060401T163000Z
DTEND:20060402T010000Z
SUMMARY:Claudia is in sensitivity awareness class.
CLASS:PUBLIC
CATEGORIES:BUSINESS,HUMAN RESOURCES
TRANSP:TRANSPARENT
END:VEVENT
The first time I run the program, I get a pop-up box saying that the application has quit unexpectedly. But when I run it again, the GError contains the message that Object ID already exists. At the same time, I cannot see the event on my evolution calendar.
It behaves similarly when I use the e_cal_remove_object() function. First time running, gives the pop-up box and after that GError contains the message that Object ID not found.
Am I missing something?
_______________________________________________ Evolution-hackers mailing list [email protected] http://mail.gnome.org/mailman/listinfo/evolution-hackers
