BBjSysGui::getLastEventString

Description

Returns the event string from the last event that was generated (for use with the CALLBACK verb).

Syntax

Return Value

Method

byte[]

getLastEventString()

Parameters

None.

Return Value

Returns the event string from the last event that was generated.

Remarks

This is identical to the value returned from read record when read record event handling is used.

Methods that return byte[] can usually be treated as if they returned string, because BBj automatically handles the conversion. However, when that byte[] value is directly assigned to an object variable or passed to a Java method, BBj skips the conversion and the raw internal byte[] format is used. You can always use the STR() function to explicitly convert the byte[] value to a string.

Example

rem ' BBjSysGui::getLastEventString

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(25,25,300,100,"getLastEventString",$00090083$)
window!.setCallback(window!.ON_CLOSE,"eoj")
button! = window!.addButton(1,25,25,250,50,"OK",$$)
button!.setCallback(button!.ON_BUTTON_PUSH,"button_push")

process_events

button_push:
    dim event$:tmpl(sysgui)
    let event$ = sysgui!.getLastEventString()
    msg$ = hta(event$) + $0a$
    msg$ = msg$ + " context=" + str(event.context)
    msg$ = msg$ + " id=" + str(event.id)
    msg$ = msg$ + " code=" + event.code$
    msg$ = msg$ + " flags=" + str(event.flags)
    msg$ = msg$ + " x=" + str(event.x)
    msg$ = msg$ + " y=" + str(event.y)
    x = msgbox(msg$,0,"getLastEventString")
return

eoj:
release

See Also

BBjAPI

BBjWindow

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