PRB: Conflict Between SET REFRESH and BROWSE TIMEOUT

ID: Q141144

2.60a MACINTOSH kbprg kbprb

The information in this article applies to:

SYMPTOMS

With the line "BROWSE TIMEOUT 5 " the Browse window should time out after five seconds if there is no user input, but it doesn't time out.

NOTE: The TIMEOUT parameter used with the BROWSE command will only work when code is being run outside of the command window, for example in a .prg file.

CAUSE

The SET REFRESH command is refreshing the Browse window before the timeout occurs. The Browse considers the Refresh as user input therefore a timeout never occurs.

RESOLUTION

Instead of the SET REFRESH command, use field validation on the browse to refresh the Browse window. For example, create and run this program:

   BROWSE FIELDS field1:v=myvalid() TIMEOUT 5 title "Mytitle"

   FUNCTION MYVALID
      FLUSH
      SHOW WINDOW MYTITLE REFRESH
      RETURN .T.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Type the following commands in the Command window:

   SET REFRESH TO 4,4
   BROWSE TIMEOUT 5

Additional reference words: 2.60a FoxMac KBCategory: kbprg kbprb KBSubcategory: FxprgBrowse
Keywords          : FxprgBrowse 
Version           : 2.60a
Platform          : MACINTOSH

Last Reviewed: May 17, 1996