BBjControl::setUserData

Description

In BBj 3.01 and higher, this method associates an Object with the BBjControl.

Syntax

ReturnValue

Method

void

setUserData(Object userData)

Parameters

Variable

Description

userData

Specifies the data to be associated with the BBjControl.

Return Value

None.

Remarks

None.

Example

open(unt)"X0"
sysGui! = BBjAPI().getSysGui()
window! = sysGui!.addWindow(101,100,100,300,300,"test window")
aButton! = window!.addButton(102,50,100,80,20,"A Button")
bButton! = window!.addButton(103,150,100,80,20,"B Button")
hashMap! = new java.util.HashMap()
hashMap!.put(1,"abc")
hashMap!.put(22,"xyz")
x = 25
window!.setUserData(hashMap!)
aButton!.setUserData(x)
print window!.getUserData()
print aButton!.getUserData()
print bButton!.getUserData()

See Also

BBjAPI

BBjWindow Methods

Object Variables

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