Forgot the error itself, so one more same problem:

1>..\..\..\..\..\..\..\packages\wxart2d\luawraps\src\artbase.cpp(2347) : error 
C2446: ':' : no 
conversion from 'wxCStrData' to 'int'

static wxLuaArgType s_wxluatypeArray_wxLua_a2dDoMu_op_set1[] = { 
&wxluatype_a2dDoMu, 
&wxluatype_TSTRING, NULL };
static int LUACALL wxLua_a2dDoMu_op_set1(lua_State *L);
// static wxLuaBindCFunc s_wxluafunc_wxLua_a2dDoMu_op_set1[1] = {{ 
wxLua_a2dDoMu_op_set1, 
WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_a2dDoMu_op_set1 }};
//     %operator a2dDoMu& operator=( const wxChar* )
static int LUACALL wxLua_a2dDoMu_op_set1(lua_State *L)
{
     // const wxChar arg1
     wxString  arg1 = wxlua_getwxStringtype(L, 2);
     // get this
     a2dDoMu * self = (a2dDoMu *)wxluaT_getuserdatatype(L, 1, 
wxluatype_a2dDoMu);
     // call op_set
     (*self)=(arg1.IsEmpty() ? NULL : arg1.c_str());
     a2dDoMu* returns = self;
     // push the result datatype
     wxluaT_pushuserdatatype(L, returns, wxluatype_a2dDoMu);

     return 1;
}


On 25-12-2011 15:19, klaas.holwerda wrote:
> Hi John,
>
> I get the following error in the bindings, and wonder what to do??
>
> string.IsEmpty() ? NULL : string.c_str()
>
> Changed to:
>
> string.c_str() or just string makes it compile.
>
> This happens i think in all cases where const wxChar *string is an argument.
>
> Like in here:
>
> //     void XmlEncodeStringToStream( const wxChar *string, size_t len = 
> wxString::npos )
> static int LUACALL 
> wxLua_a2dIOHandlerXMLWrite_XmlEncodeStringToStream(lua_State *L)
> {
>       // get number of arguments
>       int argCount = lua_gettop(L);
>       // size_t len = wxString::npos
>       size_t len = (argCount>= 3 ? (size_t)wxlua_getuintegertype(L, 3) : 
> wxString::npos);
>       // const wxChar string
>       wxString  string = wxlua_getwxStringtype(L, 2);
>       // get this
>       a2dIOHandlerXMLWrite * self = (a2dIOHandlerXMLWrite 
> *)wxluaT_getuserdatatype(L, 1,
> wxluatype_a2dIOHandlerXMLWrite);
>       // call XmlEncodeStringToStream
>       self->XmlEncodeStringToStream(string.IsEmpty() ? NULL : string.c_str(), 
> len);
>
>       return 0;
> }
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> wxlua-users mailing list
> wxlua-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to