Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-evas/evas


Modified Files:
        evas.c_evas_object_smart.pxi 


Log Message:
Forbid instantiate ClippedSmartObject directly, also help to detect cases where 
user should call parent's constructor but instantiated it instead (punch 
kenneth)

===================================================================
RCS file: 
/cvs/e/e17/proto/python-efl/python-evas/evas/evas.c_evas_object_smart.pxi,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas.c_evas_object_smart.pxi        1 Oct 2007 04:31:38 -0000       1.18
+++ evas.c_evas_object_smart.pxi        2 Oct 2007 19:44:16 -0000       1.19
@@ -544,6 +544,9 @@
        mess with it.
     """
     def __init__(self, Canvas canvas not None, **kargs):
+        if type(self) is ClippedSmartObject:
+            raise TypeError("Must not instantiate ClippedSmartObject, but "
+                            "subclasses")
         SmartObject.__init__(self, canvas, **kargs)
         if self.clipper is None:
             self.clipper = Rectangle(canvas)



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to