[Gambas-user] refer to an object with a string
Jean-Yves F. Barbier
12ukwn at ...626...
Sun Aug 16 18:02:28 CEST 2009
Hi list,
I'm trying to refer to come couples Label/CheckBox that have the same suffix
(lbl_ONE & ckb_ONE) to enable/disable couple in one shot.
But after building my strings that are orders, GB tell me its not an object:
PUBLIC SUB lblckb_on_off(which AS String, on AS Boolean)
DIM lbl AS String
DIM ckb AS String
lbl = "lbl_" & which & ".Enabled = "
ckb = "ckb_" & which & ".Enabled = "
IF onoff THEN ' ON
lbl &= "TRUE"
ckb &= "TRUE"
(SOMETHING TO "EXEC" THE STRING)lbl (or may be: (SOMETHING)lbl = TRUE)
(SOMETHING TO "EXEC" THE STRING)ckb
ENDIF
END
Is there a way to do that?
--
tear leather:
To become excited, as in the sentence "Robin Hood tore
his leather jerkin' off."
More information about the User
mailing list