QCommenceForm Class Reference

Dumont-Enhanced Commence-Form. More...

#include <QCommenceDB.h>

Inheritance diagram for QCommenceForm:

Inheritance graph

List of all members.

Public Slots

void dumontTest (QString msg)
 Test Function.
QString name (void)
 Return the name of something.
QString categoryName (void)
 Return the Category name of this Form.
QString itemName (void)
 Return the Item Name text value.
QString itemClarify (void)
 Return the Item Clarify text value.
QString tabName (void)
 Return the current Tab name.
QString fieldName (void)
 Return the current field name.
QCommenceFieldkeyField (void)
 Return the keyField.
QCommenceFieldcfyField (void)
 Return the clarifyField.
QCommenceFieldvarField (void)
 Return the varField.
QCommenceFieldguidField (void)
 Return the guid field.
QCommenceFieldcmcIDField (void)
 return the cmcID field
QString toXml (QString i_fieldList)
 Convert the form fields and connections and their values to an xml document.
QString cmcID (void)
 Return the cmcID of this item.
QString guid (void)
 Return the guid of this item.
bool isAdd (void)
 Return true/false if this form is in Add Mode.
bool isDelete (void)
 Return true/false is the form is in Delete mode.
bool isPrevNext (void)
 Return true/false if the form is from a prev/next event.
QString fieldValue (void)
 Return the current field value.
bool isShared (void)
 Return true/false if this item is shared.
long backColor (void)
 Return the current background color.
void backColor (long i_color)
 Set the current background color.
QString caption (void)
 Return the current form caption.
void caption (QString i_caption)
 Set the form caption.
void setShared (bool i_state)
 Set the shared flag on the form.
void setValue (QString i_value)
 Set the value of the currently selected field.
bool deleteItem (void)
 Delete the Item.
bool save (void)
 Cause the form to Save.
bool cancel (void)
 Cause the form to cancel.
bool abort (void)
 Cause the form to abort.
void moveToTab (QString i_tabName)
 Move to the requested Tab name.
void moveToField (QString i_fieldName)
 Move to the requested Field name.
bool isDirty (void)
 Report if any field or connection on the form is dirty or not.
void undo (void)
 Restore a form back to its original state.
QCommenceApplicationapplication (void)
 Return a pointer to the Application object.
QCommenceApplicationcmcApp (void)
QCommenceApplicationApp (void)
QCommenceDatabasedatabase (void)
 Return a pointer to the Database object.
QCommenceDatabasecmcDB (void)
QCommenceDatabaseDB (void)
QCommenceCategoryDefcategoryDef (void)
 Return the forms category definition.
QCommenceFieldfield (QString i_fieldName)
 Get a Field object by Name.
QCommenceFieldfld (QString i_fieldName)
QCommenceConnectionconnection (QString i_conName, QString i_catName, QString i_fieldName="")
 Get a Connection object by name.
QCommenceConnectionconnection (QString fieldName)
 Get a Connection by its "FieldName".
QCommenceConnectioncon (QString fieldName)
 Get a Connection by its "FieldName".
bool isConnection (QString i_fieldName)
 Check for Connection Name.
bool isField (QString i_fieldName)
 Check for Field Name.
QCommenceFormControlcontrol (QString i_controlName)
 Get a control from the form.
QCommenceRuntimeruntime (void)
 Get the Form.Runtime object.
QCommenceRuntimeRT (void)
QMultiDateDialogmultiDateDialog (const QString &defaultDate="")
 Return a new multi-date dialog.
void multiDateDialogExec (const QString &defaultDate="")
 Return a multi-date dialog.
QString multiDateDialogExec (const QString &mddValue, const QString &defaultDate)
 Multidate Dialog Returns the value immediately.
QString changeLog (QString fieldList, long format=0)
 Return Change Log Text.
QString changeLog (void)
 Retrieve the Change Log string from this form.
bool onLoad (void)
 Fire Form_OnLoad event.
bool onSave (void)
 Fire Form_OnSave event.
bool onCancel (void)
 Fire Form_OnCancel event.
bool onEnterTab (QString i_tabName)
 Fire Form_OnEnterTab event.
bool onLeaveTab (QString i_tabName)
 Fire Form_OnLeaveTab event.
bool onEnterField (QString i_fieldName)
 Fire Form_OnEnterField event.
bool onLeaveField (QString i_fieldName)
 Fire Form_OnLeaveField event.
bool onEnterControl (QString i_controlID)
 Fire Form_OnEnterControl event.
bool onLeaveControl (QString i_controlID)
 Fire Form_OnLeaveControl event.
bool onActiveXControlEvent (QString i_controlID, QString i_eventName, QString i_parameterArray)
 Fire Form_OnActiveXControlEvent event.
bool onClick (QString i_controlID)
 Fire Form_OnClick event.
bool onChange (QString i_controlID)
 Fire Form_OnChange() event.
bool onKeyPress (QString i_controlID, long i_keyAscii)
 Fire Form_OnKeyPress event.
void changeField (QString i_fieldName, QString i_fieldValue)
 ChangeField Call-back slot.
void changeConnection (QString i_connName, QString i_toCategory, QString i_value)
 ChangeConnection Call-back slot.
void setReopen (bool state)
void reopen (void)
 Perform reload function.
QCommenceMeInfomeInfo (void)
 Short-cut to MeInfo.
QCommenceAddRowSetgetChangeLogAddRowSet (void)
 Get the Change Log category Definition.
QCommenceActiveViewInfoavi (void)
 Return a copy of the form's Active View Info.

Public Member Functions

 QCommenceForm (void)
 QCommenceForm (QCommenceForm *copy)
 Copy Constructor.
 QCommenceForm (QCocDispatch *i_unknown, QObject *i_parent)
 Standard Constructor.
virtual ~QCommenceForm ()
 Standard Destructor.
void resetFields (void)
 Reset fields to their 'unknown' values.
void prevNext (void)
 Perform the prevNext functions.

Private Attributes

QString m_name
 Form.Name cache Value.
QString m_categoryName
 Form.CategoryName cache Value.
bool m_reopen
 Flag to indicate that the form is to be reopened.
QString m_itemName
QPointer< QCommenceActiveViewInfom_avi
bool m_isDelete
QPointer< QMultiDateDialogm_mdd
 multiDateDialog
QPointer< QCommenceDatabasem_db
 database pointer cache
QPointer< QCommenceCategoryDefm_categoryDef
 categoryDef pointer cache
bool m_prevNext
 Remember if onSave or onCancel was called.


Detailed Description

Dumont-Enhanced Commence-Form.

inline_dotgraph_16.dot

This object is used to override standard form functionality and provide for greater form control. The enhancements to the form object include the the ability to get a changeLog from the form field and connection objects, the ability to gain access to the category definition object for the form, and various short-cuts to the database objects, meInfo object, and so on.

In order for the Dumont-enhanced Commence Form object to function properly, the standard Commence Form object needs to be wrapped. The method for wrapping the standard commence form is easily accomplished as follows:

Wrapping a Commence.Form vbScript Example:
 Option Explicit
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form) ' now use dfrm.Field rather than Form.Field
One particular thing to note about the Dumont enhanced Commence form object is when requesting a field() or connection() object, if a bad field name or connection name is requested, this form object will not generate an error. Rather, it will only return an empty field/connection object wrapper to the field or connection object. Consequently, an entry in the dumont.log file will be generated indicating the fetch error. This may represent a problem in your application code if it's relying on a field/connection fetch error. To test for this condition you can use the function objectIsValid() as follows:

Testing for a valid field or connection
 dim oField: set oField = dfrm.field("Bad Field Name")
 if( Not oField.objectIsValid ) then
   msgbox "Oops, requested a bad field name"
 end if
The following methods are standard to the Commence form object and are implemented here directly:

Standard Commence Form API calls
Extended Dumont Form API calls
  properties:         methods:              events:
  ------------------  --------------------  ---------------
   catName            connection(Name)      changeField
   keyField           multiDateDialogExec   changeConnection
   cfyField           meInfo
   varField
   isDirty
   undo
   cmcApp, App
   database
   cmcDB, DB
   isConnection
   isField
   changeLog
   categoryDef
For the moment, the Dumont enhanced form must be manually stitched in to the existing Commence form. To do this requires making calls into the Dumont.Form API as follows:

Hooking a Dumont.Form object
 Option Explicit
 
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.Form(Form)
 
 Sub Form_OnLoad()
   dfrm.onLoad
 End Sub
 
 Sub Form_OnSave()
   '
   ' do your save processing here
   '
   DoThis()
   DoThat()

   '
   ' let Dumont finish.  must be the last thing called
   '
   dfrm.onSave
 End Sub
 
 Sub Form_OnCancel()
   '
   ' do your cancel processing here
   '
   DoThis()
   DoThat()

   '
   ' let Dumont finish.  must be the last thing called
   '
   dfrm.onCancel
 End Sub
 
 Sub Form_OnEnterTab(ByVal TabName)
   dfrm.onEnterTab TabName
 End Sub
 
 Sub Form_OnLeaveTab(ByVal TabName)
   dfrm.onLeaveTab TabName
 End Sub
 
 Sub Form_OnEnterField(ByVal FieldName)
   dfrm.onEnterField FieldName
 End Sub
 
 Sub Form_OnLeaveField(ByVal FieldName)
   if( dfrm.onLeaveField(FieldName) ) then _
     Form_OnChangeField(FieldName)
 End Sub
 
 Sub Form_OnEnterControl(ByVal ControlID)
   dfrm.onEnterControl ControlID
 End Sub
 
 Sub Form_OnLeaveControl(ByVal ControlID)
   dfrm.onLeaveControl ControlID
 End Sub
 
 Sub Form_OnActiveXControlEvent(ByVal ControlID, ByVal EventName, ByVal ParameterArray )
   dfrm.onActiveXControlEvent ControlID, EventName, ParameterArray
 End Sub
 
 Sub Form_OnClick(ByVal ControlID)
   dfrm.onClick ControlID
 End Sub
 
 Sub Form_OnChange(ByVal ControlID)
   dfrm.onChange ControlID
 End Sub
 
 Sub Form_OnKeyPress(ByVal ControlID, ByVal KeyAscii)
   dfrm.onKeyPress ControlID, KeyAscii
 End Sub
 
 Sub Form_OnChangeField(ByVal FieldName)
   'respond to field-specific changes
 End Sub
The preceeding code passes control from the Commence form object to the Dumont form object and allows Dumont to do its own form processing functions. These functions include updating field-on-change values and other automated processes. Future versions of Dumont will not require these kinds of hooks, and will handle hooking in to the application more-or-less transparently.

Note:
The Dumont.Form object suffers from some of the Commence.Form peculiarities still. These peculiarities include the use of the 'prev' and 'next' buttons on the form. When the previous and next buttons are used, several events get fired in a particular order. The DumontDLL attempts to detect these events to determine if the form content is a function of a previous/next event. If it does determine this condition, then this Dumont Form object resets its internal field and connection values so as to insure proper handling of Change values. To help facilitate vbScript code handling of prev/next events, the DumontDLL Form object contains a isPrevNext flag that indicates true/false if this condition exists.

In order for the changeLog functions to work reliably, the Dumont Form onSave event MUST be called *last* at the end of the vbScript onSave routine. This is because the Dumont Form object clears all its field values at the end of its onSave routine. Any processing that you perform after the Dumont onSave routine causes the changeLog functions to read incorrectly.

Definition at line 3572 of file QCommenceDB.h.


Constructor & Destructor Documentation

QCommenceForm::QCommenceForm ( void   )  [inline]

Definition at line 3578 of file QCommenceDB.h.

QCommenceForm::QCommenceForm ( QCommenceForm copy  )  [inline]

Copy Constructor.

This makes a copy of this form, but it does not, at present copy any of the QCommenceForm internal objects. To do that may require additional overhead we're not interested in at this point. This copy constructor is provided for Qt compatibility only.

Definition at line 3590 of file QCommenceDB.h.

QCommenceForm::QCommenceForm ( QCocDispatch i_unknown,
QObject *  i_parent 
)

Standard Constructor.

This is the standard constructor that is used for all new forms. It requires the form name as a parameter so that it can set its object name appropriately.

Definition at line 2967 of file QCommenceDB.cpp.

QCommenceForm::~QCommenceForm (  )  [virtual]

Standard Destructor.

The destructor doesn't have much to do since the form object doesn't really carry any persistent information (yet).

Definition at line 3020 of file QCommenceDB.cpp.


Member Function Documentation

bool QCommenceForm::abort ( void   )  [slot]

Cause the form to abort.

This executes the abort operation on the form.

vbScript Example:

Definition at line 3680 of file QCommenceDB.cpp.

QCommenceApplication * QCommenceForm::App ( void   )  [slot]

Definition at line 3258 of file QCommenceDB.cpp.

QCommenceApplication * QCommenceForm::application ( void   )  [slot]

Return a pointer to the Application object.

This returns a pointer to the Form.Application object.

vbScript Example:

Definition at line 3189 of file QCommenceDB.cpp.

QCommenceActiveViewInfo * QCommenceForm::avi ( void   )  [slot]

Return a copy of the form's Active View Info.

This method returns a copy of the Active View Info that was true when this form was first opened. This allows the user to determine the AVI that caused this specific form to open in the first place, without worrying about caching this value manually.

Definition at line 3037 of file QCommenceDB.cpp.

void QCommenceForm::backColor ( long  i_color  )  [inline, slot]

Set the current background color.

This sets the background color of the for to the long-int value.

vbScript Example:

Definition at line 4048 of file QCommenceDB.h.

long QCommenceForm::backColor ( void   )  [slot]

Return the current background color.

This returns the long-int value of the current form background color.

vbScript Example:

Definition at line 3490 of file QCommenceDB.cpp.

bool QCommenceForm::cancel ( void   )  [slot]

Cause the form to cancel.

This executes the Cancel operation on the form.

vbScript Example:

Definition at line 3641 of file QCommenceDB.cpp.

void QCommenceForm::caption ( QString  i_caption  )  [inline, slot]

Set the form caption.

This sets the form Caption value.

vbScript Example:

Definition at line 4070 of file QCommenceDB.h.

QString QCommenceForm::caption ( void   )  [slot]

Return the current form caption.

This Returns the current form Caption.

vbScript Example:

Definition at line 3498 of file QCommenceDB.cpp.

QCommenceCategoryDef * QCommenceForm::categoryDef ( void   )  [slot]

Return the forms category definition.

Definition at line 3065 of file QCommenceDB.cpp.

QString QCommenceForm::categoryName ( void   )  [slot]

Return the Category name of this Form.

Return the category name that this form is associated with.

vbScript Example:
   dim cursor: set cursor = dfrm.DB.getCursor( 0, dfrm.categoryName, 0 )

Definition at line 3054 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::cfyField ( void   )  [slot]

Return the clarifyField.

vbScript Example
 Sub DoSomething()
   dim oCfy: set oCfy = dfrm.cfyField
   oCfy.Value = "this is a test"      ' set the clarify field to "this is a test"
 End Sub

Definition at line 3124 of file QCommenceDB.cpp.

void QCommenceForm::changeConnection ( QString  i_connName,
QString  i_toCategory,
QString  i_value 
) [slot]

ChangeConnection Call-back slot.

This is a change-connection call-back slot. This method gets called anytime a connection content changes and the cursor focus is moved to the next field or connection. This method requires that the Form Animation Concept functions be called during form execution.

Reimplemented in QCommenceCalendarForm, and QCommenceDocketForm.

Definition at line 4131 of file QCommenceDB.cpp.

void QCommenceForm::changeField ( QString  i_fieldName,
QString  i_fieldValue 
) [slot]

ChangeField Call-back slot.

This is a change-field call-back slot. This method gets called anytime a field content changes and the cursor focus is moved to the next field. This method requires that the Form Animation Concept functions be called during form execution.

Reimplemented in QCommenceCalendarForm, and QCommenceDocketForm.

Definition at line 4113 of file QCommenceDB.cpp.

QString QCommenceForm::changeLog ( void   )  [slot]

Retrieve the Change Log string from this form.

vbScript Example:
See also:
Change Log Engine

Definition at line 3866 of file QCommenceDB.cpp.

QString QCommenceForm::changeLog ( QString  fieldList,
long  format = 0 
) [slot]

Return Change Log Text.

This function provides for multiple formats of a changeLog string. The default format (parameterless) is an xml formatted string, which is handy for punching into a database record somewhere else for post-processing. However, sometimes that is not always convenient.

vbScript Example ~ Requesting a form formatted Change Log
 '
 ' Return a default to/from change log on this form.
 '
 msgbox "here is your change log: " & dfrm.ChangeLog( "Name,Phone,Address,Relates to Company" )

 '
 ' Result:
 ' Field 'Name' from 'Jim' to 'Jack'
 ' Field 'Phone' from '555-1212' to '444-1313'
 ' ...and so on
Returns:
String ~ Formatted according to the requested output
Note:
You must be careful to call this routine *before* you call any of the other form save routines that might reset the change log for the form. If you call this routine *after* some of the other form handlers, then you will end up with an empty change log - which may not be accurate.
Parameters:
fieldList String ~ delimited list of field names

This list of field names is not particularily sensitive to the format of the delimiter. Just as long as one field/connection name is distinguishable from another field/connection name then the application will be able to return to you a properly formatted list.


format long ~ Integer representing requested format

  • 0 ~ (default) From/To format
  • 1 ~ List Format (not implemented)
  • 2 ~ Column Format (not implemented)

Definition at line 3820 of file QCommenceDB.cpp.

QCommenceApplication * QCommenceForm::cmcApp ( void   )  [slot]

Definition at line 3250 of file QCommenceDB.cpp.

QCommenceDatabase * QCommenceForm::cmcDB ( void   )  [slot]

Definition at line 3277 of file QCommenceDB.cpp.

QString QCommenceForm::cmcID ( void   )  [slot]

Return the cmcID of this item.

This function returns the currently assigned cmcID (THID) of this item. Please note that this function ONLY works when this category contains an actual varField field where the cmcID can be stored .AND. this form is .NOT. in "isAdd == True" mode. Both of those conditions must be true to get at the cmcID value for this item. If not, then "unknown" is returned instead.

Alternatively, if you do not want to have the cmcID stored in a varField() type of field, you can define a field "cmcID Text(20)" (a 20-character text field called "cmcID") in the category and then the THID will be automatically stored there. This can have the advantage of using the cmcID field as the clarify field and creating an index for it and so on. The disadvantage of using a cmcID field as a clarify field is the cmcID field then shows up in the Tools|Global Search results and also shows up in some other places... and that may be undesirable.

One thing to note about the cmcID value is that not only is it not available until a new item has been saved to disk, but the cmcID value is actually not portable across multiple databases. For instance, if an item is moved from one database to another, then even though, technically the cmcID is likely to still be unique, it does not necessarily represent the correct actual cmcID value of that item - simply because it was exported from one database and imported into another. For this reason, and probably others that haven't been completely realized yet, the cmcID valus is of marginal value, and probably should not be relied on in a production database. Instead, the guid() value should be used when trying to uniquely identify items in Commence.

vbScript Example:
 msgbox dfrm.cmcID ' shows '4:80006401:0000365E'
See also:
guid

Definition at line 3293 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::cmcIDField ( void   )  [slot]

return the cmcID field

The cmcID field is a special field defined in the category that can be used to store the cmcID of this item. It should be a text(20) field. It can be indexed and/or used as a clarify field to aid in the identification of items by ID. If this field exists in the category definition then the cmcID will *not* be stored in the varField() if it also exists.

See also:
cmcID, guidField, varField

Definition at line 3148 of file QCommenceDB.cpp.

QCommenceConnection * QCommenceForm::con ( QString  fieldName  )  [slot]

Get a Connection by its "FieldName".

This is an alias function for obtaining a regular Connection field. It is intended to make the code a little more readable.

vbScript Example
 Sub Form_OnEnterField(ByRef FieldName)
   dim oxEmployee: set oxEmployee = dfrm.con("pRD Employee")
 End Sub

Definition at line 4233 of file QCommenceDB.cpp.

QCommenceConnection * QCommenceForm::connection ( QString  fieldName  )  [slot]

Get a Connection by its "FieldName".

This is an overloaded function to return a QCommenceConnection when all we have is the "FieldName" as it is provided by the vbScript Form_onEnterField(FieldName) function call. Normally when dealing with Form Events, all that is provided is a FieldName value which can represent a connection field or a standard text field. The application (code) has to try to determine which one it is. Dumont has the built-in services to make this an easy task. It is possible to pass that simple FieldName value to the connection method and receive a QCommenceConnection connection object.

What this function also makes available is the ability to set field and connection names using the vbScript 'Const' keyword. Both field names and connection names can be declared this way and then used to reference the connection by name. This can have the advantage of really cleaning up a bunch of code redundancies.

vbScript Example:
 '
 ' These declarations were formerly not possible because the .connection.
 '  object required two parameters.
 '
 Const FN_KEY      = "contactsKey"
 Const FN_CFY      = "contactsCfy"
 Const FN_FIRST    = "First Name"
 Const FN_LAST     = "Last Name"
 Const FN_PHONE    = "Main Phone"
 Const CN_EMPLOYER = "Employed by Company"
 Const FN_EMPLKEY  = "companyKey"
 Const FN_BUSPHONE = "Business Phone"

 Sub Form_OnEnterField(ByRef FieldName)
   '
   ' Do the Dumont OnEnterField stuff
   '
   dfrm.onEnterField FieldName

   '
   ' If this is a connection object then deal with it
   '
   if( dfrm.isConnection(FieldName) ) then
     dim conn: set conn = dfrm.connection(FieldName)
     msgbox "You have " & conn.ConnectedItemCount & " connected items"

     '
     ' Use the Const values to access the controls
     '
     dfrm.field(FN_KEY).value = _
       dfrm.field(FN_LAST)   & ", "   & _
       dfrm.field(FN_FIRST)  & " of " & _
       dfrm.connection(CN_EMPLOYER).fieldValue(FN_EMPLKEY) ' note: connection referred by NAME

     dfrm.field(FN_PHONE).value = _
       dfrm.connection(CN_EMPLOYER).fieldValue(FN_BUSPHONE) ' note: connection referred by NAME

   end if
 End Sub
See also:
ConnectionDefs, Connection, isConnection, isField

Definition at line 4238 of file QCommenceDB.cpp.

QCommenceConnection * QCommenceForm::connection ( QString  i_conName,
QString  i_catName,
QString  i_fieldName = "" 
) [slot]

Get a Connection object by name.

This returns a Connection object from the Form. Optionally, a "FieldName" value can be provided which gives this connection a 'default' field property.

Note:
This object does *not* fail if an improper connection name is provided. Rather, it returns an object that is missing its connection-object pointer. The object that gets returned can be tested for validity using the isValid() function call.
vbScript Example:
 Sub ConnectStaff()

   dim ocStaff: set ocStaff = dfrm.connection("Relates to","Staff")
   if( ocStaff.isValid ) then
     ocStaff.SetConnection("Jim","Accounting")
     ocStaff.SetConnection("Tony","Owner")
   end if

   dim ocFail: set ocFail = dfrm.connection("this will","fail")
   if( ocFail.isValid ) then
     ocFail.SetConnection("ok, now","I'm suprised")
     ocFail.SetConnection("this shouldn't","get here!")
   end if

 End Sub

Definition at line 4141 of file QCommenceDB.cpp.

QCommenceFormControl * QCommenceForm::control ( QString  i_controlName  )  [slot]

Get a control from the form.

vbScript Example:

Definition at line 4330 of file QCommenceDB.cpp.

QCommenceDatabase * QCommenceForm::database ( void   )  [slot]

Return a pointer to the Database object.

This is a convenience function for gaining access to the application()->database() object pointer.

vbScript Example:

Definition at line 3266 of file QCommenceDB.cpp.

QCommenceDatabase * QCommenceForm::DB ( void   )  [slot]

Definition at line 3285 of file QCommenceDB.cpp.

bool QCommenceForm::deleteItem ( void   )  [slot]

Delete the Item.

This function executes a specially tailored delete type of method on this item. This is not just a regular item delete like what you get when you hit ctrl-D on a form or a view. This deletion function is designed to provide tracability and recoverability (as in 'undelete') on deleted items.

In order for this method to work properly several things have to be available to Dumont. First, the item has to have a varField where deletion info can be stored. The type of info that gets stored there is as follows:

 deletedOn=20071114074022           ' date and time of the deletion
 deletedBy=MWP:80011002:00223233    ' who requested the deletion

When an item is stamped in this fashion it can be easily filtered from various views by adding a "varField Does Not Contain deletedOn" type of filter. This gives the operator the illusion that the item has actually been deleted from his computer. The downside of this implementation is that it requires an extra filter be added to all your views and connections in order for them to appear proper to the user. Also, this requires that the user has write permissions on this particular item.

But, even if the user does not have write permissions over this particular item, in parallel with stamping the item with deletion info, a changeLog item is also generated for the deletion request. Note, I say request because once the server gets a hold of it, the server may decide this item shouldn't be deleted afterall - that implementation is left up to the system integrator (that's the *you* part of this relationship).

If the user does not have write permissions on the item, then no deletion stamping will be performed on it, and the item will remain in his views. However, a changeLog item will still be created and saved, and when the server picks up the changeLog deletion request and decides to delete the item anyway then eventually when the user syncs with the workgroup the item will disappear. This actually allows users to delete items they don't have write permissions on, and there is a trace-log of the deletion! Nice, eh?

Here is an actual example of a change log that was generated on an item deletion request.

example changeLog item:
 <!DOCTYPE changeLog>
 <changeLog version="3.8.98.3" formName="Docket General" action="Delete" categoryName="Calendar" >
    <itemName>Petryk.M/lit2</itemName>
    <logOn>20071114112236</logOn>
    <logBy>MWP:7:80006401:000026F7</logBy>
    <cmcID>nothing</cmcID>
    <guid>{55028c01-4b13-4718-9681-c8b832d55360}</guid>
    <field name="calendarVar" >
       <from>cmcID=nothing&#xd;
 guid={55028c01-4b13-4718-9681-c8b832d55360}&#xd;
 createdOn=20071114112228&#xd;
 createdBy=MWP:7:80006401:000026F7&#xd;
 changedOn=20071114112228&#xd;
 changedBy=MWP:7:80006401:000026F7&#xd;
 dragFrom=20071118080000&#xd;
 mdd=0001200711180020110000</from>
       <to>cmcID=nothing&#xd;
 guid={55028c01-4b13-4718-9681-c8b832d55360}&#xd;
 createdOn=20071114112228&#xd;
 createdBy=MWP:7:80006401:000026F7&#xd;
 changedOn=20071114112228&#xd;
 changedBy=MWP:7:80006401:000026F7&#xd;
 dragFrom=20071118080000&#xd;
 mdd=0001200711180020110000&#xd;
 deletedOn=20071114112236&#xd;
 deletedBy=MWP:7:80006401:000026F7</to>
    </field>
 </changeLog>
There is enough information in this change log item to be able to locate the originating source item and user that made the request for deletion.

None-the-less, varField or not, this function is designed to tag the item appropriately so that it may be deleted responsibly, by the server, or some other authorized administrator. And, if you set the server up properly then you can archive your items off in some sort of a historical storage for later retrieval if the users desire.

The second thing that is required for this 'service' to function properly is the guid() method within Dumont. This method must be functioning properly so that a unique guid for this item can be generated and made available to the rest of the system. Yes, I know its possible to build a system that does not require guid's, and you should be able to use this item deletion feature without them, but, frankly, the pitfalls of implementing such a system are great. For instance, say your category does not allow duplicates, but certainly allows changes. Now, someone wants an item deleted, and you are using the 'Name' field to track the item (since it's unique, right?). You delete the item, a log is created on the 'Name' field, and you're done. Meanwhile, on or about the same time, someone else changes the 'Name' value of this item. Their 'sync' packet makes it to the server first so it goes ahead and changes the item name. Then your packet comes in and requests the item be deleted, but it does it by 'Name' value, right? See the problem? The server can't delete the item or archive it or anything because it can't find it because the name has changed! Bottom line? Use the guid() feature of the Dumont project. It's easy and it will make your life happy, and you'll be rewarded with a new house and a nice car a wonderful spouse and a dog that actually listens to you. I have all these things and it's because I started using guid's on all my Commence items... really, really!

Keep in mind that all that is happening here is the item is being *tagged* for deletion. The actual item deletion occurs on the server where the entire process can be controlled.

Definition at line 3560 of file QCommenceDB.cpp.

void QCommenceForm::dumontTest ( QString  msg  )  [inline, slot]

Test Function.

This is a generic test function used for whatever purpose is required depending what's required. Right now it just sends a message to the debug window.

vbScript Example:
   dfrm.dumontTest "this is a test"

Definition at line 3654 of file QCommenceDB.h.

QCommenceField * QCommenceForm::field ( QString  i_fieldName  )  [slot]

Get a Field object by Name.

This method returns a field object from the form collection.

Note:
This object does *not* fail if an improper field name is provided. Rather, it returns an object that is missing its field-object pointer. The object that gets returned can be tested for validity using the isValid() function call.
vbScript Example:
 Sub FixFieldInfo()

   dim oFName: set oFName = dfrm.field("First Name")
   dim oLName: set oLName = dfrm.field("Last Name")
   dim oBName: set oBName = dfrm.field("Bad Field Name")

   if( oFName.isValid ) then msgbox "First Name is: " & oFName.value else msgbox "Bad Field Name"
   if( oLName.isValid ) then msgbox "Last Name is: "  & oLName.value else msgbox "Bad Field Name"
   if( oBName.isValid ) then msgbox "Bad Name is: "   & oFName.value else msgbox "Bad Field Name"

 End Sub

Definition at line 4006 of file QCommenceDB.cpp.

QString QCommenceForm::fieldName ( void   )  [slot]

Return the current field name.

Return the currently selected field name.

vbScript Example:
 Sub doInfoPage()
   select case dfrm.FieldName
     case "Customer No":  PrintDetails
     case "Ref ID":       AcquireInvoices
     case "Shipping":     ChargeOff
     case "Past Due":     Alert("This Customer Is Past Due")
   end select
 End Sub

Definition at line 3108 of file QCommenceDB.cpp.

QString QCommenceForm::fieldValue ( void   )  [slot]

Return the current field value.

This pass-through function returns the value of the currently selected field.

vbScript Example:

Definition at line 3474 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::fld ( QString  i_fieldName  )  [slot]

Definition at line 4001 of file QCommenceDB.cpp.

QCommenceAddRowSet * QCommenceForm::getChangeLogAddRowSet ( void   )  [slot]

Get the Change Log category Definition.

This is an internal function that will seek-out the change log category definition and verify it for compatibility. If the category definition looks good then a pointer to it is returned. If it does not look good then a message window is opened with a few details of the problem.

Definition at line 4471 of file QCommenceDB.cpp.

QString QCommenceForm::guid ( void   )  [slot]

Return the guid of this item.

This function returns the currently assigned guid of this item, or a new guid for this item if one does not exist yet. In order for this function to work properly, there must be a varField() defined for this category. If there is no varField() then this function returns the string value of "nothing".

If the varField() exists but no guid has been assigned, then this function will create a new guid value and cause it to be automatically stored in the varField(). The advantage of using this guid function over the cmcID() function is that this value can be generated immediately for new items before they are saved to the category, wheras the cmcID() value is only available after the item has been saved. Once a guid is generated for an item, because it is stored in the varField() it will remain static and unique for that particular item.

Alternatively, if you do not want to have the guid stored in a varField() type of field, you can define a field "guid Text(40)" (a 40-character text field called "guid") in the category and then the guid will be automatically stored there. This can have the advantage of using the guid field as the clarify field and creating an index for it and so on. The disadvantage of using a guid field as a clarify field is the guid field then shows up in the Tools|Global Search results and also shows up in some other places... and that may be undesirable.

