[Checkins] SVN: grok/trunk/doc/reference/functions.tex Described
grok.notify() and grok.getSite()
Jan-Wijbrand Kolman
jw at infrae.com
Mon Jun 4 04:10:21 EDT 2007
Log message for revision 76282:
Described grok.notify() and grok.getSite()
Changed:
U grok/trunk/doc/reference/functions.tex
-=-
Modified: grok/trunk/doc/reference/functions.tex
===================================================================
--- grok/trunk/doc/reference/functions.tex 2007-06-04 07:57:34 UTC (rev 76281)
+++ grok/trunk/doc/reference/functions.tex 2007-06-04 08:10:18 UTC (rev 76282)
@@ -5,14 +5,54 @@
\section{\function{grok.getSite}}
- \begin{funcdesc}{grok.getSite}{*args}
- foobar
+ \begin{funcdesc}{grok.getSite}{}
+ Get the current site object.
+
+ \begin{seealso}
+ Site object are instance of \class{grok.Site} and/or
+ \class{grok.Application}.
+ \end{seealso}
+
+ \begin{seealso}
+ \seetitle
+ [http://worldcookery.com/WhereToBuy]
+ {Web Component Development With Zope 3, second edition}
+ {By Philiip von Weitershaussen; Chapter 18 describes the use of Site
+ objects.}
+ \end{seealso}
+
\end{funcdesc}
\section{\function{grok.notify}}
- \begin{funcdesc}{grok.notify}{*args}
- foobar
+ \begin{funcdesc}{grok.notify}{event}
+ Send \var{event} to event subscribers.
+
+ Example:
+\begin{verbatim}
+import grok
+
+class Mammoth(object):
+ def __init__(self, name):
+ self.name = name
+
+manfred = Mammoth('manfred')
+
+grok.notify(grok.ObjectCreatedEvent(manfred))
+\end{verbatim}
+
+ \begin{seealso}
+ Grok events provide a selection of common event types.
+ \end{seealso}
+
+ \begin{seealso}
+ \seetitle
+ [http://worldcookery.com/WhereToBuy]
+ {Web Component Development With Zope 3, second edition}
+ {By Philiip von Weitershaussen; Chapter 16 describes the Zope 3 event
+ system.}
+ \end{seealso}
+
\end{funcdesc}
\section{\function{grok.url}}
@@ -25,8 +65,8 @@
This function returns the constructed URL as a string.
- \begin{seealso}
+ \begin{seealso}
View classes derived from \class{grok.View} have a similar \method{url}
method for constructing URLs.
- \end{seealso}
+ \end{seealso}
\end{funcdesc}
More information about the Checkins
mailing list