File "C:\PYTHON22\Lib\site-packages\peak\binding\once.py", line 151, in usageError |
File "C:\PYTHON22\Lib\site-packages\peak\binding\once.py", line 151, in usageError |
raise TypeError( |
raise TypeError( |
TypeError: <peak.binding.once.Once object at 0x01491EE0> was used in a type which |
TypeError: <peak.binding.once.Once object at 0x01491EE0> was used in a type which |
does not support ActiveDescriptors, but a valid attribute name was not |
does not support active bindings, but a valid attribute name was not |
supplied |
supplied |
\end{verbatim} |
\end{verbatim} |
|
|
are some circumstances where PEAK will try to guess the attribute name for you, |
are some circumstances where PEAK will try to guess the attribute name for you, |
such as when you use a class or a function to define an attribute binding, but |
such as when you use a class or a function to define an attribute binding, but |
for the most part you must either have a base class (such as |
for the most part you must either have a base class (such as |
\class{binding.Base}) whose metaclass derives from |
\class{binding.Base}) whose metaclass supports activating bindings, or else |
\class{binding.ActiveDescriptors}, or else you must supply the attribute name |
you must supply the attribute name yourself when defining the binding. |
yourself when defining the binding. |
|
|
|
So, if you plan to use attribute bindings in your program, it's probably best |
So, if you plan to use attribute bindings in your program, it's probably best |
to subclass \class{binding.Base}; it'll save you a lot of typing! |
to subclass \class{binding.Base}; it'll save you a lot of typing! |
|
|
|
|
|
|
|
|
\newpage |
\newpage |
|
|
\subsubsection{\class{binding.Once} - The Basis for all Bindings} |
\subsubsection{\class{binding.Once} - The Basis for all Bindings} |
\item[\var{name}] \hfill \\ |
\item[\var{name}] \hfill \\ |
The \var{name} parameter specifies the attribute name that the binding will |
The \var{name} parameter specifies the attribute name that the binding will |
have. As mentioned previously, this is only needed when the binding is being |
have. As mentioned previously, this is only needed when the binding is being |
used in a class that doesn't support \class{ActiveDescriptors}. If you're using |
used in a class that doesn't support active descriptors. If you're using |
a class that inherits from \class{binding.Base}, you don't need to supply this |
a class that inherits from \class{binding.Base}, you don't need to supply this |
parameter. |
parameter. |
|
|