Syntax for computed object-property string

Post

Posted
Rating:
#1 (In Topic #1315)
Regular
chrisRoald is in the usergroup ‘Regular’
 Hi, is there a Gambas syntax for specifying a computed object-property string?

In other object languages a syntax like:  objectName[propertyVariable] = "xyz" is used, eg:

dim propertyVariable as string
propertyVariable = "background"
myWindow[propertyVariable] = 12345678

Can I do something similar in Gambas?
Thanks,
C.
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
you probably want Object.SetProperty() /comp/gb/object - Gambas Documentation

Object.SetProperty(myWindow, "PropertyName", Value)
Online now: No Back to the top
1 guest and 0 members have just viewed this.