On 6/9/06, Darwin Slattery <[EMAIL PROTECTED]> wrote:
> Thanks that works great. The naming convention for the namespaces is
> perfect.

Good.

> I have noticed something regarding enumerations declared inside a class in a
> namespace that I just wanted to check with you.
>
> I have the following declaration:
> namespace nsa
> {
> class MyClass
> {
> public:
>     enum MyEnum
>     {
>         ENUMVAL1 = 10
>     };
> };
> }
>
> The corresponding entry for the enumeration in the .i file is:
> %enum nsa::MyClass::MyEnum
>     %rename nsa_MyClass_ENUMVAL1 MyClass::ENUMVAL1
> %endenum
>
> I could not put the 'nsa::' before 'MyClass::ENUMVAL1' because it results in
> a compile error saying that nsa::nsa isn't declared.

I fixed some things related to this, get a new copy and try this. ie.
Don't prepend the namespace on the enum name.

%enum nsa::MyClass::MyEnum
    %rename nsa_MyClass_ENUMVAL1 ENUMVAL1
    %rename ENUMVAL2 ENUMVAL2
    ENUMVAL3
%endenum

results should be (using the wx lua "global" namespace)

wx.nsa_MyClass_ENUMVAL1
wx.ENUMVAL2
wx.nsa_MyClass_ENUMVAL3

Regards,
   John Labenski


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

Reply via email to