[Tutor] creating tables
shendric@arches.uga.edu
shendric@arches.uga.edu
Fri, 7 Jun 2002 10:27:41 -0500
Hi all,
Thanks for the help with exit handling and what not. Here's another
application that I'm playing with. I'd like to have a widget that is a
little editable table. It has a fixed number of columns, but can have
as many rows as the user wishes. I came up with a class for a table
row, but I'm trying to decide on the best implementation for creating
new rows, when the user wants to create a new one.
There has been so much discussion on dynamically creating classes, so I
hate to bring it up again, but it's kind of crucial here, I think, and
I'm still trying to get a handle on the details. In essence, the idea
here is that when a user requests (by an event), a new row is created in
the table. I'd like for each new class to be uniquely identified,
because the program will need to eventually export the contents of the
cells to a file. So, it would need to iterate over each instance and
export that instance's contents. Also, the user might want to remove a
row, in which case, the instance would need to be removed.
Sounds like a list, to me. So, I guess the question is: can I create a
list of class instances, adding a new instance every time the user
requests, where the reference can be removed when the instance is
destroyed?
Sorry if this sounds a bit cryptic, and a bunch of questions packed into
one, but if anyone's got any ideas for any part of it, they would be
very welcome. Also, if there's already a module to handle such a table,
that would be cool, too.
Sean