Pythoncard - Mistake in walkthrough?

It's me itsme at yahoo.com
Wed Feb 23 15:09:59 EST 2005


As stated in the on-line WalkThrough, the information there was written for
an older version of the program.


"Deltones" <vibroverb at hotmail.com> wrote in message
news:e0f0f902.0502230849.3441e26a at posting.google.com...
> Hi all,
>
> I'm just getting into Python/wxPython/Pythoncard and I'm trying the
> tutorial from this page:
> http://pythoncard.sourceforge.net/walkthrough1.html
>
> Is it me who's totally dense or there's some sort of confusion with
> this tutorial?
>
> Here's what is said in the tutorial:
>
> Open the file starter1.py in your Python-aware editor of choice. The
> Python script is, as you'd expect, brief and to the point. Here's the
> important part to focus on:
>
> def on_menuFileExit_select(self, event):
>     pass
>
>
> But here's the starter1.py code:
>
> #!/usr/bin/python
>
> from PythonCard import model
>
> class Minimal(model.Background):
>     pass
>
> if __name__ == '__main__':
>     app = model.Application(Minimal)
>     app.MainLoop()
>
>
> As you can see, the on_menu line is not in the starter1.py original
> script, so I guessed that it should be a part of the Minimal class.
>
> Then the tutorial ask me to replace the on_menu "pass" line with:
>
> result = dialog.alertDialog(self, 'It works!', 'Showing Off')
>
> but when you run the script, it runs, but clicking on Exit does not
> display any dialog box. I did change the import line to include
> dialog.
>
> Is there something I'm not seeing here or there is really a mistake
> with the walkthrough?
>
> Thanks
>
> Denis





More information about the Python-list mailing list