Skip to content

Commit ff83a52

Browse files
committed
Fix issue bruderstein#148 docs intro.rst: invalid FILESAVING notification vs valid FILEBEFORESAVE
1 parent 28269bb commit ff83a52

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/source/intro.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ You can unregister the callback later, either by using the name of the function,
113113
A simple example
114114
----------------
115115

116-
Let's register a callback for the FILESAVING event - the occurs just before the file is saved,
116+
Let's register a callback for the FILEBEFORESAVE event - the occurs just before the file is saved,
117117
and we'll add a "saved on" log entry to the end of the file, if the filename ends in '.log'.::
118118

119119
import datetime
@@ -132,7 +132,7 @@ Line 4 checks that the extension of the file is '.log'.
132132

133133
Line 5 appends text like ``"File saved on 2009-07-15"`` to the file.
134134

135-
Line 7 registers the callback function for the FILESAVING event. Notice the square brackets around the ``NOTIFICATION.FILESAVING``. This is a list, and can contain more than one item (so that the function is called when any of the events are triggered).
135+
Line 7 registers the callback function for the FILEBEFORESAVE event. Notice the square brackets around the ``NOTIFICATION.FILEBEFORESAVE``. This is a list, and can contain more than one item (so that the function is called when any of the events are triggered).
136136

137137
Really, we should improve this function a little. Currently, it assumes the file being saved is the active document - in the case of using "Save All", it isn't necessarily. However, it's easy to fix...
138138

@@ -182,7 +182,7 @@ The simplest form is::
182182

183183
This unregisters all callbacks for all events. If you want to just clear one or more events, just pass the list of :class:`NOTIFICATION` events you wish to clear.::
184184

185-
notepad.clearCallbacks([NOTIFICATION.FILESAVING, NOTIFICATION.FILESAVED])
185+
notepad.clearCallbacks([NOTIFICATION.FILEBEFORESAVE, NOTIFICATION.FILESAVED])
186186

187187
*Note that if you want to clear the callback for just one event, you still need to pass a list (i.e. surrounded with square brackets)*
188188

@@ -191,7 +191,7 @@ To unregister a callback for a particular function, just pass the function.::
191191
notepad.clearCallbacks(addSaveStamp)
192192

193193

194-
To unregister a callback for a particular function, for particular events (perhaps you want to keep the function registered for FILESAVING, but don't want FILESAVED anymore)
194+
To unregister a callback for a particular function, for particular events (perhaps you want to keep the function registered for FILEBEFORESAVE, but don't want FILESAVED anymore)
195195

196196
notepad.clearCallbacks(addSaveStamp, [NOTIFICATION.FILESAVED])
197197

0 commit comments

Comments
 (0)