If you check out the Contacts.dbf table, you'll
note that the data was modeled for a much more robust application than
this one - one that includes Job tracking, Invoicing, Accounts Receivable
and more. The Scheduler shipped with Visual dBASE 7.5 and dBASE is just a first-pass
at a rudimentary application that combines some of the coolest features
of the full-blown app (which will be available later this year as a commercial
product). I wanted to give you an idea of what you can do with the powerful
technology of dBASE, and introduce you to some of the more sophisticated
object-oriented approaches to application development.
Running The ContaX Application
Open dBASE. Go to the Navigator, click on the Programs tab and double-click Contax.prgThe User-InterfaceFor an initial UserID enter A. A. Katz (include the spaces after each period!)
For an initial password, enter CEO (subtle, no?)
The top half of the ContaX screen consists of a two-page notebook.On the first page, you'll see three scheduler grids. You may click on any one of the three to put it "in focus", change the employee represented by that "column" and change the date of the column by clicking on the Calendar when the column "has focus" (you'll know which one has focus - it turns a beige color). Scroll through the columns using the vertical buttons on the far right of the form.
The second page of the notebook gives a "Personal View" as opposed to the "Office View" represented by the three people or days (or any combination of both) displayed in the columns on Page 1. On Page 2, you get a list of appointments for the date and person "in focus" when you clicked on the "Personal View" tab.
By the way, you can change the date on Page 2 by clicking the Calendar. When you go back to page 1, you'll find the selected column now reflects the new date.
Sounds complicated, but it's not. Play around with it for a while and you'll become adept in no time.
The bottom half of the ContaX screen is the data-entry area.
The center of the screen represents appointments.
The right side of the screen displays the address-book entry for the current appointment.
Between the two, note the vertical column of bitmap buttons. That's the toggleButtons custom class - a group of toggle buttons (they stay clicked "in" when selected). The options are:
The buttons will toggle automatically as you navigate through your appointments.
- Appointment Out
- Appointment In
- Outgoing Call
- Incoming Call
- To Do
In the lower right hand corner of the screen sits the "Address Book" pushbutton. Click on this button to add or edit "contact" names and addresses, to search by name or company and to apply the "contact" to the appointment.
When you're in the Address book, note that two of the Grid columns have dark red headers. These are analogous to Netscape's column headings and the Windows Explorer column headings. When you click on the column heading, you change the index order of the table to match the column. The "Search" field respects the column selections. If you've selected "Name", the search will be by Name. If you select "Company", the search will be by Company.
Code Of Note
There are several interesting areas of this application that might bear some close inspection:
Messaging. This system was built, in large part, on "messaging" - setting up automatic notifications between controls and components by defining "owners" and "associated" fields for datamodules and custom controls.
Each message link starts with a "register()" call (check out the Register method and the Init method of Scheduler.wfm), in which one control "registers" itself with another. The Calendar, for example, can register "Owners" and "Fields". When you change the date in the Calendar, the Owners are notified by automatically calling their "setDate()" methods. When a Field is notified, its value gets updated automatically.
The same is true of the toggleButton class which registers itself with the Sched.dmd dataModule. When a navigation occurs, the dataModule automatically "notifies" the toggleButton object through its "setTask()" method. The result: navigating through a rowset automatically changes the button toggled to display the category of the task stored in the row.
Tip: Be careful. If you register, be sure to "unregister" or you may leave "circular references" in your forms which prevent them from either closing or releasing their resources.
Some files you should check out:
Scheduler.wfm Check out the methods in this one. There are some interesting subtleties, including the "batch moves" for page-up/page-dn navigation.Limitations:SchedColumn.cc This is the custom class for the Scheduler Columns on Page 1 of the sample.
ToggleButtons.cc The custom class for the "Task-Type" toggle container.
and, of course
Sched.dmd The dataModule that powers this application.
This Sample app will grow and improve through the course of the dBASE Subscription.
- There is no security, at this time, for the password scheme.
- There are no reports.
Please feel free to submit suggestions, bug fixes and improvements.
Thank you. I hope you're able to glean some insight from this first-shot dBASE sample.
A.A.K