qbd software ltd [UK]
moth > qbd software
qWatch Visual Basic Debug Watch style Variable class
Version: 1.0.0
Date: 25 Apr 2001
Page: 10 Dec 2001
 
Links
Moth
 
Download
qWatch [8k]
 
Contact
Mail Moth

Introduction

qWatch is a small class module that acts in a similar way to the debug watch in Visual Basic.  It can be used like a variable and events can be raised depending on whether the value changes or matches a set condition.

There is a test project group that demonstrates some of the features of this class.

To set up a variable make a declaration at the start of a module:

Private WithEvents qvTest As qcWatch

qvTest will appear in the Object combo box of the code window.  Initialise the variable using:

Set qvTest = New qcWatch

The default property is 'Value' so:

qvTest = True

Is the same as:

qvTest.Value = True

qWatch Properties
Condition [R/W] Sets the condition for how events are handled when a value is passed to the class.  See Condition information below.
Match [R/W] The value that the class value is compared against in conjunction with the qualifier.  If the match value is passed when the qualifier is already set, the class value will be compared with the new value
Qualifier [R/W] The comparison operator (=, <, >, <=, >=) as an enum that is used to compare the class value against the match value.
Value [R/W] [Default] The class value.  If new value meets the condition or matches the match and qualifier criteria the events are fired.
ValueNoEvent [W] Changes the class value without firing any events.
qWatch Conditions
qreNone No events raised
qreChanged 'Change' event raised only if new value is different
qreAll 'Change' event raised every time value is referenced
qreMatchOnly 'Change' event not raised
qreSuspendChange No event raised until 'Condition' is changed.  When the 'Condition' is changed the value is compared against the value held when the condition was set to 'suspend change' and events are fired depending on new 'condition'
qreSuspendMatch No event raised.  Once a value is passed that meets the match criteria the value is suspended and further values passed to the class are ignored
qWatch Events
ValueChange Raised when the class value changes depending on the value of 'condition'
ValueMatch

Raised when the class value meets the criteria set by 'match', 'qualifier' and 'condition'

 

©2001-2004 qbd software ltd