Package zope :: Package schema :: Module accessors
[show private | hide private]
[frames | no frames]

Module zope.schema.accessors

Field accessors

Accessors are used to model methods used to access data defined by fields. Accessors are fields that work by decorating existing fields.

To define accessors in an interface, use the accessors function:
 class IMyInterface(Interface):

    getFoo, setFoo = accessors(Text(title=u'Foo', ...))

    getBar, = accessors(TextLine(title=u'Foo', readonly=True, ...)

Normally a read accessor and a write accessor are defined. Only a read accessor is defined for read-only fields.

Read accessors function as access method specifications and as field specifications. Write accessors are solely method specifications.

$Id: accessors.py,v 1.2 2005/06/24 16:52:59 nyergler Exp $
Classes
FieldReadAccessor Field read accessor
FieldWriteAccessor  

Function Summary
  accessors(field)

Generated by Epydoc 2.1 on Fri Jun 24 12:01:24 2005 http://epydoc.sf.net