08-11-2008 06:33 PM
I am trying to find a calendar event by using the UID of the event. This code shown here works fine (evl is the EventList):
Event ev = evl.createEvent();
if (evl.isSupportedField(Event.UID)){
ev.addString(Event.UID, Event.ATTR_NONE, uid);}
Enumeration e = evl.items(ev);
However, this same code does NOT work if the event is a recurring event. I can get it to work by passing the uid itself in as in:
Enumeration e - evl.items(uid);
This is obviously not a good thing since it's possible that any event could hold that uid string somewhere and be matched.
Why does the PIMItem method not work properly for Recurring Events?
08-12-2008 03:19 PM
08-13-2008 11:55 AM
08-14-2008 10:26 AM
08-14-2008 01:14 PM
First, wrt my last message, I meant to say I've tested it on 4.2 and 4.3 version.
wrt the event creation: I'm using the event as a search template for the call to PIMList.items(PIMItem matching). In other words, I'm making an event that looks similar to my target, and then passing that to EventList.items() in order to find the events I want. I don't commit it because I throw it away after the search.
This works fine except for the case I described above with the UID. For some reason it behaves differently for recurring events.
08-14-2008 02:26 PM