Generic "addarraylist" problem.

dan kabestan

Member
Licensed User
The name-variable seems to be forbidden for it.
As its written in help, runtime control manipulation overview,
Control keyword - Allows us to access controls using their names as a string.
So with Button exemple, no probem :
'
man = "blue"
AddButton ("Form1", man, 20, 20, 25, 80, "Click Me!")
Control(man).Color = cRed '-- run right
'
'So with the array list it doesnt work :
secret = "hello"
AddArrayList(secret) '-- < Right for compiler >
Control(secret).add(1) '--- generates an error "unknown control type..."
'
'and/or more
Control("hello").add(1) '--- generates same error "unknown control type..."
'
Its a real problem to make some generic arrays.
Where is my mistake ? Thanks for help.
 
Top