FX User Feedback Implementation (TMM)

 
Visual FoxPro 9.0 SP2
This topic supplies information about a new-in-SP2 FFC VFP Reporting System extension class.
Back to TMM Index
GeneralAbout this class

fxTherm
provides the same user feedback capabilities as UpdateListener.  In addition to its implementation of the  ApplyFX method required by the FX subsystem API, fxTherm exposes UpdateListener's full set of public properties and methods.  You can refer to the descriptions in the UpdateListener help topic for each of them:

  • includeSeconds Property
  • initStatusText Property
  • prepassStatusText Property
  • reportStartRunDatetime Property
  • reportStopRunDatetime Property
  • runStatusText Property
  • secondsText Property
  • thermCaption Property
  • thermFormCaption Property
  • thermFormHeight Property
  • thermFormWidth Property
  • thermMargin Property
  • thermPrecision Property new in SP2 -- see the UpdateListener TMM entry. Note that the default value for this class is 2, rather than 0, as it is in UpdateListener.

fxTherm is a form-derived class. Because it acts as a delegate for certain aspects of reportlistener processing, fxTherm adds the following public properties and methods, which implement the user feedback interface of a reportlistener:
  • clearStatus Method
  • doStatus Method
  • updateStatus Method

fxTherm adds one public property specific to its own needs: persistBetweenRuns (with a default value of .F.). While UpdateListener can be called upon to display its feedback window at any time, fxTherm ordinarily cannot.  If you set this property .T., the feedback form will continue to exist between runs and fxTherm attempts to maintain its form's end-of-run contents after the run of report. However, this attempt may be unsuccessful and the behavior may have undesirable side effects: the fxTherm form  may potentially show up on the automatic _MWINDOW list if  persistBetweenRuns is turned on. 

FXListener wraps the two public properties of fxTherm and UpdateListener that are most significant between runs: reportStartRunDateTime and reportStopRunDateTime.  You can reliably refer to FXListener's copy of these values between runs without needing to turn persistBetweenRuns on.

ExampleExample
The following code is very similar to the TMM UpdateListener example.
 
ox = NEWOBJECT("fxTherm", "_reportListener.vcx")
oy = NEWOBJECT("fxListener","_reportListener.vcx")

? oy.FXS.count && listener doesn't have any FX objects yet,
               && we can safely add one without worrying
               && about removing any previous feedback object
oy.FXS.Add(ox)
ox.thermPrecision = 5
ox.thermFormCaption = "My Test Caption"
ox.persistBetweenRuns = .T. && so we can check it afterwards

REPORT FORM ? OBJECT oy

ox.Show()  && can use FORM api
WAIT TIMEOUT 10
ox.ClearStatus() &&  can use REPORTLISTENER api

? ox.reportStartRunDateTime, ox.reportStopRunDateTime && fx
? oy.reportStartRunDateTime, oy.reportStopRunDateTime && listener
            

See AlsoSee Also