Hi John,
John Labenski wrote:
Sorry, I've been away.
I expected something like that.
I'll try it out tomorrow, does it depend on
anything?
It depends on nothing, only Cmake to generate all makestuff needed.
It sounds good if not.
I think the nice thing is that there will be a canvas object which calls
function from C++ in Lua.
e.g. to draw the object a function is called in lua with as input
parameter wxDC (comming from the C++ cnavs object). The same could be
done for the hit test function.
The second feature is the command processor. It has do undo.
And we can use as a central point for wrapping functions.
The nice thing would be to wrap all classes in this sample. I managed
to do the rectangle (working around all the wrapping problem we have ),
what i found as a bug the next.
delete m_pTrackedList;
One can add object to the canvas, and of course they will be owned by
the canvas.
But Lua wants to delete them whn closing the program.
I think there are two solution:
- make in the *.i file a %notrack keyword, which in this constrcutor
function
static int LUACALL wxlCanObj_constructor(lua_State *L)
removes this line
wxLua_addToTrackedMemoryList(wxlState, (wxlCanObj *)returns);
OR
use smart pointers for situations like this, where it does not matter
when who deletes the object first, lua or the C++ canvas.
I think the first solution is for the moment the easiest. Would it be
simple to add this?
I've been playing with writing a simple Sudoku solver, something where
Do you have a link? I never heard of Sudoku?
I could make the drawing of the grid in c++, as a widget.
Sounds like canvas needs too?
I'd bind
that to lua that would run the code to solve it. It'd be pretty basic,
but vaguely useful to people who like Sudoku. You could of course just
do the whole thing in lua, but I couldn't think of another binding
demo...
Several sample/demos would not be bad, and maybe we can combine your
idea with my sample.
e.g Objects on a canvas which can be dragged, which form together the game??
But lets make the bindings work first. I will try to test your new mods
today,
regards,
Klaas
--
Unclassified
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wxlua-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxlua-users