Update of /cvsroot/mahogany/M/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv10353/doc
Modified Files:
Manual.htex
Log Message:
mention spam.py example; brought up to date the section about callbacks/hooks
Index: Manual.htex
===================================================================
RCS file: /cvsroot/mahogany/M/doc/Manual.htex,v
retrieving revision 1.94
retrieving revision 1.95
diff -b -u -2 -r1.94 -r1.95
--- Manual.htex 16 Jan 2004 23:37:34 -0000 1.94
+++ Manual.htex 16 Jan 2004 23:51:24 -0000 1.95
@@ -2012,7 +2012,6 @@
Callbacks are python functions that can be called from different parts
-of Mahogany's code. See the Scripting and Extending chapter (\ref{Scripting})
-and the Hacker's guide (\ref{HackersGuide}) for more information
-on this.
+of Mahogany's code. See the section \ref{pythonhooks} for more information on
+this.
\begin{itemize}
@@ -2555,6 +2554,11 @@
filtered.
+Please have a look at \texttt{spam.py} example included in Mahogany
+distribution (in \texttt{Python} directory under Windows and in
+\texttt{/usr/share/mahogany/scripts} under Unix) to see a real life example of
+using Python for writing non trivial filters.
-\subsection{Callback Functions (Hooks)}
+
+\subsection{Callback Functions (Hooks)}\label{pythonhooks}
There are a number of callbacks available which will be called from
@@ -2563,14 +2567,9 @@
callbacks yet, but don't hesitate to ask us if you need more information
about this. All of these callbacks are called with at least one arguments
-which is a pointer to the object from which it was called. E.g. for
\texttt{FolderOpenHook},
-this would be a pointer to a \texttt{MailFolder} object. This object
-does not carry a useable type with it and needs to be converted in
-the callback, e.g. if the argument is called \texttt{arg} and the
-object is a \texttt{MailFolder}, the object must either be used as
-\texttt{MailFolder.MailFolderPtr(arg)} or be converted as
-\texttt{mf = MailFolder.MailFolderPtr(arg)}.
+which is a pointer to the object from which it was called. E.g. for
+\texttt{FolderOpenHook}, this would be a \texttt{MailFolder} object.
-Some callbacks have a third argument. This is either a single value
-or a tuple holding several values.
+The callback return value is usually a boolean and indicates whether Mahogany
+should proceed normally ($1$) or cancel the operation ($0$).
\subsection{Namespaces}
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates