<[EMAIL PROTECTED]>
I've wondered about this. We can just use the C++ array structures as
is, for example wxArrayInt or wxArrayString, but people have made it
so that some functions return lua tables of ints or strings instead
and I've maintained that. It would be easier for the binder to just
return the natural C++ datatype and provide simple functions to
convert between the C++ array and a lua table.

Do you have any feelings about this? Currently it's a little bit of
both, some functions return lua tables others wxArrayXXX.

I think it depends on the use of the structure. If it will be used again in c++ code (so the lua just hold reference to the object and pass to another c++ object to process then it would be better to return exactly as is (wxArrayXXX).
If the return data is used in lua code or different framework then it is best to use as table.
<[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>That's too bad. The new version really has quite a lot of new and
better things. Please don't hesitate to tell us about anything else
that's missing or doesn't work though. There's way to much to
I have tested CVS before it works good, but the problem is with luasql; the kepler project team has not updated it to lua-5.1 yet. Last time I remember ; the current luasql compiles and runs fine with lua-5.1 in Linux, but I have no way to make it run in windows (may be I am so bad in windows env), the binary just crashed, compiles gives errors. I have tight time so can not do furthur, but turn back to lua-5.0 for everything works. I hope by the time goes I can use the CVS again.

To say about bugs, I found some minor problems and limitations with wxgenbind.lua  in version 2.6.2.0 ; not sure if the problem found and correct in CVS version.

%class  %delete %encapsulate %noclassinfo  a
xxxx
%endclass

<[EMAIL PROTECTED]>%class b
set(a)
xxxx
%endclass

When generated to the binding files, the above set(a) ; the line that pop the userdatatype 'a' is incorrectly generated, it uses GetIntType(xx) instead, then it will give compile error. I have to override it.

AFter fixing this, compiler still gives error about can not find the constructor of a(void*)  which is not available.  So another step is add another bogus constructor for a(void* ) which is identical to a()

Now things are fine in linux, but VC7 still gives one error for a specfic line, 'can not convert from void*  to a*  =  strange as it happend for only one method; all others fine. I have to remove the method.

3. genwxbind  does not like a line break between parameters of a method in .i  files . It gives error;

4. The following is not accepted by genwxbind

c++
class a {
a(int v1, b v2=b())
}

in .i if you write
%class a
a(int v1, b v2=b())
%endclass
will give errors. I saw you work around it by not use default param in the () form,

5. If in c++ you have
#define EmptyA  a()

there is no way to write in .i file
%define EmptyA  a() // Error
%define EmptyA  // Error

Thank you for reading my long emails lol

Cheers




S.KIEU


The LOST Ninja blog: Exclusive clues, clips and gossip.

Reply via email to