Back to index

plone3  3.1.7
Public Member Functions
wicked.fieldevent.meta.NewLineTokens Class Reference

List of all members.

Public Member Functions

def fromUnicode

Detailed Description

token field that splits on newline not space 

Definition at line 18 of file meta.py.


Member Function Documentation

Definition at line 21 of file meta.py.

00021 
00022     def fromUnicode(self, u):
00023         u = u.strip()
00024         if u:
00025             vt = self.value_type.bind(self.context)
00026             values = []
00027             for s in u.split('\\n'):
00028                 try:
00029                     v = vt.fromUnicode(s)
00030                 except zope.schema.ValidationError, v:
00031                     raise fields.InvalidToken("%s in %s" % (v, u))
00032                 else:
00033                     values.append(v)
00034         else:
00035             values = []
00036 
00037         self.validate(values)
00038         return values
00039 

Here is the call graph for this function:


The documentation for this class was generated from the following file: