473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Pythoncard - Mistake in walkthrough?

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
Jul 18 '05 #1
3 1635
As stated in the on-line WalkThrough, the information there was written for
an older version of the program.
"Deltones" <vi*******@hotmail.com> wrote in message
news:e0**************************@posting.google.c om...
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

Jul 18 '05 #2
> 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
Jul 18 '05 #3
No, those are old still.
"Deltones" <vi*******@hotmail.com> wrote in message
news:e0**************************@posting.google.c om...
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

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Adrian Smith | last post by:
I am using pythoncard 0.7.2 for windows. I am trying to use the same code for a large number of buttons so started out by using def on_mouseDown(self,event): but then I need to display the...
0
by: PipedreamerGrey | last post by:
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is...
2
by: PipedreamerGrey | last post by:
I'm trying to create a standalone version (.exe) of PythonCard's Custdb sample using Py2Exe version 0.5.0. Everytime I attempt to compile the program, I get an error during compilation. This is...
24
by: John Henry | last post by:
For serveral years, I have been looking for a way to migrate away from desktop GUI/client-server programming onto the browser based network computing model of programming. Unfortunately, up until...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.