Vvidget Code Reference Manual

Vvidget Code > Extraordinary Dictionary > Calendar

This section explains how to form a dictionary for a calendar such as this:

Example

The interesting thing about this dictionary is that it has little to do with a graph. It is just a quick demonstration that shows how Vvidget can be used for nearly anything. The Calendar is made from a template drawn using Vvidget Builder. Although it is a pretty bland calendar, you can use the template to jazz it up, add your own logos, etc. and then you can easily print an entire years, or centuries, worth in a Cocoa application or by using a script. Or perhaps you will form a company to automate and sell custom print calendars on the web, sell millions of calendars per year and become famous.

An example code fragment illustration follows:

/* Start of Illustration Code Fragment */

[constructor VC_append_key:"pvs_version" string_value:@"1"];
[constructor VC_append_key:"image_maker" string_value:@"calendar"];
[constructor VC_append_key:"image_width" string_value:@"792"];
[constructor VC_append_key:"image_height" string_value:@"612"];
[constructor VC_append_key:"start_month" string_value:@"1"];
[constructor VC_append_key:"start_year" string_value:@"2010"];
[constructor VC_append_key:"selected_days_of_month" string_value:@"4,6,9,25"];

/* End of Illustration Code Fragment */

The code fragment above can be inserted into the illustration code section of the Illustration project for an immediate running Cocoa application. For additional information consult the Illustration section.

The symbol form follows:

[constructor VC_append_key:"pvs_version" string_value:@"1"];
[constructor VC_append_key:"image_maker" string_value:@"calendar"];
[constructor VC_append_key:"image_width" string_value:@"792"];
[constructor VC_append_key:"image_height" string_value:@"612"];
[constructor VC_append_key:"start_month" string_value:@"MM"];
[constructor VC_append_key:"start_year" string_value:@"YYYY"];
[constructor VC_append_key:"selected_days_of_month" string_value:@"DD,DD,DD,DD,..."];

The following table defines the dictionary key and value pairs:

Chart Specific Entries
KeyValue Description
image_makerAlways calendar indicating a Calendar.
image_widthThe width of the calendar.
image_heightThe height of the calendar.
start_monthThe start month.
start_yearThe start year.
selected_days_of_monthA comma delimited list of selected days of the month, for example: 1,6,9,25.

If you incorporate this functionality into your own application then please consult Cocoa Programming. If you incorporate this functionality into CLI scripts then please consult Script Programming.

Please help improve this documentation. If a section is hard to understand, there is a typo, you would like a new section added, or you detect any other improvement that can be made then please email support@vvi.com with your information.




© Copyright 1993-2011 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.