SourceForge logo
SourceForge logo
Menu

Re: [wxlua-users] Serial Port module for wxLua

From: John L. <jla...@gm...> - 2007年01月30日 21:06:51
On 1/30/07, Ryan Pusztai <rpu...@gm...> wrote:
> On 1/30/07, John Labenski <jla...@gm...> wrote:
> > wxCTB is the only one I know of. I have read on wx-users that it works
> > and people like it if that helps. I have not seen it myself, but I
> > assume that wrapping it should be pretty straight forward.
>
> How do I bind wxCTB:wxSerialPort() to wxLua? I am new to wxLua and I
> feel like that would be beyond my skills right now. I use wxWidgets on
> a daily basis, but Lua I am just starting with. Any article/how-to or
> help would be greatly appreciated. I think I only want the serial port
> class not the whole library. Should I make it a wxLua module? Is that
> equivalent to binding?
The bindings are easy to make, read this
http://wxlua.sourceforge.net/documentation.php
http://wxlua.sourceforge.net/docs/binding.html
Take a look at any of the bindings
http://wxlua.cvs.sourceforge.net/wxlua/wxLua/bindings/wxwidgets/appframe.i?view=markup
Copy the header you want to bind to *.i and then just clean them up a
little. See also the apps/wxluacan sample which has it's own bindings.
Generate the bindings using genwxbind.lua, using your "rules" file
(just copy an existing one and change the names of a few things) and
then create the output CPP files. See genwxbind.bat for the command
line syntax of genwxbind.lua.
Once you've got your binding files, compile them with your project (or
make your own lib) and link to it. I suppose that you could make these
modules loadable by 'require', but that would take some doing.
Regards,
 John Labenski

View entire thread

Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /