BBjSysGui::flushWrites


In BBj 5.0 and higher, this method is a NOOP.

Description

The BBjSysGui is automatically optimized to limit network traffic. Prior to BBj 5.0, the methods executes all writes that have occurred on the SysGui device since the bufferWrites() method was called.

Syntax

Return Value

Method

void

flushWrites()

Parameters

None.

Return Value

None.

Remarks

None.

Example

REM Use the methods bufferWrites/flushWrites of the BBjSysGui object


REM Obtain the instance of the BBjAPI object
LET myAPI!=BBjAPI()

REM Open the SysGui device
SYSGUI=UNT
OPEN (SYSGUI) "X0"

REM Obtain the instance of the BBjSysGui object
LET mySysGui!=myAPI!.getSysGui()

REM Set the window attributes
X=10
Y=10
WIDTH=200
HEIGHT=200
TITLE$="BBjWindow Example"
FLAGS$=$00000000$
EVENT_MASK$=$02000000$

REM Get the next availabe context
CONTEXT=NUM(mySysGui!.getAvailableContext())

REM Start buffering all writes to the SysGui device
mySysGui!.bufferWrites()

REM Set the context
mySysGui!.setContext(CONTEXT)

REM Create a window
PRINT (SYSGUI)'WINDOW'(X,Y,WIDTH,HEIGHT,TITLE$,FLAGS$,EVENT_MASK$)

REM Set the buttons attributes
BUTTON_ID=101
X=15
Y=15
WIDTH=60
HEIGHT=20
TITLE$="Push Me"
FLAGS$=$00000000$

REM Create a button
PRINT (SYSGUI)'BUTTON'(BUTTON_ID,X,Y,WIDTH,HEIGHT,TITLE$,FLAGS$)

REM Flush all buffered writes to the SysGui device
mySysGui!.flushWrites()

See Also

BBjAPI

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.