Pythoncard - Mistake in walkthrough?

D

Deltones

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
 
I

It's me

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

Deltones

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

Hi,

I understand, but the walkthrough I'm doing comes from the doc folder
of the latest windows package. I thought that the walkthrough were
updated to fit the newest version. Thanks though.

Denis
 
I

It's me

No, those are old still.


Deltones said:
<snipped for brevity>

Hi,

I understand, but the walkthrough I'm doing comes from the doc folder
of the latest windows package. I thought that the walkthrough were
updated to fit the newest version. Thanks though.

Denis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top