BBjSysGui::bufferWrites

Description

Causes all writes to the SysGui device to be buffered until the flushWrites() method is called.

Syntax

Return Value

Method

void

bufferWrites()

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.