home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 25.9. A replacement for b:refreshAll() which
- keeps the current row highlighted.
- Author: Craig Yellick
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- function dbRefresh(browse)
- /*
- A replacement for b:refreshAll() that will keep the
- current row highlighted, used primarily when you've
- moved the record pointer via SEEK or GOTO such that
- the record is still on the screen. If the entire screen
- has to be redrawn with new data, this function will
- have no net effect beyond the actual b:refreshAll()
- and won't cause any delays.
- */
-
- // Remember where we ended up.
- local rec := recno()
-
- // Perform the initial stabilizing process.
- browse:refreshAll()
- do while .not. browse:stabilize() ; enddo
-
- // Most of the time this will be false,
- // so no work will be done.
- do while recno() <> rec
- browse:up()
- // Need to stabilize again.
- do while .not. browse:stabilize() ; enddo
- enddo
-
- return nil
-
- // end of file CHP2509.PRG
-