ps. I've added a wxString stub to wxLua. All there is a constructor to create a wxString from a lua string and the function GetData() to return it back to a lua string.
wxString(lua string) luastr = wxstr:GetData() You still won't be able to convert the tolua++ wxString userdata to wxLua's wxString unless you figure out how to do this yourself. Regards, John Labenski On 5/23/06, John Labenski <[EMAIL PROTECTED]> wrote:
On 5/23/06, Darwin Slattery <[EMAIL PROTECTED]> wrote: > Hello, > > First of all thanks for such a great quality library - keep up the great > work. Thanks. > I have just started using wxlua in the GUI layer of my C++ app. I have been > using tolua++ to provide the bindings to classes in my data layer. I was > hoping to use some wx classes in my data layer e.g. wxString, but these > objects just appear as userdata in the lua runtime e.g. calling the > following function binded to by tolua++ returns userdata: > wxString getName(); wxLua uses only lua strings, to save space, easier calls to wxWidgets functions, and whatnot. It would be very easy to wrap wxStrings however, but there's a lot of functions and it might be too much bloat. We use the two functions wx2lua and lua2wx, see the top of modules/wxlua/include/wxlstate.h. You can also just use wxLua's binding generator instead of tolua++. It's really easy to create the interface files and run the generator. Take a look at bindings/wxstc for an example of how to write the rules file for a smaller semi-separate library. See also the docs about our binding generator. > Is there anyway that tolua++ bindings and the wxlua can co-exist? Can I > recast this userdata to a wxString within the lua environment? No, see above, we don't have any wxStrings and the conversion of the userdata in lua might be tricky. Regards, John Labenski
------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ Wxlua-users mailing list Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users