c# - Monotouch EKEvent Notes not being saved -


what doing wrong here? currentevent.title prints correctly. currentevent.notes blank..

public void calendarevents() {    ekeventstore store = new ekeventstore();    ekcalendar calendar = store.defaultcalendarfornewevents;     // query event    if (calendar != null)    {      // add new event      ekevent newevent = ekevent.fromstore(store);      newevent.title = "lunch @ mcdonalds";      newevent.calendar = calendar;      newevent.startdate = datetime.now.date;      newevent.enddate = datetime.now.date.adddays(4);      newevent.availability = ekeventavailability.free;      newevent.notes = "hello";      store.saveevent(newevent, ekspan.thisevent, new intptr());     // searches every event in next year    nspredicate predicate = store.predicateforevents(nsdate.now,datetime.now.adddays(360),new ekcalendar[] {calendar});     store.enumerateevents(predicate, delegate(ekevent currentevent, ref bool stop)    {        // perform check event type        console.writeline(currentevent.title);        console.writeline(currentevent.notes);    });    } } 

the api has changed because above won't compile 'as-is'. updated your:

 store.saveevent(newevent, ekspan.thisevent, new intptr()); 

to

 nserror error;  store.saveevent(newevent, ekspan.thisevent, out error); 

otherwise, using latest monotouch, both strings displayed in "application output" (app running on device).

 lunch @ mcdonalds  hello 

maybe fixed when api modified ?


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -