Object oriented design question: classes with mulitiple functions or multiple classes?

William Tanksley wtanksle at dolphin.openprojects.net
Tue Mar 21 03:19:49 CET 2000


On Sat, 18 Mar 2000 19:17:44 -0800, Timothy Grant wrote:

>First off a confession, I have always been dreadful at object oriented
>design.

And I'm lousy at graphical design.  Pleased to meet you.

>I'm working on a new Tkinter application that needs to track some
>customer information. However there is *a lot* of information and it
>feels like the best method of presenting this large volume of
>information will be in a tabbed notebook. The notebook (Pmw.NoteBook),
>at present has five tabs with the possibility of more being added later.

In that case, it's time to seriously reconsider using tabs.  Tabs are fine
when there's only three or four logical ones, but when you don't even know
what you're going to have in the future they're pure poison.

The most general replacement for them is a tree control; however, tree
controls are hard to build and use, and if you can fit your choices neatly
into a list your users will be much happier.  There are some screenshots
of how to do it right and wrong at <URL
http://www.iarchitect.com/tabs.html>.

>My question is this: Am I better off creating initialization functions
>to initialize and control all of the widgets, or should I create a class
>for each page of the notebook and build my display using smaller class
>entities?

I suppose you're using Tkinter; I'm not familiar with that.  The toolkits
I know about use objects, not classes, and you HAVE to have one per page.

>[On a secondary note, are there any Tkinter widgets that will allow me
>to display notebook tabs on the bottom or side instead of the top?]

Before you do this, though, consider something else.  ANYTHING else.

>Chief Technology Officer              tjg at exceptionalminds.com
>Red Hat Certified Engineer            www.exceptionalminds.com

Cool.

-- 
-William "Billy" Tanksley



More information about the Python-list mailing list