summaryrefslogtreecommitdiffstats
path: root/Tools/idle/extend.txt
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-04-20 17:32:52 (GMT)
committerGuido van Rossum <guido@python.org>1999-04-20 17:32:52 (GMT)
commit79d4398c30ab25bfca5056185c2571d32a4e06a1 (patch)
treebb245b75034ad938585d009320b8d2415f2821dd /Tools/idle/extend.txt
parenta670d0c97b0ba803408ec82a275046ace5a1e39f (diff)
downloadcpython-79d4398c30ab25bfca5056185c2571d32a4e06a1.zip
cpython-79d4398c30ab25bfca5056185c2571d32a4e06a1.tar.gz
cpython-79d4398c30ab25bfca5056185c2571d32a4e06a1.tar.bz2
For an event 'foo-bar', the corresponding method must be called
foo_bar_event(). Therefore, fix the references to zoom_height() in the example.
Diffstat (limited to 'Tools/idle/extend.txt')
-rw-r--r--Tools/idle/extend.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/idle/extend.txt b/Tools/idle/extend.txt
index aaf1381..bcc2da9 100644
--- a/Tools/idle/extend.txt
+++ b/Tools/idle/extend.txt
@@ -28,7 +28,7 @@ variables:
The extension class must not bind key events. Rather, it must define
one or more virtual events, e.g. <<zoom-height>>, and corresponding
-methods, e.g. zoom_height(), and have one or more class (or instance)
+methods, e.g. zoom_height_event(), and have one or more class (or instance)
variables that define mappings between virtual events and key sequences,
e.g. <Alt-F2>. When the extension is loaded, these key sequences will
be bound to the corresponding virtual events, and the virtual events
@@ -83,7 +83,7 @@ class ZoomHeight:
def __init__(self, editwin):
self.editwin = editwin
- def zoom_height(self, event):
+ def zoom_height_event(self, event):
"...Do what you want here..."
The final piece of the puzzle is the file "extend.py", which contains a