Author: jmorliaguet
Date: Fri May 19 23:23:03 2006
New Revision: 3164

Modified:
   cpsskins/branches/paris-sprint-2006/setup/README.txt
   cpsskins/branches/paris-sprint-2006/standard/fields/color.py

Log:

- renamed the 'color' field as 'rgb' to avoid a conflict with the node's name



Modified: cpsskins/branches/paris-sprint-2006/setup/README.txt
==============================================================================
--- cpsskins/branches/paris-sprint-2006/setup/README.txt        (original)
+++ cpsskins/branches/paris-sprint-2006/setup/README.txt        Fri May 19 
23:23:03 2006
@@ -762,7 +762,7 @@
     <?xml version="1.0" encoding="utf-8"?>
     <colors>
       <color id="...">
-        <color value="0, 0, 255"/>
+        <rgb value="0, 0, 255"/>
       </color>
     </colors>
     <BLANKLINE>

Modified: cpsskins/branches/paris-sprint-2006/standard/fields/color.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/standard/fields/color.py        
(original)
+++ cpsskins/branches/paris-sprint-2006/standard/fields/color.py        Fri May 
19 23:23:03 2006
@@ -28,16 +28,16 @@
 class IColor(IField):
     """A web color."""
 
-    color = Tuple(
+    rgb = Tuple(
         title=u"RGB triplet.",
         value_type=Int(title=u"Color component"),
         )
 
-    def hex():
+    def toHex():
         """HEX representation: #fcfcfc
         """
 
-    def rgb():
+    def toRgb():
         """RBG representation: rgb(123, 255, 200)
         """
 
@@ -47,14 +47,14 @@
     implements(IColor)
 
     def __init__(self, r=0, g=0, b=0):
-        self.color = r, g, b
+        self.rgb = r, g, b
 
     def __str__(self):
-        return self.hex()
+        return self.toHex()
 
-    def hex(self):
-        return "#%0.2x%0.2x%0.2x" % self.color
+    def toHex(self):
+        return "#%0.2x%0.2x%0.2x" % self.rgb
 
-    def rgb(self):
-        return "rgb(%s,%s,%s)" % self.color
+    def toRgb(self):
+        return "rgb(%s,%s,%s)" % self.rgb
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to