Note:
One pecularity with this method of item identification is that it is all hapening 'outside' of the Commence database engine as a post-process. This means these methods are not without their pitfalls. One comes from the menu item "Edit | Copy Item". This menu option causes a new commence item to be created from an existing one, meaning all the contents of the var field are copied as well. This is potentially problemmatic because some of this 'item management' code depends on 'initial values' in this var field and other fields. Extra steps have been taken to insure that the cmcID() and guid() values are unique per item, but care should be taken by the database administrator to insure that things are working as expected. Especially when the var field is used to store other values outside the scope of the DumontDLL.
vbScript Example:
 msgbox dfrm.guid ' shows '{623316da-e9cc-4f42-a9fb-f2938920dcb5}'
See also:
cmcID

Definition at line 3348 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::guidField ( void   )  [slot]

Return the guid field.

The guid field is a special field defined in the category that can be used to store a guid of this item. It should be a text(40) field. It can be indexed and/or used as a clarify field to aid in the identification of items by ID. If this field exists in the category definition then the guid will *not* be stored in the varField() if it also exists.

See also:
guid, cmcIDField, varField

Definition at line 3140 of file QCommenceDB.cpp.

bool QCommenceForm::isAdd ( void   )  [slot]

Return true/false if this form is in Add Mode.

This pass-through function returns true/false if the form is in add mode.

vbScript Example:

Definition at line 3453 of file QCommenceDB.cpp.

bool QCommenceForm::isConnection ( QString  i_fieldName  )  [slot]

Check for Connection Name.

This returns TRUE when the FieldName provided is a connection field. This helps to identify an object as a connection when all we have is a field name as provided by the vbScript Form_onEnterField(FieldName) function.

vbScript Example:
 Sub Form_OnEnterField(ByVal FieldName)
   If( dfrm.isField(FieldName) ) then
     msgbox FieldName + " is a field"
   End If
   If( dfrm.isConnection(FieldName) ) then
     msgbox FieldName + " is a Connection"
   End If
 End Sub
See also:
isField

Definition at line 4452 of file QCommenceDB.cpp.

bool QCommenceForm::isDelete ( void   )  [slot]

Return true/false is the form is in Delete mode.

This function returns the delete flag on the form. The delete flag gets set when the deleteItem() function is called.

Definition at line 3461 of file QCommenceDB.cpp.

bool QCommenceForm::isDirty ( void   )  [slot]

Report if any field or connection on the form is dirty or not.

This function loops through all the fields and connections on the form and reports true if any of them have been changed from their original values.

vbScript Example:
 if( dfrm.isDirty ) then
   msgbox "the following changes are: " & dfrm.changeLog
 end if

Definition at line 3979 of file QCommenceDB.cpp.

bool QCommenceForm::isField ( QString  i_fieldName  )  [slot]

Check for Field Name.

This takes a field name as a parameter and returns 'true' if the field name equates to an actual field in the category. If the field name provided is a connection name, or is not listed then this function returns false.

vbScript Example:
 Sub Form_OnEnterField(ByVal FieldName)
   If( dfrm.isField(FieldName) ) then
     msgbox FieldName + " is a field"
   End If
   If( dfrm.isConnection(FieldName) ) then
     msgbox FieldName + " is a Connection"
   End If
 End Sub
See also:
isConnection

Definition at line 4458 of file QCommenceDB.cpp.

bool QCommenceForm::isPrevNext ( void   )  [slot]

Return true/false if the form is from a prev/next event.

This handy function returns true or false if the form is from a previous/next button event.

Definition at line 3469 of file QCommenceDB.cpp.

bool QCommenceForm::isShared ( void   )  [slot]

Return true/false if this item is shared.

This pass-through function returns true/false if the form item is currently shared.

vbScript Example:

Definition at line 3482 of file QCommenceDB.cpp.

QString QCommenceForm::itemClarify ( void   )  [slot]

Return the Item Clarify text value.

Definition at line 3087 of file QCommenceDB.cpp.

QString QCommenceForm::itemName ( void   )  [slot]

Return the Item Name text value.

String, name of the current item. May be empty when adding an item and the name field has not yet been entered.

vbScript Example:
   if( dfrm.ItemName = "Accounting Department" ) then
     msgbox "I was told there would be no math!"
   end if

Definition at line 3076 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::keyField ( void   )  [slot]

Return the keyField.

Every category has a key field. This is the same as the 'Name' field. This method provides direct access to this name field.

Note:
This FieldName value defaults to 'catnameKey' - see the definition in the source code for clarification.
vbScript Example
 Sub DoSomething()
   dim oKey: set oKey = dfrm.keyField
   oKey.Value = "this is a test"      ' set the name field to "this is a test"
 End Sub

Definition at line 3116 of file QCommenceDB.cpp.

QCommenceMeInfo * QCommenceForm::meInfo ( void   )  [slot]

Short-cut to MeInfo.

This is a convenience function for acquiring a pointer to the QCommenceMeInfo MeInfo object. It simply performs a DB()-> meInfo() call.

Definition at line 4955 of file QCommenceDB.cpp.

void QCommenceForm::moveToField ( QString  i_fieldName  )  [slot]

Move to the requested Field name.

This moves to a specific field within the form. This passes control to the Commence moveToField form method, but it then also includes an additional reference to the new field value so that the Dumont change-logging engine can function properly. Note that if you have implemented your own change log code on your forms in vbScript, you will not receive an Form_onEnter or Form_onLeave field event if you use a Form.MoveToField call in your code. If your vbScript code does not properly detect this field change condition it probably will not log the field changes properly.

vbScript Example:
 Sub Form_OnClick( ByVal ControlID )
   if( ControlID = "CommandButton1" )
     dfrm.moveToField "Account Number" ' change-log engine handled properly!
   end if
 End Sub
One simple solution to implementing a proper change-log function in vbScript, if that code is dependent on the onEnterField and onLeaveField events, is you can wrap the Form.moveToField function in another function as follows:

Wrapping change-log moveToField functions:
 Sub Move2Field( ByRef FieldName )
   Form.MoveToField FieldName
   Form_OnEnterField FieldName
 End Sub
Note that wrapping the moveToField function as shown above is not necessary with Dumont since Dumont makes the same (internal) call to its onEnterField function.

Definition at line 3765 of file QCommenceDB.cpp.

void QCommenceForm::moveToTab ( QString  i_tabName  )  [slot]

Move to the requested Tab name.

This changes the form's currently selected Tab

vbScript Example:

Definition at line 3718 of file QCommenceDB.cpp.

QMultiDateDialog * QCommenceForm::multiDateDialog ( const QString &  defaultDate = ""  )  [slot]

Return a new multi-date dialog.

