On 6/8/06, Darwin Slattery <[EMAIL PROTECTED]> wrote:
> Thanks for your reply. I think I'm just missing something small here. From
> your suggestions it seems that what I'm trying to do is completely possible
> in the .i file. Just to clarify one point in your last mail, I'm not looking
> to declare a class within another class declaration - I just want to write
> bindings for classes that have been declared in mulit-level namespaces like
> nsa::nsb::nsc.

It was a very small fix, but in a few different places. In order to
make it work you have to use the fully qualified namespace for both
the %class and the constructor.

The output will be nsa_nsb_MyClass which is reasonable enough, right?
It's too much trouble to try to make nested lua "namespaces" like
wx.nsa.nsb.MyClass.

%class %delete %noclassinfo %encapsulate nsa::nsb::MyClass
    nsa::nsb::MyClass()
    %rename nsa_nsb_MyClassFromInt nsa::nsb::MyClass(int x)
     %constructor nsa_nsb_MyClassFromInt(int x)

You use the %rename tag or %constructor tag for alternate
constructors, but you must replace the :: with _.

> Thank you for your offer of looking at the code. I definitely don't want to
> cause any work for you or the team and any suggestions would be appreciated.
> The attached archive has the .i and MyClass header file and I've included a
> main driver file and makefile.

Thanks for the sample, it really helps and saves me a lot of time when
I people give me a nice little sample to work with.

The next snapshot will contain the fixed binding generator.

Regards,
    John Labenski


_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to