diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-03 11:25:13 +0000 |
commit | 458120dd40db6b4df55a4e96b650e16798ef06a0 (patch) | |
tree | 8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/mac/libminiae.tex | |
parent | 3a742c699f6806c1145aea5149bf15de15a0afd7 (diff) |
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/mac/libminiae.tex')
-rw-r--r-- | sys/src/cmd/python/Doc/mac/libminiae.tex | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/mac/libminiae.tex b/sys/src/cmd/python/Doc/mac/libminiae.tex new file mode 100644 index 000000000..9d815f098 --- /dev/null +++ b/sys/src/cmd/python/Doc/mac/libminiae.tex @@ -0,0 +1,65 @@ +\section{\module{MiniAEFrame} --- + Open Scripting Architecture server support} + +\declaremodule{standard}{MiniAEFrame} + \platform{Mac} +\modulesynopsis{Support to act as an Open Scripting Architecture (OSA) server +(``Apple Events'').} + + +The module \module{MiniAEFrame} provides a framework for an application +that can function as an Open Scripting Architecture +\index{Open Scripting Architecture} +(OSA) server, i.e. receive and process +AppleEvents\index{AppleEvents}. It can be used in conjunction with +\refmodule{FrameWork}\refstmodindex{FrameWork} or standalone. As an +example, it is used in \program{PythonCGISlave}. + + +The \module{MiniAEFrame} module defines the following classes: + + +\begin{classdesc}{AEServer}{} +A class that handles AppleEvent dispatch. Your application should +subclass this class together with either +\class{MiniApplication} or +\class{FrameWork.Application}. Your \method{__init__()} method should +call the \method{__init__()} method for both classes. +\end{classdesc} + +\begin{classdesc}{MiniApplication}{} +A class that is more or less compatible with +\class{FrameWork.Application} but with less functionality. Its +event loop supports the apple menu, command-dot and AppleEvents; other +events are passed on to the Python interpreter and/or Sioux. +Useful if your application wants to use \class{AEServer} but does not +provide its own windows, etc. +\end{classdesc} + + +\subsection{AEServer Objects \label{aeserver-objects}} + +\begin{methoddesc}[AEServer]{installaehandler}{classe, type, callback} +Installs an AppleEvent handler. \var{classe} and \var{type} are the +four-character OSA Class and Type designators, \code{'****'} wildcards +are allowed. When a matching AppleEvent is received the parameters are +decoded and your callback is invoked. +\end{methoddesc} + +\begin{methoddesc}[AEServer]{callback}{_object, **kwargs} +Your callback is called with the OSA Direct Object as first positional +parameter. The other parameters are passed as keyword arguments, with +the 4-character designator as name. Three extra keyword parameters are +passed: \code{_class} and \code{_type} are the Class and Type +designators and \code{_attributes} is a dictionary with the AppleEvent +attributes. + +The return value of your method is packed with +\function{aetools.packevent()} and sent as reply. +\end{methoddesc} + +Note that there are some serious problems with the current +design. AppleEvents which have non-identifier 4-character designators +for arguments are not implementable, and it is not possible to return +an error to the originator. This will be addressed in a future +release. |