[Kde-bindings] Qt bindings to D programming language.

Arno Rehn arno at arnorehn.de
Sun Oct 26 22:02:42 UTC 2008


On Sunday 26 October 2008 22:54:38 Eldar Insafutdinov wrote:
> Okey. I also found this page -
> http://lists.kde.org/?l=kde-bindings&m=105167029023219&w=2 - it's a bit
> outdated, but the mechanism seems to be the same. It is said there
>
> >>This class will mainly implement 2 methods:
> >>
> >>   - callMethod(Smoke::Index method, void *obj, Smoke::Stack args, bool
> >> isAbstract = false)
> >>
> >>   - deleted(Smoke::Index classId, void *obj)
> >>
> >>The former is called whenever a virtual method is called by Qt
>
> I can't understand how could you catch the virtual methods call in Qt? This
> is the only thing that I can't figure out. Do you modify vtable for that?
No, every Qt class that's wrapped in Smoke is subclassed and all the virtual 
methods are overridden. These overridden methods then call 
SmokeBinding::callMethod() from where you can forward it to your bindings 
class.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list