I am trying to build a simple framework that is going to use "events" to
callback into higher level logic. Specifically, I am creating a "Text
Field" that represents an HTML form field. Its validate() method needs to
call whatever method is specified in its validateHandler property (which
is a string).

My validate() method is a PythonMethod. Before I can call the event
handler, I need to get ahold of the method object. I have tried all of
the following and gotten nothing but KeyErrors/AttributeErrors:

  getattr(self, self.validationHandler)

It is important to note that the method I am looking for, the one named by
the string property, is not defined in the field class itself. I need to
rely on acquisition to find it; it is defined in one of the containers of
the field object.

I know this has to be simple; I must be missing something.

Anyone care to share some clue?


Jeff K. Hoffman                               704.849.0731 x108
Chief Technology Officer                      mailto:[EMAIL PROTECTED]
Going Virtual, L.L.C.                         http://www.goingv.com/

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to