Multiple ExtensionClass

Joel Lucsy jjlucsy at concentric.net
Tue Feb 22 10:25:29 EST 2000


I've figured it myself (just takes time). Basically I use the
PURE_MIXIN_CLASS macro in ExtensionClass. Since the result is an
uninstantionable I wrapped a Python class around them. I'll be releasing the
end result to the public when I'm finished. I'm basically rewriting the
pyFLTK toolkit by hand instead of using swig.

"Joel Lucsy" <jjlucsy at concentric.net> wrote in message
news:CCXq4.651$yT3.43993 at news1.usenetserver.com...
> Ok, I've whipped up two ExtensionClass classes (stirred, not shaken) and
am
> trying to figure out how one can be a "subclass" of the other. I'll
> illustrate what I want (in python for brevity):
>
> class A:
>   def func1():
>     pass
> class B(A):
>   def func2():
>     pass
>
> Now I'd like to be able to do:
> a=B()
> a.func1()
>
> So far I haven't figured out how to do this without duplicating the
methods.
> Should I be messing with the method tables, or somehow manipulating the
> dictionaries, or something completely different? I've tried making python
> wrappers, but it complains about multiple bases or something. Basically it
> wont let me derive from two different ExtensionClasses's. Either that or
I'm
> missing something.
> Any clues would be great. Thanks.
>
> --
>  - Joel Lucsy (jjlucsy at concentric.net)
>
>
>
>
>







More information about the Python-list mailing list