General information
Title:
Hook for many items: array or something else?
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
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