home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
utilities
/
c
/
calendar
/
!Calendar
/
!Help
< prev
next >
Wrap
Text File
|
1992-02-14
|
7KB
|
161 lines
Intoduction
This application is public domain, it may be copied freely provided that all
files are kept together. It may not be sold for profit except for a nominal
handling charge. Portions of the code may be used in your own programs
providing recognition to the author is given. The author accepts no
responsibility for any loss or damage resulting from the use of this
application.
This application is intended to create calendars by sending data to
Computer Concepts document processor (Impression), or any other application
which requests it, using their ImpulseII protocol.
Several example calendars are supplied, these may be accessed by clicking
on the icon bar icon to open the main control window and then double
clicking on the 'Calendars' directory icon. Each calendar document
contains Impression Merge commands to request specific information such
as the year, month, week or day. This information is sent to the document
by the !Calendar application.
Buttons and Options
To create a calendar drag one of the calendar documents, called a template,
onto the main window or onto the calendar icon on the icon bar. The full
pathname of the file will appear in the icon in the centre of the main
window. The Create button will start the merge operation with Impression but
there are several options, controlled by the option icons, which determine
how the calendar is generated. These are explained below.
Print :-
When on this option will cause a Print command to be sent to
Impression after the calendar data has been sent to the
document. If a printer driver is loaded then the contents of the
template, with the merged data, will be printed.
Keep Result :-
This option causes the result of the merge operation to be kept
so that you may edit it. This means that the merge commands
no longer exist in the document so if you save it you cannot
load it in afterwards and generate a different calendar. You
should ensure that a copy of your original document, with its
merge commands, is kept safe.
Use Start/End Month :-
This option is used when you have a template document
which contains Merge commands for only one or two months,
and you want to use that document as a template for a range of
months. The range used is those months between the values
shown in the Start Month and End Month icons at the top of
the window.
Pause after Merge :-
This option is handy for examining the results of the merge
operation before they are printed or lost. The document is
placed in a non-editable state which is shown by the pointer
turning into a cross when moved over it.
The default options at startup are just Print, with this combination data
would be sent to the template document and then the results would be
printed. With Use Start/End Month set as well, a template containing just
one month would be repeatedly merged and printed.
The three sets of "bump" icons at the top of the window control the year
and the start and end months, the latter two coming into effect with the
Start/End Month option described above. The year comes up with the
current year from the real time clock in the computer. Clicking with Adjust
on any bump icon will perform the opposite action to that of Select.
The only icon not mentioned yet is the Cancel button. This will abort the
current operation and return to the state before Create was pressed.
Unfortunately, because the message passing which takes place when
merging is the highest priority event to which the Wimp responds, no
buttons or option icons will respond whilst merging.
Impulse Commands
Impulse is a Public Domain high level message passing system written by
Computer Concepts Ltd. Messages may be passed between applications
such as Impression II and Minerva's MultiStore database as a means of
controlling their actions. Contact Computer Concepts for more details.
What follows is a list of the methods to which Calendar responds. The first
set of commands do not return a result and so are not meant to be inserted
into an Impression merge command. They are intended for another application
to control Calendar. All except the SetPrefix command are self-explanatory
as they do the same job as their icon namesakes described above. SetPrefix
is provided so that an application other than Impression may be sent the
merge data. The name of the application must be given after the SetPrefix
command then all it needs to do is respond to the Merge, Edit and Print
commands in the same way as Impression.
<on/off> may be either 'ON' or 'OFF' the case does not matter. Quit will
shutdown the application in the same way as choosing quit from the icon bar
menu.
{ methods :
SetOption
( -Print <on/off> | -UseMonth <on/off>
| -Pause <on/off> | -Keep <on/off> )
Cancel
Quit
Create
SetPrefix <string>
}
This second set of commands are intended to be used in the merge commands in
the Impression document. <month> may be either the number 1 to 12 or the
name of the month itself e.g. January. Similarly <day> is 1 to 7 or the name
of the day.
GetDate is used to get either day numbers (1..31) or the names of days
(Sunday..Monday). If the day is not specified (no -Day), then a week is
given starting from Sunday. If -Format <number> is used, then the names of
the days are returned to the number of characters rquested.
A tab is inserted for days which are blank, i.e. those before the first of
the month and after the end of the month. If the word 'Current' is used then
the month currently selected is used as the one to return the data for. The
word 'Next' can also be used here to select the next month, which is then
returned as the merge data.
NextMonth returns null data to Impression, it is used to instruct Calendar
to move onto the next month. This would typically be used at the end of a
template which contained only one month, so that the next merge operation
would start with the next month.
Set is another command which returns null data, it is used to force a
particular year, month or range of months to be generated.
{ methods :
GetDate
-Month ( <month> | Current )
-Week <1..6>
[ -Day <day> ]
[ -Format <length of returned string> ]
GetMonth
GetYear
NextMonth
Set
[ -Month <month> ]
[ -Year <number> ]
[ -StartMonth <month> ]
[ -EndMonth <month> ]
}
ImpulseII is a trademark of Computer Concepts Ltd
Revision History:
15/2/92:
First release
© Dale Cass 1992
© SFC 1992