Set Talk, Set("Talk"), Sys(103), Set Odometer, Set("Odometer")

These commands control the display of messages from various record-processing commands.

Usage

SET TALK ON | OFF
SET TALK WINDOW [ WindowName ] | NOWINDOW
cOnOrOff = SET( "TALK" )
cNoWindow = SET( "TALK", 1 )
cOnOrOff = SYS( 103 )
SET ODOMETER TO [ nRecords ]
nRecords = SET( "ODOMETER" )
A whole bunch of commands that can process bunches of records (like REPLACE, DELETE, COUNT, and so forth) provide feedback by showing how many records they've processed. When you're working interactively, this feedback is a big help. In applications, it can provide a very basic kind of "user pacifier." However, other feedback (like the record number a LOCATE lands on) is never welcome in an application. All of this output is controlled by SET TALK. Normally, you'll turn it OFF in an application, though you might turn it on briefly to keep the user from rebooting while performing a long process. (Of course, an attractive progress bar is a much better choice and there are plenty of ActiveX progress bars to choose from.)

The second form of SET TALK specifies where the feedback appears. By default, it appears in the Windows-style status bar. If you use WINDOW and specify a defined window, it works as long as you remember to ACTIVATE the window. The other two forms, though, SET TALK WINDOW and SET TALK NOWINDOW, only make sense if you turn off the Windows-style status bar. Then, WINDOW puts the talk in a WAIT WINDOW and NOWINDOW sends it to the main FoxPro window.


When TALK is on, if you're dealing with enough records and your machine is slow or you watch carefully, you can see the number of records processed accumulating. By default, FoxPro counts by hundreds. SET ODOMETER controls that setting. Set it to a higher number and there's less frequent output; set it lower and you get updated more often. In Windows, where screen updates are much slower than record processing, it pays to set ODOMETER as high as you can stand it, if you're going to keep TALK on. SET ODOMETER TO without a number resets it to the default.

Example

SET ODOMETER TO 500
SET TALK ON

See Also

Set, Set Notify, Set Status Bar


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .