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
Miscellaneous
Thread ID:
00221415
Message ID:
00221492
Views:
16
>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?

I used to use a table to store the information about our tables...

Then I SCANned through it and did the REINDEXing as needed. This seems to me to be the best way.

Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View

Click here to load this message in the networking platform