PDA

View Full Version : Calendar



rsmith
27-Jul-2009, 01:59 PM
I was wondering if anyone has sample code on how to pull from another data file other than the CALEVENT file? Thanks

Randy Smith
Horizon Information Systems

Renato Villa
28-Jul-2009, 02:52 AM
Hi Randy,

i use the standard Calevent file and is updated from another database file, in this manner i leave Calevent file structure unchanged.

Regards

Ian Smith
28-Jul-2009, 04:19 AM
Hi Randy

The help (you have found the help, haven't you:D) for the calendar class lists the events that have to be coded when pbUseStdFiles is set false. Data is passed to and from these events in structured variables, see tdEvent, tdR_Pat and tdCalCategories.

The class methods that fire the event do so on a "if pbUseStdFiles else". If you search for the events in the class you will see the logic that is used with the standard files. The difficult bit is recurence patterns Each recurence type requires several parameters to describe how the event recurs. Unfortunately Codejock use different properties for all these parameters. There are over 16 properties of which only 2 or 3 are used for each recurence type. This can get confussing.

If you have any specific question please ask.

There is a rewrite of the calendar control pending, but it is a big job so it is not going to be next week. Also we are considering creating a version 2 - not having to worry about compatibility issues will make it simpler.