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.