Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Lost events
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Lost events

 Post Reply Post Reply
Author
Message
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post Topic: Lost events
    Posted: 19 March 2006 at 10:31am

Hi,

I added some events in the calendar. The events are recurrent Events. At times, I try to get a reference to the object using the ID, especially when I am not looking at the event, dataprovider.getEvent(int id) returns null, meaning that the event does not exist, event if it does exist.

Is it possible that the Id of the master event changes or that the Dataprovider returns null when I pass the masterID? Is it also possible that the ID change when i change view?

Thnks

WaaZ

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2006 at 6:35am
Hi,

Please note that event ID can be changed by the data provider only when you add event to the data provider (using AddEvent method).
After event is added its ID becomes permanent.
If you need to remember event ID, you can do that after AddEvent call.

pDataProvider.AddEvent(pEvent);
nMyID = pEvent.Id;

 
Note also that ocurrence has a temporary event ID because this is not a persistent object. The ocurrence event object is generated every time when calendar call GetDayEvents method of data provider and each time the same ocurrence will have different IDs.

That's because GetEvent(id) returns null for ocurrences (and for exceptions as well).

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.