Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
skicson
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

PIM EventList.items() UID different for RepeatRule

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?

 

 

 

Please use plain text.
Administrator
MSohm
Posts: 14,525
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: PIM EventList.items() UID different for RepeatRule

What version of BlackBerry handheld software are you testing with?  You can see this under Options, About on the BlackBerry.  Are you seeing this in BlackBerry handheld software version 4.5.0 or 4.6.0?
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
skicson
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: PIM EventList.items() UID different for RepeatRule

I have tested this only with 4.2 and 4.2 OS.
Please use plain text.
Administrator
MSohm
Posts: 14,525
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: PIM EventList.items() UID different for RepeatRule

Can you provide a larger example on how you are creating ev?  Has it been retrieved from somewhere or are you creating a new instance of it?  If it is new, has the item been commited? 
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
skicson
Posts: 56
Registered: ‎07-14-2008
My Device: Not Specified

Re: PIM EventList.items() UID different for RepeatRule

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.

Please use plain text.
Administrator
MSohm
Posts: 14,525
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: PIM EventList.items() UID different for RepeatRule

Thanks, I have reported this issue to our development team.  A work around is to pass a String with the UID to the PIMList.items(String) method instead of creating an Event first.  This did return the recurring and non recurring events in my tests.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.