QCommenceActiveViewInfo Class Reference

The Commence Active View Info object. More...

#include <QCommenceDB.h>

Inheritance diagram for QCommenceActiveViewInfo:

Inheritance graph

List of all members.

Public Slots

QString string (void)
 Return the entire ActiveViewInfo string.
QString viewName (void)
 Return the View Name component.
QString viewType (void)
 Return the View Type component.
QString categoryName (void)
 Return the category Name component.
QString itemName (void)
 Return the Item Name component.
QString fieldName (void)
 Return the Field Name component.

Public Member Functions

 QCommenceActiveViewInfo (void)
 QCommenceActiveViewInfo (const QCommenceActiveViewInfo &copy)
 QCommenceActiveViewInfo (QCommenceDatabase *i_parent)
virtual ~QCommenceActiveViewInfo ()
QCommenceDatabaseDB (void)
QStringList infoList (void)

Private Attributes

QString m_viewInfo
 ViewInfo string cache.
QStringList m_infoList
 ViewInfo stringlist cache.


Detailed Description

The Commence Active View Info object.

inline_dotgraph_2.dot

This object contains the information from the [GetActiveViewInfo()] DDE call. The advantage to using this object is that all of the elements of the call are automatically broken up into their constituant parts for easy access.

Further, using this object is easy because it hides the errors that you'll get when making that call under various conditions. For instance, if you make this call during a time when a detail form was opened from a script or an agent call or something like that, it will fail completely with a vbScript error message. This object will shield you from those error conditions and simply return an empty object.

vbScript Example:
  dim avi: set avi = dfrm.DB.activeViewInfo
  ddll.debug "viewName     " & avi.viewName
  ddll.debug "viewType     " & avi.viewType
  ddll.debug "categoryName " & avi.categoryName
  ddll.debug "itemName     " & avi.itemName
  ddll.debug "fieldName    " & avi.fieldName
Will Yeild the Following:
 ' when called from a form connection field
 DumontDLL:qDebug: viewName     
 DumontDLL:qDebug: viewType     Add Item
 DumontDLL:qDebug: categoryName Contacts
 DumontDLL:qDebug: itemName     Alamo Title Company
 DumontDLL:qDebug: fieldName    Employs Contacts
 
 ' when called from a report
 DumontDLL:qDebug: viewName     ~contacts
 DumontDLL:qDebug: viewType     Report
 DumontDLL:qDebug: categoryName Contacts
 DumontDLL:qDebug: itemName     Alamo Title Company
 DumontDLL:qDebug: fieldName    
There are a couple of things to note about this very interesting DDE call into the Commence api.

So, none the less, this element of the Commence API is a strange animal. Hopefully this object will make working with it a little bit easier.

Definition at line 336 of file QCommenceDB.h.


Constructor & Destructor Documentation

QCommenceActiveViewInfo::QCommenceActiveViewInfo ( void   )  [inline]

Definition at line 343 of file QCommenceDB.h.

QCommenceActiveViewInfo::QCommenceActiveViewInfo ( const QCommenceActiveViewInfo copy  )  [inline]

Definition at line 348 of file QCommenceDB.h.

QCommenceActiveViewInfo::QCommenceActiveViewInfo ( QCommenceDatabase i_parent  )  [inline]

Definition at line 353 of file QCommenceDB.h.

virtual QCommenceActiveViewInfo::~QCommenceActiveViewInfo (  )  [inline, virtual]

Definition at line 361 of file QCommenceDB.h.


Member Function Documentation

QString QCommenceActiveViewInfo::categoryName ( void   )  [slot]

Return the category Name component.

This returns the active view Category name.

Definition at line 441 of file QCommenceDB.cpp.

QCommenceDatabase* QCommenceActiveViewInfo::DB ( void   )  [inline]

Definition at line 367 of file QCommenceDB.h.

QString QCommenceActiveViewInfo::fieldName ( void   )  [slot]

Return the Field Name component.

This returns the active view Field name. This value appears to only be valid when this call is made on a detail form that was opened from another detail form's connection control.

Definition at line 457 of file QCommenceDB.cpp.

QStringList QCommenceActiveViewInfo::infoList ( void   ) 

Definition at line 418 of file QCommenceDB.cpp.

QString QCommenceActiveViewInfo::itemName ( void   )  [slot]

Return the Item Name component.

This returns the active view Item Name.

Definition at line 449 of file QCommenceDB.cpp.

QString QCommenceActiveViewInfo::string ( void   )  [slot]

Return the entire ActiveViewInfo string.

This returns the entire ViewInfo of the getActiveViewInfo DDE call. This is the same as the raw-string return value provided by that DDE call. If the call fails then the value will be a single line of "Request Failed".

vbScript Example:
 dim avi: set avi = dfrm.DB.activeViewInfo
 msgbox avi.string

Definition at line 411 of file QCommenceDB.cpp.

QString QCommenceActiveViewInfo::viewName ( void   )  [slot]

Return the View Name component.

This returns the ViewName component of the call to getActiveViewInfo. This component appears to only be valid when the getActiveViewInfo is called from a view such as a report or a book or something like that.

Definition at line 425 of file QCommenceDB.cpp.

QString QCommenceActiveViewInfo::viewType ( void   )  [slot]

Return the View Type component.

This returns the ViewType component of the call to getActiveViewInfo. This component appears to only be valid when the getActiveViewInfo is called from a view such as a report or book or something like that. If this call is made on a detail form that was opened from another detail form's connection control, then this value appears to always be set to "Add Item", regardless if the originating form was in add mode or not.

Definition at line 433 of file QCommenceDB.cpp.


Member Data Documentation

QStringList QCommenceActiveViewInfo::m_infoList [private]

ViewInfo stringlist cache.

Definition at line 451 of file QCommenceDB.h.

ViewInfo string cache.

Definition at line 445 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