From 0cad6dc96afc2ebd4d03beb14ed01bc155dfa322 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 06 Apr 2009 02:38:10 +0000 Subject: LP 348570 Core : Extending actions with the new properties, adding min / max size to arrays --- (limited to 'src/sugar/tutorius/properties.py') diff --git a/src/sugar/tutorius/properties.py b/src/sugar/tutorius/properties.py index 5be7e1c..cd12f90 100644 --- a/src/sugar/tutorius/properties.py +++ b/src/sugar/tutorius/properties.py @@ -106,7 +106,7 @@ class TStringProperty(TutoriusProperty): def __init__(self, value, size_limit=None): TutoriusProperty.__init__(self) self._type = "string" - self.size_limit = SizeConstraint(size_limit) + self.size_limit = MaxSizeConstraint(size_limit) self.set(value) @@ -115,11 +115,11 @@ class TArrayProperty(TutoriusProperty): Represents an array of properties. Can have a maximum number of element limit, but there are no constraints on the content of the array. """ - def __init__(self, value, size_limit=None): + def __init__(self, value, min_size_limit=None, max_size_limit=None): TutoriusProperty.__init__(self) self._type = "array" - self.size_limit = SizeConstraint(size_limit) - + self.max_size_limit = MaxSizeConstraint(max_size_limit) + self.min_size_limit = MinSizeConstraint(min_size_limit) self.set(value) class TColorProperty(TutoriusProperty): -- cgit v0.9.1