[Tutor] Trying to Learn OOP via Boa Constructor

Tom Churm churmtom@hotmail.com
Sun Jan 19 08:58:02 2003


familiar story: guy starts learning python, finds it pretty easy.
guy starts learning gui programming in python.
guy discovers that it's--finally!--time to learn OOP..which is, uh, suddenly
not so easy.

since i'm impatient, i started experimenting with Boa Constructor (perhaps a
bad idea so early, i know). now i've hit a roadblock, which i know has an
easy solution.  i just have to modify my initialization function--
main( ) --below to get the thing to run:

#############################
#!/usr/bin/env python
#Boa:PyApp:main

modules ={'wxDialog1': [0, '', 'wxDialog1.py'], 'wxFrame1': [0, '',
'wxFrame1.py']}

def main():
    pass


if __name__ == '__main__':
    main()
#############################

if my main frame-creation function in wxFrame1.py looks like this, how do i
replace the 'pass' statement above to call this function, thus creating the
main frame in wxPython?

#############################
def create(parent):
    return wxFrame1(parent)
    ...
#############################

i know i have to replace 'pass' in the first code snippet with something
like:
create(?)

but what parameter do i feed this function with for 'parent' (ie: the
question mark above)?

thanks for the help!

--tom