You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(60) |
Jul
(35) |
Aug
(32) |
Sep
(5) |
Oct
(5) |
Nov
(58) |
Dec
(34) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(114) |
Feb
(184) |
Mar
(153) |
Apr
(90) |
May
(153) |
Jun
(59) |
Jul
(24) |
Aug
(43) |
Sep
(17) |
Oct
(34) |
Nov
(11) |
Dec
(204) |
| 2007 |
Jan
(84) |
Feb
(119) |
Mar
(38) |
Apr
(28) |
May
(52) |
Jun
(105) |
Jul
(64) |
Aug
(67) |
Sep
(14) |
Oct
(3) |
Nov
(28) |
Dec
(55) |
| 2008 |
Jan
(228) |
Feb
(55) |
Mar
(30) |
Apr
(30) |
May
(15) |
Jun
(20) |
Jul
(12) |
Aug
(3) |
Sep
(13) |
Oct
(54) |
Nov
(35) |
Dec
(35) |
| 2009 |
Jan
(19) |
Feb
(20) |
Mar
(34) |
Apr
(4) |
May
(60) |
Jun
(25) |
Jul
(16) |
Aug
(51) |
Sep
(19) |
Oct
(62) |
Nov
(21) |
Dec
(12) |
| 2010 |
Jan
(1) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(23) |
Jun
(13) |
Jul
(1) |
Aug
(40) |
Sep
(18) |
Oct
(21) |
Nov
(26) |
Dec
(34) |
| 2011 |
Jan
(17) |
Feb
(23) |
Mar
(1) |
Apr
(10) |
May
(1) |
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(43) |
| 2012 |
Jan
(5) |
Feb
(19) |
Mar
(6) |
Apr
(24) |
May
(39) |
Jun
(83) |
Jul
(29) |
Aug
(36) |
Sep
(64) |
Oct
(55) |
Nov
(12) |
Dec
(7) |
| 2013 |
Jan
(17) |
Feb
(10) |
Mar
(37) |
Apr
(27) |
May
(13) |
Jun
(9) |
Jul
(7) |
Aug
(61) |
Sep
(23) |
Oct
(23) |
Nov
(30) |
Dec
(16) |
| 2014 |
Jan
(23) |
Feb
(13) |
Mar
(9) |
Apr
(17) |
May
(2) |
Jun
(11) |
Jul
(2) |
Aug
|
Sep
(9) |
Oct
(24) |
Nov
(2) |
Dec
(14) |
| 2015 |
Jan
(6) |
Feb
(4) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(21) |
Nov
(6) |
Dec
(2) |
| 2016 |
Jan
(4) |
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(11) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(8) |
Nov
|
Dec
|
| 2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(2) |
2
(16) |
3
(28) |
4
(2) |
|
5
(2) |
6
(14) |
7
(4) |
8
(10) |
9
(9) |
10
(2) |
11
|
|
12
(7) |
13
(9) |
14
(8) |
15
(4) |
16
(4) |
17
(3) |
18
|
|
19
(14) |
20
(4) |
21
(12) |
22
(2) |
23
(5) |
24
(2) |
25
(11) |
|
26
(1) |
27
(3) |
28
(6) |
|
|
|
|
Ok, I hacked away a bit, it's not pretty, but I got it to work in MSW.
I downloaded the sources for luasocket-2.0.tar.gz. Compiled it using
MSVC 2005 express using the sln file, I had to edit the *.vcproj to
point to wxLua/module/lua/include for the include path to lua.h.
I edited mime.h/c and added
MIME_API int luaopen_mime(lua_State *L);
MIME_API int luaopen_mime(lua_State *L) {
return luaopen_mime_core(L);
}
edited socket.h/c and added
LUASOCKET_API int luaopen_socket(lua_State *L);
LUASOCKET_API int luaopen_socket(lua_State *L) {
return luaopen_socket_core(L);
}
*** I don't know why I have to do that?
I then created a dir called "socket" and "mime" in the
luasocket-2.0/src dir and copied (not moved) all the lua files into
them. I moved src/mime.dll to src/mime/core.dll and src/socket.dll to
src/socket/core.dll. You HAVE TO either delete src/socket.dll and
src/mime.dll or get rid of them somehow, otherwise require tries to
load them instead of mime.lua and socket.lua and they have to both be
called core.dll.
src/mime.lua -- these two are already there, leave others too
src/socket.lua
src/mime/core.dll
src/socket/core.dll
src/socket/ftp.lua
src/socket/http.lua
src/socket/smtp.lua
src/socket/socket.lua
src/socket/tp.lua
src/socket/url.lua
I edited src/compat/compat5.1r4/compat5.1.lua to have this
package.cpath =3D os.getenv("LUA_CPATH") or
"./?.dll;" ..
instead of ?.so for unix systems. I could have just used the
environment variables, but after some debugging about why it couldn't
find the libs I just left it the way I had it.
It works! Both using the lua.exe program and wxlua.exe. I ran the
programs from the luasocket-2.0/src dir like this
../../wxLua/bin/wxlua.exe wxlua_socket.lua (the name I gave your program)
(note also I'm using cygwin in Windows so I use forward slashes)
I made some tweaks to wxLua.exe to make it handle the errors a little bette=
r.
I'm not sure that this helps at all since I really just trashed
things, but the problem you have is with the paths not being right and
it not being able to find either the lua or dll files for the module's
require.
To help debug things change src/compat/compat5.1r4/compat5.1.lua
At the top add the "print" to this list of functions
local print, assert, error, getfenv, ipairs, loadfile, loadlib, pairs,
setfenv, setmetatable, type =3D print, assert, error, getfenv, ipairs,
loadfile, loadlib, pairs, setfenv, setmetatable, type
then later on add some "print" statements
local function search (path, name)
...
print("search ", c)
local function loader_C (name)
print("loader_C ", name)
local function loader_Lua (name)
print("loader_Lua ", name)
and whatever else seems necessary to help you understand why it cannot
find what it's looking for.
Good luck,
John Labenski
On 2/27/06, John Labenski <jla...@gm...> wrote:
> On 2/27/06, Marcos <mar...@ya...> wrote:
> > I'm compiling wxlua myself.
> > I'am using the luasocket 2.0 binary files on win32 (win98).
> >
> > > I see you load compat-5.1.lua, wxLua is based on 5.0.2, has luasocket
> > > been compiled for 5.1?
> > No, luasocket was been compiled for 5.0.2, but under compat-5.1 package
> > model.
> >
> > I download your wxLua installer e try ...
> >
> > the script is:
> > ---
> > dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
> > local http =3D require("socket.http")
> > print(http.request)
> > b, c, h =3D http.request("http://www.lua.org") print(b,c,h)
> > ---
> >
> > I get this message with lua.exe and wxlua.exe
> > ---
> > wxLua: Error while running chunk
> > compat-5.1.lua:130: error loading package `socket.core' (One of the
> > library files needed to run this application cannot be found.
> > )
> > ---
> >
> > Now I put lua50.dll (luasocket dependencie ) in /bin, and get this.
> > ----
> > C:\App\wxLua\test\socket>C:\App\wxLua\bin\lua.exe http1.lua
> > function: 00AC4780
> > C:\APP\WXLUA\BIN\LUA.EXE: not enough memory
> > stack traceback:
> > [C]: in function `request'
> > http1.lua:4: in main chunk
> > [C]: ?
> > ---
> >
> > Note the module was loaded and http.request is a function.
>
> Well, it seems a little closer. I've tried it in linux, I got the
> luasocket source compiled it, but I had to make some changes, but it
> still doesn't even work using the lua executable.
>
> luasocket.h & luasocket.c I added
>
> LUASOCKET_API int luaopen_socket(lua_State *L);
>
> LUASOCKET_API int luaopen_socket(lua_State *L) {
> return luaopen_socket_core(L);
> }
>
> since otherwise I got this error when just running it in lua
> ../../wxLua/bin/lua:
> .../wxLua/luasocket-2.0/src/compat-5.1r4/compat-5.1.lua:125: error
> loading package `socket' (./socket.so: undefined symbol:
> luaopen_socket)
>
> I tried changing the require code to
> local http =3D require("socket")
>
> to not get the error
> ../../wxLua/bin/lua:
> .../wxLua/luasocket-2.0/src/compat-5.1r4/compat-5.1.lua:171: package
> `socket.http' not found
>
> but now I get this error, since it didn't load the http module.
> ../../wxLua/bin/lua: wxlua_test.lua:9: attempt to call field `request'
> (a nil value)
>
> I'm a little unfamiliar with the module way of doing things, but
> something not right about the luasocket lib or my paths or...
> something. I'm a little suspicious since it was looking for a function
> called luaopen_socket which didn't even exist, so I think there may be
> other problems in the luasocket module.
>
> It would be nice to get this working in wxLua, but if I can't even get
> it to work using lua, I won't be able to make any progress. I'll try
> tomorrow in MSW.
>
> Regards,
> John Labenski
>
On 2/27/06, Marcos <mar...@ya...> wrote:
> I'm compiling wxlua myself.
> I'am using the luasocket 2.0 binary files on win32 (win98).
>
> > I see you load compat-5.1.lua, wxLua is based on 5.0.2, has luasocket
> > been compiled for 5.1?
> No, luasocket was been compiled for 5.0.2, but under compat-5.1 package
> model.
>
> I download your wxLua installer e try ...
>
> the script is:
> ---
> dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
> local http =3D require("socket.http")
> print(http.request)
> b, c, h =3D http.request("http://www.lua.org") print(b,c,h)
> ---
>
> I get this message with lua.exe and wxlua.exe
> ---
> wxLua: Error while running chunk
> compat-5.1.lua:130: error loading package `socket.core' (One of the
> library files needed to run this application cannot be found.
> )
> ---
>
> Now I put lua50.dll (luasocket dependencie ) in /bin, and get this.
> ----
> C:\App\wxLua\test\socket>C:\App\wxLua\bin\lua.exe http1.lua
> function: 00AC4780
> C:\APP\WXLUA\BIN\LUA.EXE: not enough memory
> stack traceback:
> [C]: in function `request'
> http1.lua:4: in main chunk
> [C]: ?
> ---
>
> Note the module was loaded and http.request is a function.
Well, it seems a little closer. I've tried it in linux, I got the
luasocket source compiled it, but I had to make some changes, but it
still doesn't even work using the lua executable.
luasocket.h & luasocket.c I added
LUASOCKET_API int luaopen_socket(lua_State *L);
LUASOCKET_API int luaopen_socket(lua_State *L) {
return luaopen_socket_core(L);
}
since otherwise I got this error when just running it in lua
../../wxLua/bin/lua:
.../wxLua/luasocket-2.0/src/compat-5.1r4/compat-5.1.lua:125: error
loading package `socket' (./socket.so: undefined symbol:
luaopen_socket)
I tried changing the require code to
local http =3D require("socket")
to not get the error
../../wxLua/bin/lua:
.../wxLua/luasocket-2.0/src/compat-5.1r4/compat-5.1.lua:171: package
`socket.http' not found
but now I get this error, since it didn't load the http module.
../../wxLua/bin/lua: wxlua_test.lua:9: attempt to call field `request'
(a nil value)
I'm a little unfamiliar with the module way of doing things, but
something not right about the luasocket lib or my paths or...
something. I'm a little suspicious since it was looking for a function
called luaopen_socket which didn't even exist, so I think there may be
other problems in the luasocket module.
It would be nice to get this working in wxLua, but if I can't even get
it to work using lua, I won't be able to make any progress. I'll try
tomorrow in MSW.
Regards,
John Labenski
John,
Sorry, my bad english, I'm brazilian.
I'm compiling wxlua myself.
I'am using the luasocket 2.0 binary files on win32 (win98).
> I see you load compat-5.1.lua, wxLua is based on 5.0.2, has luasocket
> been compiled for 5.1?
No, luasocket was been compiled for 5.0.2, but under compat-5.1 package
model.
I download your wxLua installer e try ...
the script is:
---
dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
local http = require("socket.http")
print(http.request)
b, c, h = http.request("http://www.lua.org") print(b,c,h)
---
I get this message with lua.exe and wxlua.exe
---
wxLua: Error while running chunk
compat-5.1.lua:130: error loading package `socket.core' (One of the
library files needed to run this application cannot be found.
)
---
Now I put lua50.dll (luasocket dependencie ) in /bin, and get this.
----
C:\App\wxLua\test\socket>C:\App\wxLua\bin\lua.exe http1.lua
function: 00AC4780
C:\APP\WXLUA\BIN\LUA.EXE: not enough memory
stack traceback:
[C]: in function `request'
http1.lua:4: in main chunk
[C]: ?
---
Note the module was loaded and http.request is a function.
--------
Marcos W.
_______________________________________________________
Yahoo! Acesso Grs - Internet rda e grs. Instale o discador agora!
http://br.acesso.yahoo.com
On 2/27/06, Marcos <mar...@ya...> wrote:
> I'm using wxlua for many years.
Great.
> I have a problem on using luasocket 2.0.
>
> Can I load a lua dll module with require?
> ---- script
>
> dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
> local http =3D require("socket.http")
> b, c, h =3D http.request("http://www.lua.org") print(b,c,h)
>
I haven't tried this myself.
> With lua.exe it's ok.
> But with wxlua.exe I get errors.
>
> What is wrong?
The error dialog you get (IIRC) is a generic MSVC dialog saying that
someone is trying to write past the end of some allocated memory.
Did you compile wxLua and luasocket yourself?
What wxLua are you using, the cvs version from sourceforge or the original?
Can you run it in a debugger?
Do you get the same error for other functions in luasocket or just http.req=
uest?
I see you load compat-5.1.lua, wxLua is based on 5.0.2, has luasocket
been compiled for 5.1?
If you don't compile it yourself you may want to try this newer version out=
.
http://wxlua.sourceforge.net/wxLua-2.6.2.1-setup.exe
I hope my questions can give you some ideas of how to solve this.
Unfortunately the text in the dialog isn't enough to say anything
definitively.
John Labenski
Hello,
I'm using wxlua for many years.
I have a problem on using luasocket 2.0.
Can I load a lua dll module with require?
---- script
dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
local http = require("socket.http")
b, c, h = http.request("http://www.lua.org") print(b,c,h)
----
With lua.exe it's ok.
But with wxlua.exe I get errors.
What is wrong?
-----------
Marcos W.
Hello,
I'm using wxlua for many years.
I have a problem on using luasocket 2.0.
Can I load a lua dll module with require?
---- script
dofile([[D:\lua\lua55円.0\bin\compat-5.1.lua]] )
http = require("socket.http")
b, c, h = http.request("http://www.lua.org") print(b,c,h)
----
With lua.exe it's ok.
But with wxlua.exe I get errors.
What is wrong?
-----------
Marcos
Hi, John Labenski ha scritto: > On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: >> However there is still another problem I see: unlike wxlua, wxluaedit >> always opens the user-chosen files on the same notebook page. > > Fixed, you need to checkout wxStEdit again. thanks, now it works nicely ! > >> I searched the code which does this but I couldn't found it by sure. Is >> it the fileLoad() function in the editor.wx.lua file ? >> In any case I think it would be nice to have the File->Open menuitem of >> wxLuaEdit to open files in new notebook pages. > > editor.wx.lua is the editor for apps/wxlua. The apps/wxluaedit is > strictly C++ and uses the wxstedit as the editor with no lua code at > all. ok, I missed that Francesco
Hi, klaas.holwerda ha scritto: > Hi, > > I modified wxluacan a bit, it has now two types of luascript objects. > One that is fast, since it only load the script once and adds all > drawing as childs objects to a group. > And the other use wxlua to draw the object again and again. > > Here is a screenshot: > > http://www.xs4all.nl/~kholwerd/tmp/wxluacan.png > > I think it can be added like this? nice ! I've added it to the screenshot page. I won't have time to take screenshots up to the end of this week... if you want to take some others, just add them to the website/screenshots folder adding a "_gtk2.png" or "_win.png" prefix... > > I am thinking to wire a tutorial based on this sample, would that be a > good idea? it looks like a good idea, sure ! > Would something be missing still? I'm working on the wxLua autopackage and also on Italian translation of autopackage :) Last I'm also working to add msvc8prj to bakefile. But these are not crucial things and if they reveal to take too long I would be favourable to a release first... Francesco
Hi, I modified wxluacan a bit, it has now two types of luascript objects. One that is fast, since it only load the script once and adds all drawing as childs objects to a group. And the other use wxlua to draw the object again and again. Here is a screenshot: http://www.xs4all.nl/~kholwerd/tmp/wxluacan.png I think it can be added like this? I am thinking to wire a tutorial based on this sample, would that be a good idea? Would something be missing still? Klaas
On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: > However there is still another problem I see: unlike wxlua, wxluaedit > always opens the user-chosen files on the same notebook page. Fixed, you need to checkout wxStEdit again. > I searched the code which does this but I couldn't found it by sure. Is > it the fileLoad() function in the editor.wx.lua file ? > In any case I think it would be nice to have the File->Open menuitem of > wxLuaEdit to open files in new notebook pages. editor.wx.lua is the editor for apps/wxlua. The apps/wxluaedit is strictly C++ and uses the wxstedit as the editor with no lua code at all. I've also changed this to add a new page for both as well. -John
Hi, John Labenski ha scritto: > On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: >> Hi John, >> I've created a little patch for wxLuaEdit to make it possible to >> call it from command line with .lua files to open directly in the editor. >> >> This patch will make life a lot easier for win32 and also unix users IMO. >> >> Can I apply it ? > > Yes. > >> Francesco >> >> PS: the patch works ok when you specify zero or one file in the command >> line. When you specify two or more, wxLuaEditor opens only the last. >> This is not a bug with my patch but seems something scintilla-related: I >> get the same behaviour using the File->Open cmd. I.e. the new files I >> load do not go as additional items in the "Files" splitterwnd but rather >> replace the already-open file. >> Is it because of wxCVS ? > > You have to add files to the wxSTEditorNotebook not to the editor, add > the first file to the editor and remaining ones to the notebook. See > the wxstedit sample. > http://cvs.sourceforge.net/viewcvs.py/wxcode/wxCode/components/wxstedit/samples/stedit/wxstedit.cpp?view=markup > > see the code below this comment > // If there are any good files left, try to load them > > -John That was very useful ! I've copied also some other code to make it warn the user about eventually-unloadable files and committed it. However there is still another problem I see: unlike wxlua, wxluaedit always opens the user-chosen files on the same notebook page. I searched the code which does this but I couldn't found it by sure. Is it the fileLoad() function in the editor.wx.lua file ? In any case I think it would be nice to have the File->Open menuitem of wxLuaEdit to open files in new notebook pages. Francesco
On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: > The website is now fairly complete. We should only decide which sample > to use for wxLua screenshots... Thanks for all your work Francesco! I've added a screenshot for wxLuaEdit in GTK2 running scribble. I think that a few different images of different programs would be nice. Maybe the wxlua app in windows running some wxlua program and the wxluacan sample. -John
On 2/25/06, John Labenski <jla...@gm...> wrote: > On 2/25/06, klaas.holwerda <kho...@xs...> wrote: > > I get this now. > > > > I think the defines are not double, and therefore generate errors? > > > > If i e.g replace the firs __WIN32__ with 1.0 that one is oke. > > Is it only VC6 with those errors? > > > > > > --------------------Configuration: mod_wxbind - Win32 Debug > > Multilib-------------------- > > Compiling... > > wx_define.cpp > > d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(107) : erro= r > > C2059: syntax error : ',' > > Opps, sorry. I added all the defines __WIN32__, __WXGTK__, and what > not. Unfortunately some of them are > #define __WXGTK__ 1 > but I think your problem is that others are only > #define __WIN32__ // no value > > I'll see what I can do to fix it ASAP. In the meantime you can rem out > those lines in wx_define.cpp, but don't commit it since I'll try to > fix it properly. Fixed, hopefully. You can now have %define __WIN32__ 1 so that you can assign arbitrary values to %defines. -John Labenski
On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: > Hi John, > I've created a little patch for wxLuaEdit to make it possible to > call it from command line with .lua files to open directly in the editor. > > This patch will make life a lot easier for win32 and also unix users IMO. > > Can I apply it ? Yes. > Francesco > > PS: the patch works ok when you specify zero or one file in the command > line. When you specify two or more, wxLuaEditor opens only the last. > This is not a bug with my patch but seems something scintilla-related: I > get the same behaviour using the File->Open cmd. I.e. the new files I > load do not go as additional items in the "Files" splitterwnd but rather > replace the already-open file. > Is it because of wxCVS ? You have to add files to the wxSTEditorNotebook not to the editor, add the first file to the editor and remaining ones to the notebook. See the wxstedit sample. http://cvs.sourceforge.net/viewcvs.py/wxcode/wxCode/components/wxstedit/sam= ples/stedit/wxstedit.cpp?view=3Dmarkup see the code below this comment // If there are any good files left, try to load them -John > > Index: apps/wxluaedit/src/wxluaedit.cpp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v > retrieving revision 1.5 > diff -b -u -2 -r1.5 wxluaedit.cpp > --- apps/wxluaedit/src/wxluaedit.cpp 21 Feb 2006 04:20:28 -0000 1= .5 > +++ apps/wxluaedit/src/wxluaedit.cpp 25 Feb 2006 14:32:54 -0000 > @@ -21,4 +21,5 @@ > #endif > > +#include <wx/cmdline.h> > #include "wx/image.h" > #include "wx/stedit/stedit.h" > @@ -31,4 +32,24 @@ > extern bool wxLuaBinding_wxstc_init(); > > + > +// > -------------------------------------------------------------------------= --- > +// command line options > +// > -------------------------------------------------------------------------= --- > + > +static const wxCmdLineEntryDesc g_cmdLineDesc[] =3D > +{ > + // help > + { wxCMD_LINE_SWITCH, wxT("h"), wxT("help"), > + _("Show this help message"), > + wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP }, > + > + // filenames to open in the editor > + { wxCMD_LINE_PARAM, wxEmptyString, wxEmptyString, > + _("lua files to open in the editor"), > + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | > wxCMD_LINE_PARAM_MULTIPLE }, > + > + { wxCMD_LINE_NONE } > +}; > + > // > -------------------------------------------------------------------------= --- > // resources and constants > @@ -90,4 +111,9 @@ > wxLuaBinding_wxstc_init(); > > + // parse command line > + wxCmdLineParser parser(g_cmdLineDesc, argc, argv); > + if (parser.Parse() !=3D 0) > + return 0; // help was shown / an error occurred > + > wxLuaEditorFrame *frame =3D new wxLuaEditorFrame(_T("wxLuaEditor"), > wxPoint(20, 20), > wxSize(600, 400)); > @@ -115,6 +141,10 @@ > splitWin->SetSashPosition(splitWin->GetSize().y/2); > > - frame->Show(true); > > + // before showing the frame, load the file specified from > commandline, if present > + for (size_t i=3D0; i < parser.GetParamCount(); i++) > + frame->GetEditor()->LoadFile(parser.GetParam(i)); > + > + frame->Show(true); > return true; > } > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting langua= ge > that extends applications into web and mobile media. Attend the live webc= ast > and join the prime developer group breaking into this new coding territor= y! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Wxlua-users mailing list > Wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users >
On 2/25/06, klaas.holwerda <kho...@xs...> wrote: > I get this now. > > I think the defines are not double, and therefore generate errors? > > If i e.g replace the firs __WIN32__ with 1.0 that one is oke. > Is it only VC6 with those errors? > > > --------------------Configuration: mod_wxbind - Win32 Debug > Multilib-------------------- > Compiling... > wx_define.cpp > d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(107) : error > C2059: syntax error : ',' Opps, sorry. I added all the defines __WIN32__, __WXGTK__, and what not. Unfortunately some of them are #define __WXGTK__ 1 but I think your problem is that others are only #define __WIN32__ // no value I'll see what I can do to fix it ASAP. In the meantime you can rem out those lines in wx_define.cpp, but don't commit it since I'll try to fix it properly. Regards, John Labenski
On 2/25/06, Francesco Montorsi <f18...@ya...> wrote: > Hi John, > there was a little 'bug' in updatesite.sh since it did not reset > appropriately the permissions of the DOC folder. So I'm now getting ton > of error message when running that script because DOCS files have RW > permissions only for your user. > > Can you rerun that script ? All done. I get errors chainging permissions for files not owned by me, but I think everything is rw. > PS: I think that /home/groups/w/wx/wxlua/checkout_wxlua_website script > can be removed now... Removed. -John Labenski
Hi,
I get this now.
I think the defines are not double, and therefore generate errors?
If i e.g replace the firs __WIN32__ with 1.0 that one is oke.
Is it only VC6 with those errors?
Klaas
--------------------Configuration: mod_wxbind - Win32 Debug
Multilib--------------------
Compiling...
wx_define.cpp
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(107) : error
C2059: syntax error : ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(107) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(130) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(130) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(130) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(131) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(131) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(131) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(132) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(132) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(132) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(133) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(133) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(133) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(134) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(134) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(134) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(135) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(135) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(135) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(146) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(146) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(146) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(147) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(147) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(147) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(148) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(148) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(148) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(149) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(149) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(149) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(154) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(154) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(154) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(155) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(155) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(155) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(156) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(156) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(156) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(157) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(157) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(157) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(158) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(158) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(158) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(159) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(159) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(159) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(160) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(160) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(160) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(161) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(161) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(161) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(171) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(171) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(171) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(172) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(172) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(172) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(173) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(173) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(173) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(174) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(174) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(174) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(179) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(179) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(179) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(180) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(180) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(180) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(181) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(181) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(181) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(182) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(182) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(182) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(183) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(183) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(183) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(184) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(184) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(184) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(185) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(185) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(185) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(186) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(186) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(186) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(191) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(191) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(191) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(192) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(192) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(192) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(193) : error
C2143: syntax error : missing ';' before '{'
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(193) : error
C2447: missing function header (old-style formal list?)
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(193) : error
C2143: syntax error : missing ';' before ','
d:\soft\lua\wxluacvs\wxLua\modules\wxbind\src\wx_define.cpp(193) : fatal
error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
wxluacan.exe - 102 error(s), 0 warning(s)
Hi John,
I've created a little patch for wxLuaEdit to make it possible to
call it from command line with .lua files to open directly in the editor.
This patch will make life a lot easier for win32 and also unix users IMO.
Can I apply it ?
Francesco
PS: the patch works ok when you specify zero or one file in the command
line. When you specify two or more, wxLuaEditor opens only the last.
This is not a bug with my patch but seems something scintilla-related: I
get the same behaviour using the File->Open cmd. I.e. the new files I
load do not go as additional items in the "Files" splitterwnd but rather
replace the already-open file.
Is it because of wxCVS ?
I'm going to do a cvs update and recompile...
Index: apps/wxluaedit/src/wxluaedit.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v
retrieving revision 1.5
diff -b -u -2 -r1.5 wxluaedit.cpp
--- apps/wxluaedit/src/wxluaedit.cpp 21 Feb 2006 04:20:28 -0000 1.5
+++ apps/wxluaedit/src/wxluaedit.cpp 25 Feb 2006 14:32:54 -0000
@@ -21,4 +21,5 @@
#endif
+#include <wx/cmdline.h>
#include "wx/image.h"
#include "wx/stedit/stedit.h"
@@ -31,4 +32,24 @@
extern bool wxLuaBinding_wxstc_init();
+
+//
----------------------------------------------------------------------------
+// command line options
+//
----------------------------------------------------------------------------
+
+static const wxCmdLineEntryDesc g_cmdLineDesc[] =
+{
+ // help
+ { wxCMD_LINE_SWITCH, wxT("h"), wxT("help"),
+ _("Show this help message"),
+ wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
+
+ // filenames to open in the editor
+ { wxCMD_LINE_PARAM, wxEmptyString, wxEmptyString,
+ _("lua files to open in the editor"),
+ wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL |
wxCMD_LINE_PARAM_MULTIPLE },
+
+ { wxCMD_LINE_NONE }
+};
+
//
----------------------------------------------------------------------------
// resources and constants
@@ -90,4 +111,9 @@
wxLuaBinding_wxstc_init();
+ // parse command line
+ wxCmdLineParser parser(g_cmdLineDesc, argc, argv);
+ if (parser.Parse() != 0)
+ return 0; // help was shown / an error occurred
+
wxLuaEditorFrame *frame = new wxLuaEditorFrame(_T("wxLuaEditor"),
wxPoint(20, 20),
wxSize(600, 400));
@@ -115,6 +141,10 @@
splitWin->SetSashPosition(splitWin->GetSize().y/2);
- frame->Show(true);
+ // before showing the frame, load the file specified from
commandline, if present
+ for (size_t i=0; i < parser.GetParamCount(); i++)
+ frame->GetEditor()->LoadFile(parser.GetParam(i));
+
+ frame->Show(true);
return true;
}
klaas.holwerda ha scritto: > Hi, > > I think we should add a link to this, for subscribing to the lists. > > http://sourceforge.net/mail/?group_id=140042 > > Someone one the wxusers list did have trouble finding it. > And i agree it is not so obvious to click on the word "mail" somewhere > to get there. > > Like in the support page. I've updated the support page together with the doc page and download page. The website is now fairly complete. We should only decide which sample to use for wxLua screenshots... Francesco
Hi John, there was a little 'bug' in updatesite.sh since it did not reset appropriately the permissions of the DOC folder. So I'm now getting ton of error message when running that script because DOCS files have RW permissions only for your user. Can you rerun that script ? Thanks, Francesco PS: I think that /home/groups/w/wx/wxlua/checkout_wxlua_website script can be removed now...
John Labenski wrote: > > I'm committing the changes now. > Thanks a lot John, i have obviously have bin reading in the wrong locations somehow :-( I toke as an example the functions called in C++ like in the wrappings, but calling functions in lua seems to be different. But no i have a problem compiling wx_define.cpp ( line 107 syntax error ','), regenerated the bindings, but it does not help. Will look further tomorrow, its is already far to late ;-) regards, Klaas
On 2/24/06, klaas.holwerda <kho...@xs...> wrote:
> After hours of searching around what i possibly do wrong i give up.
> It is the next peace of code in canlua.cpp
>
> It call the hit function in the script incircles.lua, and i tested
> that it does ( after loading it from the menu in the sample of course ).
> But somehow the boolean return result is totally wrong.
Fixed, I think, I added a printf for testing (like your wxLogDebug)
and it shows 0 or 1 depending where the mouse is.
> I went as far as calling a lua function which adds two numbers, and
> return that number, and it has the same behaviour.
> Meaning that at least the first time the result is at number 9 on the
> returned stack?? It even tells there are 9 result, while i think there
> is only one.
> With lst.GetBooleanType(0) the application just stops, there is an error
> generated in the check for the boolean type, but where that error end up
> is not clear to me.
It kills lua if running, calling lua_error, see wxLuaState::terror.
The pushed functions and callbacks continue to work however, but since
you're running code from C, I'm not sure what happens either.
lua_error does a long_jmp, but to where I dunno...
> It would be nice if the sample actually worked before the first release :=
-(
Agreed.
> bool wxlCanObjScript::DoIsHit( double x, double y, double absx, double
> absy )
> {
> double xh,yh;
> xh =3D x - absx;
> yh =3D y - absy;
>
> // run all statements in the script which should be returning a hit
> on the object or not
>
> wxLuaState lst =3D *(m_canvas->GetLuastate());
> lua_State* L =3D lst.GetLuaState();
> lua_getglobal( L, wx2lua(m_objectname + wxT("Hit")) );
>
> lst.lua_PushNumber( xh );
> lst.lua_PushNumber( yh );
>
> if ( lst.lua_PCall( 2, 1, 0 ) !=3D 0 )
> lst.SendErrorEvent( wxT("wrong hit function") );
>
// > int argCount =3D lua_gettop(L); don't need this?
> bool hit =3D lst.GetBooleanType(-1); want return value at top of sta=
ck
lst.lua_Pop(1); // pop returned value from stack to balance it
>
> //wxLogDebug( "hit %d", hit );
>
> if (hit)
> return true;
> return false;
> }
see
http://www.lua.org/pil/25.2.html
I'm committing the changes now.
Regards,
John Labenski
Hi John,
After hours of searching around what i possibly do wrong i give up.
It is the next peace of code in canlua.cpp
It call the hit function in the script incircles.lua, and i tested
that it does ( after loading it from the menu in the sample of course ).
But somehow the boolean return result is totally wrong.
I went as far as calling a lua function which adds two numbers, and
return that number, and it has the same behaviour.
Meaning that at least the first time the result is at number 9 on the
returned stack?? It even tells there are 9 result, while i think there
is only one.
With lst.GetBooleanType(0) the application just stops, there is an error
generated in the check for the boolean type, but where that error end up
is not clear to me.
Do you have any idea what i am doing wrong?
It would be nice if the sample actually worked before the first release :-(
Thanks for some help if you can find the time.
Thanks also for the nice changes, i hope to once understand them all :-)
Klaas
bool wxlCanObjScript::DoIsHit( double x, double y, double absx, double
absy )
{
double xh,yh;
xh = x - absx;
yh = y - absy;
// run all statements in the script which should be returning a hit
on the object or not
wxLuaState lst = *(m_canvas->GetLuastate());
lua_State* L = lst.GetLuaState();
lua_getglobal( L, wx2lua(m_objectname + wxT("Hit")) );
lst.lua_PushNumber( xh );
lst.lua_PushNumber( yh );
if ( lst.lua_PCall( 2, 1, 0 ) != 0 )
lst.SendErrorEvent( wxT("wrong hit function") );
int argCount = lua_gettop(L);
bool hit = lst.GetBooleanType(9);
//wxLogDebug( "hit %d", hit );
if (hit)
return true;
return false;
}
Hi, I think we should add a link to this, for subscribing to the lists. http://sourceforge.net/mail/?group_id=140042 Someone one the wxusers list did have trouble finding it. And i agree it is not so obvious to click on the word "mail" somewhere to get there. Like in the support page. Klaas
On 2/23/06, Francesco Montorsi <f18...@ya...> wrote: > John Labenski ha scritto: > > On 2/21/06, klaas.holwerda <kho...@xs...> wrote: > >>>> If so we might pay less attention to VC6 which is not to good i thin= k. > >>> I think MSVC6 is going to be completely 'deprecated' in few years... > >> That is what i think too. But at the moment? > >>> maybe we could: > >>> a) move msvc6 project files in the new build\msvc6 folders > >>> b) convert msvc6 project files and add them in the build\msvc7/8 fold= ers > >> Good idea. > >>> Unfortunately AFAIK MSVC.NET and MSVC2005 use two different formats..= . > >>> I'm going to see if I can add these formats to bakefile. > > > > But, don't they both support converting from dsp files to their sln > > files? I use 2005, the free one new and I've also used .NET (a few > > years back) and both converted the dsp files just fine. You had to be > > careful about deleting the sln files if you edited the dsp files, but > > that wasn't a big deal. > yes, they support it but having the SLN file directly is more > comfortable for the end user, isn't it? > > Please let me know if you agree to do this change (build\msvc6 and > build\msvc8) since I need to know that before completing install.html doc Well, sure, if it's easy to do, why not? I usually go for the minimal approach, I got a lot on my plate right now. John Labenski