Information générale
Catégorie:
Codage, syntaxe et commandes
>I have used adir() and haven't got it to work. I put the code adir(wksetlist,"*.mem) in the load event of the form and then set the comboboxes rowsource to wksetlist and the rowsourcetype to 5 - Array. When I load the form I get an error that wksetlist is not an array. What am I doing wrong?
2 possiblites, you don't close your *.mem with another ", eg:
adir(wksetlist, "*.mem")
More importantly, if you create an array variable in teh Load() event, it will go out of scope after Load() is finished, which is when your control wants to use it. So you can either make the array PUBLIC before you create it (yuck! Publics are never good) or oyu can create a property to hold it.
*The combo boxes Init()
This.AddProperty('aItems[1]')
=adir(This.aItems, "*.mem")
This.RowSourceType = 5
This.RowSource = 'This.aItems'
Doeas that help?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement