DumontEXE 0.0.1
Object Extensions

Objects Extensions... This is what the Dumont project is all about - extending the object capabilities of regular Commence objects. Normally a vbScript application, or external program, connects to Commence directly through the Commence API. The Commence API offers object interfaces such as Application, Database, Form and so on. These objects offer a very limited interface.

The Dumont program extends the regular API of Commence by reproducing the Commence API in its entirety. All of the objects that are normally available from Commence are also available from Dumont. Those Dumont objects are also available using the same code as its Commence counterpart. The functions that are available from each Commence object are also available from each Dumont object. This means that using the Dumont objects in place of the regular Commence objects is a trivial task. Existing code written for the Commence API can be easily and quickly upgraded to use the Dumont API - very few changes are required to existing code to use Dumont.

vbScript Example to Access a Form Field Object
 Form.Field("Customer Name").value = "Joe Smith"
vbScript Example to Access a Dumont Form Field Object
 dfrm.Field("Customer Name").value = "Joe Smith"

As you can see the two code samples are nearly identical. The only difference in the two is the Dumont version uses a dfrm object rather than a Form object. How does one get a dfrm object? It's simple, just wrap the regular Form object with a Dumont Form object using the following code:

Wrapping a Commence Form Field object with Dumont
 dim ddll: set ddll = createObject("DumontDLL")  ' hook into dumont
 dim dfrm: set dfrm = ddll.form(Form)            ' wrap a regular commence form
 dfrm.field("Customer Name").value = "Joe Smith" ' simple!
 dfrm.field("Customer Name").previousValue       ' handy!!
 dfrm.field("Customer Name").changeLog           ' incredible!!!
See also:
cmcDatabaseApi::cmcField

The Dumont Form object is identical in function to the regular commence Form object in the sense that it implements all of the regular Commence Form object functions.

dot_inline_dotgraph_1.png

However, that is where the similarity ends. Once the programmer has a handle on a Dumont object, in place of a Commence object, a whole new set of functions and features are available. These features include things like undo and previousValue functions on fields and connections and forms, object alias names, comments, descriptions, documentation, user definable properties and so on...

dot_inline_dotgraph_2.png

A Running Object Table is available for any running Commence application. There's even an Open Form Table available at any time - allowing the programmer to automate one form from another, or one database from another. Dumont also improves the base Commence API by offering shortcuts to regularly used objects and functions. These shortcuts include access to the cmcApplication object from any other object. Additional improvements include a complete DDE Conversation API that takes care of properly formatting queries into the DDE system - no more worrying about how to properly double-quote a dde request string!

Dumont provides for a whole set of object-documentation functions. These documentation functions provide storage for complete documentation-related notes for every object in the system. This includes comments and full field descriptions on Forms and Connections and Fields, even Agents and Views! While not available at the time of this writing, the Dumont system will have the ability of producing a full set of application documentation files using the doxygen documentation system (mentioned here in the Additional Resources section).

~ ~ ~ ~

In order for the cmcDatabaseApi to manage additional properties and custom settings of the objects within the system it must have a place to store the data. This type of data is referred to as meta-data, or database design data. This meta data is stored in a single xml file and stored in a specially designed category.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com