Liam Clarke wrote:
Hi all,


I'm working on my first object-based-from-the-ground-up project, and I have some queries.

http://www.rafb.net/paste/results/lDUmWS78.html

Here are my two classes here. For each different function, search,
edit, view, etc. a different SQL operation will take place, and a
different child window will be returned to the main window.
Roughly speaking.

I was going to create a method for each of the different functions in
both class, but I was wondering if it would be better to subclass for
each function. I've never done this before, so it's a little
confusing.

Incidentally, is this

searchWin = genericChild

an OK way to create a class instance of genericChild? It seems to work
OK, and Pythoncard does funny things with __init__ for windows ( I
can't figure out how to pass __init__ arguments for example.)

But I'm worried that there's some unforeseen consequence of this kind
of thing, it just seems strange not finishing with ().

So yeah, should I do a method for each function, or subclass my generic classes?

Regards,

Liam Clarke

I didn't look at the rest of the code, but you want
searchWin = genericChild()
instead. (Do a print searchWin to see why ;-))

HTH,
Wolfram


_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Reply via email to