Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hook for many items: array or something else?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Hook for many items: array or something else?
Miscellaneous
Thread ID:
00221415
Message ID:
00221415
Views:
46
I'm making a class that will do table maintenance: PACK, RECALL, REINDEX or whatever. The class should perform these commands on a list of tables provided in each instance of the class. That list could in theory be long. My idea is to give the class an array property aTables() which would be DIMEMSION (1) in the class definition. Then, in a typical instance of this class, I would put this sort of code in the class::Init

DIMENSION THIS.aTables(10)
THIS.aTables(1) = 'sometable'
THIS.aTables(2) = 'othertable'

...

THIS.aTables(10)= 'lasttable'

That is what I did last time I had a class that worked this way. But I can't help but wonder if there isn't some way that is more elegant. Is this the way people usually hook lists to their classes?
Next
Reply
Map
View

Click here to load this message in the networking platform