Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to populate combo box with array
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00651529
Message ID:
00651671
Views:
16
Charles,

>If he gets rid of that array and uses a cursor instead this solution immediately removes the problem of the array going out of scope as well as creating an additional property on the form to store the array ... no?

I'd rather not have a cursor floating around to support the cbo, I'd rather encapsulate that all inside the cbo itself. That's why I added aList[] as a property to my lowest level cComboBox class. I find the array just easier to work with than the hoops you have to jump through to use the Add* methods, because my cbos almost always bind to an integer field, but display text values from a lookup table.

I only suggested the thisform array because that would not require Kahn creating a cbo subclass to test the code out. A for array is just as bad as a cursor though in terms of encapsulation.

>Last time I met you was in Richmond, VA almost a decade ago ... how's things goin'?

Things are going great. I moved down here to Texas a little over three years ago.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform