General information
Category:
Coding, syntax & commands
>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?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only