This method returns a pointer to the form's multi-date dialog. If a multidate dialog has not been manufactured then one is created for return. If one has already been created then that same pointer is returned. This way only one multidate dialog object gets created per form.

Note:
vbScript should not call this function at this point because there seems to be some sort of interface probem when opening this dialog directly from vb. Instead vbScript should call multiDateDialogExec which will both create a new dialog if need be and exec() that dialog properly. Therefore, this method is published in the 'public' section of the Form but not in the 'public slots' section.

Definition at line 4391 of file QCommenceDB.cpp.

QString QCommenceForm::multiDateDialogExec ( const QString &  mddValue,
const QString &  defaultDate 
) [slot]

Multidate Dialog Returns the value immediately.

Exec the Multidate Dialog.

This will simply exec the multidate dialog and return the string value to the caller.

Definition at line 4436 of file QCommenceDB.cpp.

void QCommenceForm::multiDateDialogExec ( const QString &  defaultDate = ""  )  [slot]

Return a multi-date dialog.

Ideally this function should actually return the multi-date dialog itself so that the vbScript programmer can use it himself, but that's not working out so good at the moment. There is still some DumontDLL code required to be able to open a true modal-dialog from a vbScript request.

For the moment what this function does is perform the multiDateDialog stuff on the form directly - which works out anyhow.

vbScript Example:

Definition at line 4409 of file QCommenceDB.cpp.

QString QCommenceForm::name ( void   )  [slot]

Return the name of something.

This will return the name of this form as assigned in the Commence form designer.

vbScript Example:
   msgbox dfrm.name     ' shows "Initial Form" if the name hasn't been changed.

Definition at line 3042 of file QCommenceDB.cpp.

bool QCommenceForm::onActiveXControlEvent ( QString  i_controlID,
QString  i_eventName,
QString  i_parameterArray 
) [slot]

Fire Form_OnActiveXControlEvent event.

vbScript Example:
 Sub Form_OnActiveXControlEvnet(ByRef ControlID, ByRef EventName, ByRef ParameterArray)
   dfrm.onActiveXControlEvent ControlID, EventName, ParameterArray
 End Sub

Definition at line 4923 of file QCommenceDB.cpp.

bool QCommenceForm::onCancel ( void   )  [slot]

Fire Form_OnCancel event.

vbScript Example:
 Sub Form_OnCancel()
   dfrm.onCancel
 End Sub

Definition at line 4838 of file QCommenceDB.cpp.

bool QCommenceForm::onChange ( QString  i_controlID  )  [slot]

Fire Form_OnChange() event.

The Form_OnChange() event gets fired any time a control is changed, usually in response to the user typing some text in a control field.

vbScript Example:
 Sub Form_OnChange(ByRef ControlID)
   dfrm.onChange ControlID
 End Sub

Definition at line 4939 of file QCommenceDB.cpp.

bool QCommenceForm::onClick ( QString  i_controlID  )  [slot]

Fire Form_OnClick event.

vbScript Example:
 Sub Form_OnClick(ByRef ControlID)
   dfrm.onClick ControlID
 End Sub

Definition at line 4931 of file QCommenceDB.cpp.

bool QCommenceForm::onEnterControl ( QString  i_controlID  )  [slot]

Fire Form_OnEnterControl event.

vbScript Example:
 Sub Form_OnEnterControl(ByVal ControlID)
   dfrm.onEnterControl ControlID
 End Sub

Definition at line 4907 of file QCommenceDB.cpp.

bool QCommenceForm::onEnterField ( QString  i_fieldName  )  [slot]

Fire Form_OnEnterField event.

vbScript Example:
 Sub Form_OnEnterField(ByVal FieldName)
   dfrm.onEnterField FieldName
 End Sub

Reimplemented in QCommenceCalendarForm, and QCommenceDocketForm.

Definition at line 4878 of file QCommenceDB.cpp.

bool QCommenceForm::onEnterTab ( QString  i_tabName  )  [slot]

Fire Form_OnEnterTab event.

vbScript Example:
 Sub Form_OnEnterTab(ByVal FieldName)
   dfrm.onEnterTab FieldName
 End Sub

Definition at line 4861 of file QCommenceDB.cpp.

bool QCommenceForm::onKeyPress ( QString  i_controlID,
long  i_keyAscii 
) [slot]

Fire Form_OnKeyPress event.

Anytime any key is pressed in any Field or Control this event gets fired. This event does not get fired for Connection fields.

vbScript Example:
 Sub Form_OnKeyPress(ByRef ControlID, KeyAscii)
   dfrm.onKeyPress ControlID, KeyAscii
 End Sub

Definition at line 4947 of file QCommenceDB.cpp.

bool QCommenceForm::onLeaveControl ( QString  i_controlID  )  [slot]

Fire Form_OnLeaveControl event.

 Sub Form_OnLeaveControl(ByVal ControlID)
   dfrm.onLeaveControl ControlID
 End Sub

Definition at line 4915 of file QCommenceDB.cpp.

bool QCommenceForm::onLeaveField ( QString  i_fieldName  )  [slot]

Fire Form_OnLeaveField event.

vbScript Example:
 Sub Form_OnLeaveField(ByVal FieldName)
   dfrm.onLeaveField FieldName
 End Sub

Reimplemented in QCommenceCalendarForm, and QCommenceDocketForm.

Definition at line 4892 of file QCommenceDB.cpp.

bool QCommenceForm::onLeaveTab ( QString  i_tabName  )  [slot]

Fire Form_OnLeaveTab event.

vbScript Example:
 Sub Form_OnLeaveTab(ByVal FieldName)
   dfrm.onLeaveTab FieldName
 End Sub

Definition at line 4869 of file QCommenceDB.cpp.

bool QCommenceForm::onLoad ( void   )  [slot]

Fire Form_OnLoad event.

vbScript Example:
 Sub Form_OnLoad()
   dfrm.onLoad
 End Sub

Definition at line 4463 of file QCommenceDB.cpp.

bool QCommenceForm::onSave ( void   )  [slot]

Fire Form_OnSave event.

The DumontDLL onSave event includes a few procedures for automatically stamping items with change-log information and assigning guid's and THID's and whatnot. You should review the source to see what's going on here.

 Sub Form_OnSave()
   dfrm.onSave
 End Sub

Reimplemented in QCommenceCalendarForm, and QCommenceDocketForm.

Definition at line 4591 of file QCommenceDB.cpp.

void QCommenceForm::prevNext ( void   ) 

Perform the prevNext functions.

This internal function takes care of all the things that need to be taken care of if the prevNext buttons are used. For starters, it clears the fields of all their values. If the form is actually being closed, then clearing the fields is somewhat redundant. But, since we don't know if the form is actually being closed or if one of the prevNext keys was used we have to clear all the field values so that they pick up the proper values for the new item.

Then, this routine takes care of 'handling' the prevNext keys. There are quite a few manuvers that have to be taken to properly handle the prevNext keys, especially when multiple form types are in use. When multiple forms are in use then the current form really needs to be closed and a new one opened, on the same item. This is an exceptionally difficult thing to do.

Definition at line 4786 of file QCommenceDB.cpp.

void QCommenceForm::reopen ( void   )  [slot]

Perform reload function.

This method performs the automatic-form-reload function. It checks to see if the flag is set and if so applys a secretAgent to cause the form to be reloaded.

Definition at line 4790 of file QCommenceDB.cpp.

void QCommenceForm::resetFields ( void   ) 

Reset fields to their 'unknown' values.

This loops through all the fields and connections on the form and resets their values so that it appears as if the form was just loaded. This is used in conjunction with the prev/next functionality so that if the form is moved to another item, the fields and connections can accurately reflect their contents.

Definition at line 4806 of file QCommenceDB.cpp.

QCommenceRuntime * QCommenceForm::RT ( void   )  [slot]

Definition at line 4277 of file QCommenceDB.cpp.

QCommenceRuntime * QCommenceForm::runtime ( void   )  [slot]

Get the Form.Runtime object.

vbScript Example:

Definition at line 4282 of file QCommenceDB.cpp.

bool QCommenceForm::save ( void   )  [slot]

Cause the form to Save.

This executes the Save operation on the form.

vbScript Example:

Definition at line 3603 of file QCommenceDB.cpp.

void QCommenceForm::setReopen ( bool  state  )  [slot]

Definition at line 4772 of file QCommenceDB.cpp.

void QCommenceForm::setShared ( bool  i_state  )  [slot]

Set the shared flag on the form.

This sets and resets the form/item Shared value

vbScript Example
 Sub MakeItemShared()
   dfrm.setShared True
 End Sub

 Sub MakeItemUnshared()
   dfrm.setShared False
 End Sub

Definition at line 3506 of file QCommenceDB.cpp.

void QCommenceForm::setValue ( QString  i_value  )  [slot]

Set the value of the currently selected field.

This sets the value of the currently selected field. This, of course, assumes that the currently selected control is a Field controls and not a connection control.

vbScript Example:

Definition at line 3552 of file QCommenceDB.cpp.

QString QCommenceForm::tabName ( void   )  [slot]

Return the current Tab name.

Return the current Tab name.

vbScript Example:
 Sub HandlePage
   select case dfrm.TabName
     case "Main": doMainPage
     case "Info": doInfoPage
     case "Tank": doTankPage
   end select
 End Sub

Definition at line 3100 of file QCommenceDB.cpp.

QString QCommenceForm::toXml ( QString  i_fieldList  )  [slot]

Convert the form fields and connections and their values to an xml document.

This is a routine that will produce a very long string which is an xml-compliant representation of the form field and connection values. The xml output is, in essence, an export of this category item.

vbScript Example
 Sub Form_OnClick(ByVal ControlID)
   if( ControlID = "CommandButton1" ) then
     msgbox dfrm.toXml("*")
   end if
 End Sub
Sample Output
 <!DOCTYPE QCommenceForm>
 <item formName="Dumont" categoryName="Dumont" itemName="test" itemClarify="" >
    <field0 name="Name" >test</field0>
    <field1 name="Build" >5</field1>
    <field2 name="Data" ></field2>
    <field3 name="Description" ></field3>
    <field4 name="dumontVar" >guid={9027b2d3-4f52-4842-99f5-bc3499e9fd33}
 this is a test
 this is multi-line text.</field4>
    <field5 name="Parameters" ></field5>
    <field6 name="Result" ></field6>
    <field7 name="Run from Disk" >0</field7>
    <field8 name="Script" ></field8>
    <connection1 name="pRD->Employee" >
       <item1>
          <key>Ben</key>
          <clarify></clarify>
       </item1>
       <item2>
          <key>Claudia</key>
          <clarify></clarify>
       </item2>
       <item3>
          <key>Mark</key>
          <clarify></clarify>
       </item3>
       <item4>
          <key>Bryon</key>
          <clarify></clarify>
       </item4>
    </connection1>
    <connection2 name="pWR->Employee" >
       <item1>
          <key>Mark</key>
          <clarify></clarify>
       </item1>
    </connection2>
 </item>

Definition at line 3156 of file QCommenceDB.cpp.

void QCommenceForm::undo ( void   )  [slot]

Restore a form back to its original state.

This performs an 'undo' on all Fields and Connections. It loops through each field and each connection and calls their respective undo().

vbScript Example:

Definition at line 3965 of file QCommenceDB.cpp.

QCommenceField * QCommenceForm::varField ( void   )  [slot]

Return the varField.

The varField is a memo field that is designated as part of the 100-field-limit extension project. Typically the var field name is comprised from the category Name plus "Var". For instance, examples include; calendarVar, personVar, projectVar, matterVar... and so on.

vbScript Example
 Sub DoSomething()
   dim oVar: set oVar = dfrm.varField
   oVar.var("cmcID") = "12345"      ' set the cmcID element in var to "12345"
   oVar.var("dateOn") = now
 End Sub

Definition at line 3132 of file QCommenceDB.cpp.


Member Data Documentation

Definition at line 4972 of file QCommenceDB.h.

categoryDef pointer cache

Definition at line 4992 of file QCommenceDB.h.

QString QCommenceForm::m_categoryName [private]

Form.CategoryName cache Value.

Definition at line 4960 of file QCommenceDB.h.

database pointer cache

Definition at line 4986 of file QCommenceDB.h.

bool QCommenceForm::m_isDelete [private]

Definition at line 4974 of file QCommenceDB.h.

QString QCommenceForm::m_itemName [private]

Definition at line 4970 of file QCommenceDB.h.

multiDateDialog

Definition at line 4980 of file QCommenceDB.h.

QString QCommenceForm::m_name [private]

Form.Name cache Value.

Definition at line 4954 of file QCommenceDB.h.

bool QCommenceForm::m_prevNext [private]

Remember if onSave or onCancel was called.

Definition at line 4998 of file QCommenceDB.h.

bool QCommenceForm::m_reopen [private]

Flag to indicate that the form is to be reopened.

Definition at line 4968 of file QCommenceDB.h.


The documentation for this class was generated from the following files:




~ ~ ~ ~ ~ ~
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