Table of Contents

Class: EnumerationField qm/fields.py

A field that contains an enumeral value.

The enumeral value is selected from an enumerated set of values. An enumeral field uses the following properties:

enumeration
A mapping from enumeral names to enumeral values. Names are converted to strings, and values are stored as integers.
ordered
If non-zero, the enumerals are presented to the user ordered by value.
Base Classes   
ChoiceField
Methods   
GetHelp
GetItems
GetValueFromDomNode
MakeDomNodeForValue
__init__
  GetHelp 
GetHelp ( self )

  GetItems 
GetItems ( self )

Return a sequence of enumerals.

returns
A sequence consisting of string enumerals objects, in the appropriate order.
  GetValueFromDomNode 
GetValueFromDomNode (
        self,
        node,
        attachment_store,
        )

Exceptions   
qm.QMException, qm.error( "dom wrong tag for field", name = self.GetName(), right_tag = "enumeral", wrong_tag = node.tagName )
  MakeDomNodeForValue 
MakeDomNodeForValue (
        self,
        value,
        document,
        )

  __init__ 
__init__ (
        self,
        name,
        default_value=None,
        enumerals=[],
        **properties,
        )

Create an enumeration field.

enumerals
A sequence of strings of available enumerals.
default_value
The default value for this enumeration. If None, the first enumeral is used.

Table of Contents

This document was automatically generated on Mon Jan 3 09:42:29 2005 by HappyDoc version 2.1