Re: Still having problems with Mx.Widget subclassing






On Sat, Feb 9, 2013 at 1:39 PM, Lionel Landwerlin <llandwerlin gmail com> wrote:
On 09/02/13 20:39, Nox Deleo wrote:
Thanks for the clarification. I did wonder about chaining up before when I looked over the C code for other Mx widgets, but I couldn't get it to work.

super(Mx.Widget, self).paint()
RuntimeError: maximum recursion depth exceeded

Weird, it works in gjs. On the other hand I know nothing about python and the way it uses introspection.

Calling "paint" would just call the public clutter_actor_paint API which would in turn call your vfunc again. You might try:

def do_paint(self):
    Mx.Widget.do_paint(self)
 
I assume gjs would require something similar but prefixed with "vfunc" ?

-Simon



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]