[Zope] method map?

Ben Avery ben@thesite.org.uk
Thu, 13 Jun 2002 15:51:05 +0100


Hi all,

I'm (still :) trying to create a generic form validator, which has certain
types of tests built in (not blank, valid email, valid date, numeric), and
which accepts metadata from hidden form inputs - which inputs must match
which criteria, so the form describes itself to the handler. This bit is
fine.
But what I'd also like is to be able to tell it is which methods to call if
it fails and passes the checks. Obviously I wouldn't try to accept a form
argument and just run it. But what I would like is some way of implementing
a safe point-to-point map, i.e. from this method it is safe to go to these
ones, and then calling that method by using its name read from, e.g. a
property sheet. Like a reference in Perl (if I'm allowed to say that here ;)
How would the python syntax work to call something by reference like this?

____________
Ben Avery
YouthNet UK