From 2a1c6d6fbcb60c44d8690add635260faf243dcd6 Mon Sep 17 00:00:00 2001 From: mike Date: Sun, 26 Apr 2009 21:42:20 +0000 Subject: (LP 352437) Core : Completed basic serializer interactions with core (actions, event filters) - needs tests Also, merged branch 'mike' into jc_support Conflicts: source/external/source/sugar-toolkit/src/sugar/tutorius/actions.py source/external/source/sugar-toolkit/src/sugar/tutorius/bundler.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/run-tests.py source/external/source/sugar-toolkit/src/sugar/tutorius/tests/serializertests.py --- (limited to 'src/sugar/tutorius/properties.py') diff --git a/src/sugar/tutorius/properties.py b/src/sugar/tutorius/properties.py index 5be7e1c..a0bfa03 100644 --- a/src/sugar/tutorius/properties.py +++ b/src/sugar/tutorius/properties.py @@ -87,7 +87,7 @@ class TIntProperty(TutoriusProperty): class TFloatProperty(TutoriusProperty): """ - Represents a floting point number. Can have an upper value limit and/or + Represents a floating point number. Can have an upper value limit and/or a lower value limit. """ def __init__(self, value, lower_limit=None, upper_limit=None): @@ -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): @@ -185,7 +185,7 @@ class TEnumProperty(TutoriusProperty): class TBooleanProperty(TutoriusProperty): """ - Represents a True of False value. + Represents a True or False value. """ def __init__(self, value=False): TutoriusProperty.__init__(self) -- cgit v0.9.1