Category : Dbase (Clipper, FoxBase, etc) Languages Source Code
Archive   : NN0505.ZIP
Filename : DSDEMO.PRG
Output of file : DSDEMO.PRG contained in archive : NN0505.ZIP
DSDEMO.PRG
This Clipper program-file demonstrates how to use
pseudo-objects
<< Danny Sukdeo (c) 1991 for Danny's Solveware >>
*********************************************************************/
#include "DsClass.ch"
LOCAL nPercentage := 0, FuelBar1 := {}, FuelBar2 := {}
// Define NewFuelGauge
CLASS: NewFuelGauge
INSTANCE VAR: Top := 20
INSTANCE VAR: Left := 10
INSTANCE VAR: Title := ""
INSTANCE VAR: ColorBar := "W/N"
INSTANCE VAR: ColorWnd := "N/W"
INSTANCE VAR: SaveBuf := ""
METHOD: CreateFuelGauge()
METHOD: UpdateFuelGauge(nPercent)
METHOD: CloseFuelGauge()
ENDCLASS: NewFuelGauge
// Create two instances from class NewFuelGauge
CREATE OBJECT FuelBar1 FROM NewFuelGauge
CREATE OBJECT FuelBar2 FROM NewFuelGauge
// Change some instance variables
SEND FuelBar1:Top := 18
SEND FuelBar1:Left := 10
SEND FuelBar1:Title := "FuelGauge 1"
// Call method to create FuelGauge number 1
SEND FuelBar1:CreateFuelGauge()
// Change some instance variables
SEND FuelBar2:Top := 8
SEND FuelBar2:Left := 20
SEND FuelBar2:Title := "FuelGauge 2"
// Call method to create FuelGauge number 2
SEND FuelBar2:CreateFuelGauge()
// Multiple 'FuelGauging'
DO WHILE nPercentage <= 100
SEND FuelBar1:UpdateFuelGauge(nPercentage)
SEND FuelBar2:UpdateFuelGauge(nPercentage)
nPercentage += 5
ENDDO
// Wait a sec
WAIT
// Close FuelGauge number 1
SEND FuelBar1:CloseFuelGauge()
// Wait a sec
WAIT
// close FuelGauge number 2
SEND FuelBar2:CloseFuelGauge()
QUIT
// EOF: DsDemo.prg
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/