

CALLOOK.EXE  - GUI Lookup / Popup Calendar  October 1993


By:
                Paul M. Blais
                St. Paul, MN
                CIS - [72103,111]

Requirements:
                EGA or better Display Adapter
                Mouse (srongly recommended)
                A copy of version Clarion CDD ver. 3006
                DDCLA.DLL  -  Very important!

Installation:

                Unzip this file (your already reading it)
                Make sure the callook.ini and program are
                   together
                Make sure DDCLA.DLL is in your PATH or current
                   directory
                Execute: CALLOOK


WHAT IT DOES



CCalLook was designed when I was working (still am) on a work
order tracking system.  I needed to capture a lot of date inputs
and it is so difficult when trying to schedule something without
the use of a calendar.  I wrote this as a solution to date data
entry.  I only wanted to do it once!  I also knew I would reuse
it in another application sometime.

The Lookup / Popup code is a Clarion CDD built external
procedure that may be called anytime you need to enter a date.
This is the lookup portion of the code.  ALL @Dn date pictures
are supported.  All that is required is to add a  button to your
screen and add two lines of code to the  "When Button is
pressed" source screen.  You pass an integer to the procedure
that represents the @Dn picture format.  The current  contents
of the entry field is used as a default.  If no data  is present
in the field, then today's date is used. The popup  calendar
looks like a regular calendar except each day is a  button that
can be pressed.  NEXT and PREVIOUS buttons permit you to scroll
through the months.  When you press a day button the full date
appears at the bottom of the screen.  A select  button takes the
displayed value and exits. When the procedure exits, the value
selected by the user is PRESSed into the data entry field.  This
is just like a Calrion standard "Lookup" template (that's what I
used  to build it). There is a data entry field under the day
buttons too.  If you type a date in the field, the correct
calendar for that month and year is displayed.  This is handy
for finding what day your birthday will be on in 1999.

If you pass the procedure a zero parameter to CCaLLook, then the
procedure acts like a popup calendar.  You can scroll through
the months and look at the dates.  The SELECT button then
performs the same as an exit.  No value is passed back.  This
alone may be a nice desk accessory add on to any app that works
with dates.



WHAT IT DEMONSTRATES



This small program is a good demo of using buttons in a GUI
application.  If you don't have the Clarion GUI Kit product then
this is also a good demo of what a GUI app looks like.  (You
should download the OTHER file from the forum, since the GUI Kit
is required for this demo to work). If you  have never built
external modules for your apps this is only one way you might
try it out.  External modules let you write code once, then add
it to all your apps.  The documentation and  source code for
this program can help you learn how to do it yourself.  I tried
to make this as much a tutorial as documentation.

If you love reading source code, the full version has some good
manipulation of dates involved.  Especially the undocumented
method of calulating the day of the week (it's real easy).  I
learned everything in Clarion from examples, so I hope
someone else can benefit form this effort.

Running in Text Mode:

If you want to run this demo in text mode then you need to make
one tiny modification to the CALLOOK.INI file enclosed.  Change
the following:

        CLAGRAPH=EGA

To read as:

        CLAGRAPH=ALLTEXT

This will perform all the above functions only without GUI.
I'm sorry but the screens do not look as good in text mode, but
if you want you can modify the source code.  In GUI mode you
might want to use different colors, It's not supported without
code modification!  In text mode you could add VGACOLOR to jazz
it up some more.

What it costs:

Surely we need to discuss cost. NONE!  This is a freeware app
and example for use as you like.  While I do not not mind if
you integrate the source code into an app, I will get mad if
find that someone is just selling this app.  Of course I assume
no responsibility for anything that happens when you use this
code to you or any customer.  There might be a bug, but I do
use this myself!  If you have any questions you can post a
message for me in the Clarion Forum on CompuServe.
