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.