Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Files into combo box
Message
From
15/05/2000 23:37:54
 
 
To
15/05/2000 16:13:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00369254
Message ID:
00369840
Views:
23
>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
Map
View

Click here to load this message in the networking platform