akatie / tower-of-psych

Automatically exported from code.google.com/p/tower-of-psych
0 stars 0 forks source link

topsModalList as superclass #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It seems clear that topsModalList can back topsDataLog as well as
topsFunctionLoop, as a superclass.  All three classes share the concepts of
mode, mnemonic, and precedence.  So factor this out!

This might introduce some method name collision, such as time value vs.
precedence.  But this seems like a small cost, and resolvable with a
generic term like "order" or something.

This would allow any of these to be explorable with the topsModalListGUI,
when that comes into being!  This would free the dataLogGUI and
functionLoop GUI to focus on subclass behaviors, such as the online viewing
of events for the data log.

Original issue reported on code.google.com by Benjamin.Heasly on 16 Oct 2009 at 6:19

GoogleCodeExporter commented 9 years ago
I also redesigned modal list and renamed it topsGroupedList.  It uses a
containers.Map to make groups with string OR numeric identifiers.  Similarly, 
each
group uses string OR numeric mnemonics.

This will support generic lists as well as data logging and sorted function 
looping.
 The method names are pretty generic.  Subclasses may implement additional methods
with more descriptive names, even if they're essentially wrappers around the 
generic
superclass methods.

Original comment by Benjamin.Heasly on 19 Oct 2009 at 7:21

GoogleCodeExporter commented 9 years ago
I deleted the old modal list class and replaced all the function calls I could 
find
to work with the new grouped list class.

Original comment by Benjamin.Heasly on 20 Oct 2009 at 7:07