How to retrieve recurring reminders from the past? |
Post Reply |
Author | |
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
Posted: 26 April 2010 at 1:15am |
Hello all,
It seems that there's either a bug/shortcoming in CJ's code or I'm not doing something right Let's say I have an recurring event with a reminder set. And let's say that the ocurrence of this event happens while the program is not running. So, the next time the program runs, this ocurrence is skipped. I'm slowly narrowing it down to the UpdateDataFromDP() function in the reminders manager. It seems that it only looks at ocurrences that are in the future from the current time:
What would be great, if I could specify what date should be used as the dtNow, so that I could pass in a date when the program was last run to make sure that all events are processed correctly. Is there a simple way to do this, without overriding the whole remindersmanager/calendar/etc...? Thanks in advance for your thoughts! |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
Narrowing it down a bit further, seems that this code makes the reminders disappear:
not sure why GetLastModificationTime() is there... |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
so, it appears to me that I need to SetLastModificationTime() at some point, but when? It's reset inside the AddEvent() function to the current time...
|
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
Marco1
Senior Member Joined: 16 January 2004 Location: Germany Status: Offline Points: 251 |
Post Options
Thanks(0)
|
Dennis,
some time ago I played around with the integrated calendar reminder logic but there were too many restrictions for the project to be used out of the box. So I'm running my own database query (periodically) which returns all events to remind. My code handles the necessary action and notifications then. Only thing I'm using is the reminder icon of the event display. Sorry, not that what you wanted to hear, but this way saved me a lot of time in my project. |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
Thanks Marco!
I have hit quite a few restrictions myself and now I'm just trying to see just how much of the code I have to override to get it to work properly. Unfortunately it's not a straight-forward task, as you start with one class and then have to pull in more and more because of members/functions being private/protected. It's a pain really. Still, if I manage to get it going, I'll post my findings. Otherwise, I might have to take your route and implement reminders logic myself completely. |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
and of course the most disappointing thing is that there's no reply from the support at all - not here, not in the ticket area - only silence... :(
|
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |