Author: Tobias Schlitt
Date: 2007-03-29 13:52:13 +0200 (Thu, 29 Mar 2007)
New Revision: 4782

Log:
- Updated the design doc according to discussion with FH.
# The method naming is now the same as in QtValidator.

Modified:
   trunk/ConsoleTools/design/design-1.3.txt

Modified: trunk/ConsoleTools/design/design-1.3.txt
===================================================================
--- trunk/ConsoleTools/design/design-1.3.txt    2007-03-29 11:02:46 UTC (rev 
4781)
+++ trunk/ConsoleTools/design/design-1.3.txt    2007-03-29 11:52:13 UTC (rev 
4782)
@@ -158,14 +158,17 @@
   The signature of the constructor is left to the validator implementation to
   retrieve settings (e.g. the valid results).
 validate( mixed $result )
-  This method is responsible for validating a given result.
-  The dialog will submit the result it received to this method which will
-  indicate if the result was valid by a boolean value.
-manipulate( mixed $result )
-  If a result was checked to be valid, this method will be used to perform any
-  manipulation on the object that might be supported by the validator. The
-  method will return the manipulated value and throw an exception, if the
-  result was not valid.
+  This method is responsible for validating a given result.  The dialog will
+  submit the result it received to this method which will indicate if the
+  result was valid by a boolean value. To manipulate / fix a retreived result,
+  the dialog implementation can call the fixup() method.
+fixup( mixed $result )
+  A validator can try to fix a given result to be valid. This manipulation can
+  be ommited by simply returning the result again. An example for a fixup would
+  be to convert a date information into a Unix timestamp using strtotime(). The
+  validate method would then expect an integer value > 0. The dialog
+  implementation is responsible for calling fixup() as it thinks is appropriate
+  (e.g. always before calling validate(), only if validate() fails, never).
 
 Dialog implementations
 ======================

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to