SourceForge logo
SourceForge logo
Menu

wxlua-users — wxLua list for users and developers

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
3
4
(1)
5
6
7
(4)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(1)
23
(1)
24
(2)
25
(2)
26
(3)
27
(3)
28
(1)
29
(1)
30



Showing 19 results of 19

From: Andre A. <ar...@ki...> - 2009年09月29日 19:19:59
> 
> The "self" can be a wxComboBox, wxChoice, wxListBox... and the
> wxItemContainerImmutable class is along the chain of second base
> classes for all of them. All wxLua userdata objects that wrap C++
> objects have a metatable that stores the classes' wxLuaBindClass
> struct (wxlbind.h) which can contain whatever you want, but remember
> that this struct is also stored in Lua as a void* pointer. Also, you
> can't overload C++ functions by return value. The problem is how to
> replace the line getting the "self" with something that first casts
> the object on the stack to its original class type (wxComboBox,
> wxChoice, whatever it may be) before casting it to a
> wxItemContainerImmutable. Finally, this function/baseclass may be in
> one library, but a different binding (wxcore and wxadv for example)
> may have a class with it as it's base class. We don't even know at
> compile time who uses this as a base class so we can't add a
> case/if/else statement to properly cast it.
> 
This is a very good solution and the overhead is pretty minor. It is also 
clean. If you are debugging in C you can always explicitly cast the various 
pointers and look at the information.
I sure cannot think of a better way to so it. You could store a delta instead 
of a pointer and save a few bytes but it would make the whole thing very 
obscure.
This looks great.
Andre
From: Andre A. <ar...@ki...> - 2009年09月28日 01:14:30
Andre Arpin <arpin@...> writes:
> 
> Andre
> 
This previous message is redundant an was sent because the previous one did no 
appear within 24 hrs. Sorry for the noise.
Andre
From: Andre A. <ar...@ki...> - 2009年09月27日 12:40:49
John Labenski <jlabenski@...> writes:
> 
> wxLua 2.8.10 introduced multiple inheritance in the C++ bindings which
> wxWidgets uses for the wxComboBox, wxChoice, and wxBitmapComboBox
> classes. However, I was not aware that C++ compilers shift the vtable
> of the second and higher base classes and therefore if you directly
> cast a void* pointer to an object to its second or higher base class
> you will segfault when you try to call one of its functions. I have
> finally come across a solution that does work for GCC and MSVC, but it
> is compiler implementation dependent. The only other compiler that I
> think we may care about is the Intel one, which I cannot test. The
> bottom line is that the code will probably not even compile or
> immediately segfault when called if GCC or MSVC change their code
> generation (unlikely), which is fine since we can fix it then, for the
> foreseeable future this will work even though it may upset C++
> purists.
> 
Maybe I do not undestand the problem clearly.
As you mentioned v-tables vary from compiler to compiler and sometime the 
linker changes them as well. They are not only incompatible across compiler 
they have been known to be incompatible from version to version. It is very 
difficult and sometime impossible to past (void *) pointers and then cast them 
properly. "dynamic_cast" tries to address this problem but does not always do 
it across compilers. Since you know which class you want to access dynamic 
cast seems to be the best choice.
// TestCasting->cpp
//
#include "stdafx.h"
class A { public: int x; }; 
class B { public: int y; }; 
class AB : public A, public B { public: int z; };
void f(void *p)
{
	AB* ab = (AB *)p;
	A* a = dynamic_cast<A*>(ab);
	B* b = dynamic_cast<B*>(ab);
	printf("%x\n", p);	// 347e28
	printf("%x\n", ab);	// 347e28
	printf("%x\n", a);	// 347e28
	printf("%x\n", b);	// 347e2c
}
int _tmain(int argc, _TCHAR* argv[])
{
	AB *ab = new AB() ;
	f((void *)ab);
	return 0;
}
If you knew which class is being past to procedure f typing the argument would 
save you the first cast and provide some checking redundancy.
Andre
From: John L. <jla...@gm...> - 2009年09月27日 03:40:23
Fixed in CVS now.
Thanks,
 John
On Fri, Sep 25, 2009 at 9:36 AM, Andre Arpin <ar...@ki...> wrote:
> jlabenski <jlabenski@...> writes:
>
>> This is a good idea, I currently am in the middle of reworking getting
>> multiple base classes together so I can't commit anything else, but
>> I'll try to remember. I've also not forgotten your sample game,
>> thanks, it's just that I want to really get the multiple base classes
>> working first.
>>
>> Thanks,
>>   John
>
> As you well expected I am not in a rush.
>
> I hope that you can get the binding redone this is a huge amount of work. We
> all appreciate your efforts.
>
> Best of luck
>
> Andre
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> wxlua-users mailing list
> wxl...@li...
> https://lists.sourceforge.net/lists/listinfo/wxlua-users
>
From: John L. <jla...@gm...> - 2009年09月27日 02:09:29
On Tue, Aug 25, 2009 at 8:30 AM, John Labenski <jla...@gm...> wrote:
> On Tue, Aug 25, 2009 at 7:52 AM, Klaas Holwerda<db...@nl...> wrote:
>> Hi John,
>>
>> Would it be possible to change the hook_cpp_binding_includes to a bit higher
>> in the generated binding? Or maybe add an extra variable??
>
> I don't see why we couldn't move hook_cpp_binding_includes earlier
> since we already have hook_cpp_binding_post_includes. You can do this
> locally for now, I will change that when I get back home in a week.
>
I got to this a little later than I'd hoped, but it's done now. I
simply moved it to be first code in the generated cpp files.
Regards,
 John
From: John L. <jla...@gm...> - 2009年09月26日 15:47:34
On Sat, Sep 26, 2009 at 9:00 AM, Andre Arpin <ar...@ki...> wrote:
> John Labenski <jlabenski@...> writes:
>
> Maybe I do not understand the problem but here is my suggestion.
> Why not use dynamic cast since you seem to know which class.
> C casting is a brute force method.
We only know the class type at runtime, but dynamic_cast<> casts at
compile time.
> v-table are sometime incompatible from compiler to compiler and even across
> compiler versions but using C-casting is not likely to improve portability.
I know, but the only way I can think of properly casting the void*
pointer from Lua is to add duplicate binding functions that do the
casting at compile time. The way I see it is; if it breaks in the
future or doesn't work with the Intel compiler, back to the drawing
board.
>
> // TestCasting->cpp
>
> #include "stdafx.h"
> class A { public: int x; };
> class B { public: int y; };
> class AB : public A, public B { public: int z; };
>
> void f(void *p)
> {
>    AB* ab = (AB *)p;
>    A* a = dynamic_cast<A*>(ab);
>    B* b = dynamic_cast<B*>(ab);
This is what we can't do. For example,
wxLua_wxItemContainerImmutable_FindString(), line 981 in
http://wxlua.cvs.sourceforge.net/viewvc/wxlua/wxLua/modules/wxbind/src/wxcore_controls.cpp?revision=1.20&view=markup
981 static int LUACALL wxLua_wxItemContainerImmutable_FindString(lua_State *L)
 982 {
 983 // get number of arguments
 984 int argCount = lua_gettop(L);
 985 // bool bCase = false
 986 bool bCase = (argCount >= 3 ? wxlua_getbooleantype(L, 3) : false);
 987 // const wxString s
 988 const wxString s = wxlua_getwxStringtype(L, 2);
 989 // get this
 990 wxItemContainerImmutable * self = (wxItemContainerImmutable
*)wxluaT_getuserdatatype(L, 1, wxluatype_wxItemContainerImmutable);
 991 // call FindString
 992 int returns = (self->FindString(s, bCase));
 993 // push the result number
 994 lua_pushnumber(L, returns);
 995
 996 return 1;
 997 }
The "self" can be a wxComboBox, wxChoice, wxListBox... and the
wxItemContainerImmutable class is along the chain of second base
classes for all of them. All wxLua userdata objects that wrap C++
objects have a metatable that stores the classes' wxLuaBindClass
struct (wxlbind.h) which can contain whatever you want, but remember
that this struct is also stored in Lua as a void* pointer. Also, you
can't overload C++ functions by return value. The problem is how to
replace the line getting the "self" with something that first casts
the object on the stack to its original class type (wxComboBox,
wxChoice, whatever it may be) before casting it to a
wxItemContainerImmutable. Finally, this function/baseclass may be in
one library, but a different binding (wxcore and wxadv for example)
may have a class with it as it's base class. We don't even know at
compile time who uses this as a base class so we can't add a
case/if/else statement to properly cast it.
In any case, I don't mean to discourage you, but *I* can't figure out
another way. The way it's done now has minimal overhead, two extra
pointers per class which are NULL unless the class has two or more
base classes. There is only a performance penalty when actually
calling a function of a second or higher class, but again this trivial
as we only have to look through an array with a length equal to the
number of classes along the second or higher base class chain, which
is only a few items.
Regards,
 John
From: Attila <ejj...@gm...> - 2009年09月26日 13:10:07
Hello!
I want to fill out & send a html form to a webpage. I mean I made some 
controls, the user write here the data I need. Then, when it finished, I 
can check if everything is OK. If that, I want to post it to a webpage. 
But I don't know hot to do it. Us that possible to make a wxHtmlWindow, 
and fill the fields if I know the order of the controls? I mean to send 
key commands like:
Username: asdfgh {Tab}
Password: hgfdsa {Tab}
{Enter}
(the above one was just an example). Or I should play with luasocket?
Thanks for the replyes: Attila
From: Andre A. <ar...@ki...> - 2009年09月26日 13:00:50
John Labenski <jlabenski@...> writes:
> 
> wxLua 2.8.10 introduced multiple inheritance in the C++ bindings which
> wxWidgets uses for the wxComboBox, wxChoice, and wxBitmapComboBox
> classes. However, I was not aware that C++ compilers shift the vtable
> of the second and higher base classes and therefore if you directly
> cast a void* pointer to an object to its second or higher base class
> you will segfault when you try to call one of its functions. I have
> finally come across a solution that does work for GCC and MSVC, but it
> is compiler implementation dependent. The only other compiler that I
> think we may care about is the Intel one, which I cannot test. The
> bottom line is that the code will probably not even compile or
> immediately segfault when called if GCC or MSVC change their code
> generation (unlikely), which is fine since we can fix it then, for the
> foreseeable future this will work even though it may upset C++
> purists.
Maybe I do not understand the problem but here is my suggestion.
Why not use dynamic cast since you seem to know which class.
C casting is a brute force method.
v-table are sometime incompatible from compiler to compiler and even across 
compiler versions but using C-casting is not likely to improve portability.
// TestCasting->cpp
#include "stdafx.h"
class A { public: int x; }; 
class B { public: int y; }; 
class AB : public A, public B { public: int z; };
void f(void *p)
{
	AB* ab = (AB *)p;
	A* a = dynamic_cast<A*>(ab);
	B* b = dynamic_cast<B*>(ab);
	printf("%x\n", p);	// 347e28
	printf("%x\n", ab);	// 347e28
	printf("%x\n", a);	// 347e28
	printf("%x\n", b);	// 347e2c
}
int _tmain(int argc, _TCHAR* argv[])
{
	AB *ab = new AB() ;
	f((void *)ab);
	return 0;
}
I would expect dynamic_cast to be more portable then any explicit pointer 
manipulation.
even better if you know that f expect AB * then code define f as:
void f(AB *p)
Andre
From: John L. <jla...@gm...> - 2009年09月25日 18:45:30
wxLua 2.8.10 introduced multiple inheritance in the C++ bindings which
wxWidgets uses for the wxComboBox, wxChoice, and wxBitmapComboBox
classes. However, I was not aware that C++ compilers shift the vtable
of the second and higher base classes and therefore if you directly
cast a void* pointer to an object to its second or higher base class
you will segfault when you try to call one of its functions. I have
finally come across a solution that does work for GCC and MSVC, but it
is compiler implementation dependent. The only other compiler that I
think we may care about is the Intel one, which I cannot test. The
bottom line is that the code will probably not even compile or
immediately segfault when called if GCC or MSVC change their code
generation (unlikely), which is fine since we can fix it then, for the
foreseeable future this will work even though it may upset C++
purists.
Below is a comment in wxlstate.cpp describing in more detail the
problem and the solution that I have just committed to CVS.
// Note about multiple inheritance in wxLua :
// See wxLuaBindClass::baseclass_vtable_offsets
//
// class A { int x; }; class B { int y; }; class AB : public A, public
B { int z; };
// AB ab; void *v_ab_a = (A*)&ab; void *v_ab_b = (B*)&ab;
// long int dummy = 0;
// long int AB_diff = ((long int)(B*)(AB*)&dummy) - ((long int)(A*)(AB*)&dummy);
// wxPrintf(wxT("AB*=%p, A*=%p, B*=%p, B*-A*=%d\n"), &ab, v_ab_a,
v_ab_b, AB_diff);
// prints: "AB*=0x614dfc, A*=0x614dfc, B*=0x614e00, B*-A*=4"
//
// In order to call B's functions from a void* pointer to an AB object :
// 1) Ideally, we cast to an AB object and the compiler will
appropriately lookup
// and handle calls to B's functions.
// 2) Cast to an AB object then to a B object where the compiler has already
// shifted the pointer and calls to B's functions are made directly.
// 3) Explicitly shift the void* pointer to the AB object to where the
vtable for
// B is. We now have an object that only knows about B and what B
was derived from.
// I'm sure this is frowned upon by C++ enthusiasts.
//
// Ways doing 1 and 2 in wxLua with C++ constraints, wxLua does #3 above.
//
// 1) wxLua would duplicate all the the binding functions for second
// and higher base classes and therefore each binding function will cast the
// void* we get from Lua to exactly the object type that it is. This is best,
// but it adds bloat.
// 2) Come up with a clever way using overloaded functions, templates,
// or some sort of variant class to convert the void* pointer from Lua to
// type of object that it really is (we know by the wxLuaType integer)
// and then the binding function will cast it whatever base class it may be.
// The problem is that we really need to overload this casting function by
// return type, the function takes void* and returns ClassXYZ*, but this
// is not allowed in C++.
// 3) Store an array of the offsets in each classes' wxLuaBindClass struct
// to the second or higher base classes and automatically add this offset in
// wxluaT_getuserdatatype(). The offsets are calculated at compile time
// using the AB_diff method above.
//
// Various ways to cast a void* pointer to the second base class :
// void* v_ab = &ab; // compilier doesn't know what v_ab is anymore
// AB* ab = (AB*)v_ab; // ok since we cast right back to original type
// A* a = (A*)v_ab; // ok in GCC & MSVC since we are casting to 1st
base class
// B* b = (B*)v_ab; // segfault! since B*'s vtable is +4 bytes as shown above
// B* b1 = (B*)(AB*)v_ab; // ok since compiler converts to AB* and
knows that B* is shifted
// B* b2 = (B*)((long int)v_ab + AB_diff); // ok since we've shifted to B
Regards,
 John
From: Andre A. <ar...@ki...> - 2009年09月25日 14:06:02
jlabenski <jlabenski@...> writes:
> This is a good idea, I currently am in the middle of reworking getting
> multiple base classes together so I can't commit anything else, but
> I'll try to remember. I've also not forgotten your sample game,
> thanks, it's just that I want to really get the multiple base classes
> working first.
> 
> Thanks,
> John
As you well expected I am not in a rush. 
I hope that you can get the binding redone this is a huge amount of work. We 
all appreciate your efforts.
Best of luck
Andre
From: jlabenski <jla...@gm...> - 2009年09月24日 15:27:22
On Thu, Sep 24, 2009 at 10:37 AM, Andre Arpin <ar...@ki...> wrote:
> I often use the console to debug program which manipulate text.
>
> The display uses a variable size font, which is pretty, but very hard to check
> for character position.
>
> Could you change the console font to a fix width font.
>
> adding the line
>    m_textCtrl->SetFont(wxFont(10, wxTELETYPE, wxNORMAL, wxNORMAL));
> after the m_textCtrl is created would do the trick.
>
This is a good idea, I currently am in the middle of reworking getting
multiple base classes together so I can't commit anything else, but
I'll try to remember. I've also not forgotten your sample game,
thanks, it's just that I want to really get the multiple base classes
working first.
Thanks,
 John
From: Andre A. <ar...@ki...> - 2009年09月24日 14:37:59
I often use the console to debug program which manipulate text. 
The display uses a variable size font, which is pretty, but very hard to check 
for character position.
Could you change the console font to a fix width font.
adding the line
	m_textCtrl->SetFont(wxFont(10, wxTELETYPE, wxNORMAL, wxNORMAL));
after the m_textCtrl is created would do the trick.
Andre
From: John L. <jla...@gm...> - 2009年09月23日 05:20:40
On Tue, Sep 22, 2009 at 11:45 AM, Klaas Holwerda
<db...@nl...> wrote:
> Hi John,
>
> Is there a way to wrap the objects mentioned below in several wrap files?
> The actual wrapping of the class is in one of them.
> If this is not so simple, i will make a unique *.i file just for this class.
> But it looks more like a general issue, so maybe it can be solved more
> elegantly.
I believe that it can be made to work. I just figured out how to
implement dual base classes without too much overhead. I'll look into
this next.
Regards,
 John
From: Klaas H. <db...@nl...> - 2009年09月22日 15:46:43
Attachments: db348.vcf
Hi John,
Is there a way to wrap the objects mentioned below in several wrap files?
The actual wrapping of the class is in one of them.
If this is not so simple, i will make a unique *.i file just for this class.
But it looks more like a general issue, so maybe it can be solved more elegantly.
Thanks,
Klaas
I need to wrap many of my command id's/items in headers available as:
extern const a2dMenuIdItem CmdMenu_ChangeCanvasObjectStyle;
extern const a2dMenuIdItem CmdMenu_ChangeCentralStyle;
Now as you say in binding docs, that needs to be done with %define_object 
between %class a2dMenuIdItem and %endclass, but i can not combine them with the 
class wrap/definition itself.
My a2dMenuIdItem are spread across several modules as follows, and that gives 
linking problems:
In file docview.i:
%class %noclassinfo %delete a2dMenuIdItem
 %define_object CmdMenu_Exit;
 %define_object CmdMenu_FileClose;
-- and all methods etc. of the a2dMenuIdItem class
%endclass
In file canvas.i:
%class %noclassinfo %delete a2dMenuIdItem
 %define_object CmdMenu_ChangeCanvasObjectStyle;
 %define_object CmdMenu_ChangeCentralStyle;
%endclass
In file editor.i:
%class %noclassinfo %delete a2dMenuIdItem
 %define_object CmdMenu_PopTool;
 %define_object CmdMenu_InsertGroupRef;
%endclass
Generating the binding gives warnings:
1>canvas.obj : warning LNK4006: "int wxluatype_a2dMenuIdItem" 
(?wxluatype_a2dMenuIdItem@@3HA) already defined in editor.obj; second definition 
ignored
1>canvas.obj : warning LNK4006: "struct wxLuaBindMethod * a2dMenuIdItem_methods" 
(?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in editor.obj; 
second definition ignored
1>canvas.obj : warning LNK4006: "int a2dMenuIdItem_methodCount" 
(?a2dMenuIdItem_methodCount@@3HA) already defined in editor.obj; second 
definition ignored
1>docview.obj : warning LNK4006: "int wxluatype_a2dMenuIdItem" 
(?wxluatype_a2dMenuIdItem@@3HA) already defined in editor.obj; second definition 
ignored
1>docview.obj : warning LNK4006: "struct wxLuaBindMethod * 
a2dMenuIdItem_methods" (?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already 
defined in editor.obj; second definition ignored
1>docview.obj : warning LNK4006: "int a2dMenuIdItem_methodCount" 
(?a2dMenuIdItem_methodCount@@3HA) already defined in editor.obj; second 
definition ignored
BUT when linking the library to the application i get errors:
1> Searching ..\..\..\lib\Debug\wxart2d_msw28d_luawraps.lib:
1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "int 
wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "struct 
wxLuaBindMethod * a2dMenuIdItem_methods" 
(?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
1>wxart2d_msw28d_luawraps.lib(docview.obj) : error LNK2005: "int 
a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "int 
wxluatype_a2dMenuIdItem" (?wxluatype_a2dMenuIdItem@@3HA) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "struct 
wxLuaBindMethod * a2dMenuIdItem_methods" 
(?a2dMenuIdItem_methods@@3PAUwxLuaBindMethod@@A) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
1>wxart2d_msw28d_luawraps.lib(editor.obj) : error LNK2005: "int 
a2dMenuIdItem_methodCount" (?a2dMenuIdItem_methodCount@@3HA) already defined in 
wxart2d_msw28d_luawraps.lib(canvas.obj)
-- 
Unclassified
------------------------------------------------------------------------------------------------------------
Disclaimer:
If you are not the intended recipient of this email, please notify the sender and delete it. 
Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. 
Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). 
Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578.
------------------------------------------------------------------------------------------------------------
From: John L. <jla...@gm...> - 2009年09月07日 16:12:35
On Fri, Sep 4, 2009 at 2:00 AM, Andrew
MacIsaac<mac...@gm...> wrote:
> Hi,
>
> I am trying to build wxLua 2.8.10.0 from source on Mac OS X 10.5.8, and am
> encountering the following problem:
>
> Despite specifying --disable-wxbindstc to the configure script, the make
> command still tries to build the wxSTC bindings, which fail. The exact
> procedure I followed is listed below.
I'll have to look into this, it should work.
>
> P.S. How do I enable building the Lua compiler (luac) when using the
> internal lua?
You can use the Makefile in modules/lua/src for now. I was not aware
that it is not built when using configure.
> P.P.S. I should also point out that the wxWidgets library has to be compiled
> with version 2.6 compatibility turned on in order for the wxLua bindings for
> wxSashWindow to build.
I wouldn't doubt it, the bindings have come up since wxWidgets 2.2 and
I try to maintain some backwards compatibility. With wxWidgets 3.0 I
will get rid of all of the deprecated wxWidgets classes in wxLua.
Regards,
 John Labenski
From: Attila <ejj...@gm...> - 2009年09月07日 16:06:10
As John said you can use them, and I can affirm this. Use the following 
form everywhere you need, eg.:
wx.wxFile("./subdir/file.ext")
It will work with standard Lua calls like:
io.open("./subdir/file.ext")
The / sign is accepted on Linux and Windows as well. The base dir is 
always that directory where the exe is. I used relative paths in my 
applications, and they always worked.
Regards: Attila
From: John L. <jla...@gm...> - 2009年09月07日 16:00:50
On Mon, Sep 7, 2009 at 11:15 AM, Daniel Aquino<mr....@gm...> wrote:
> is it possible to use relative paths ?
It probably depends what you're using the paths with? The wxFileName
class or something else?
> imagine i have a top level folder and then sub folders...
>
> if i just want to point to a sub folder can i do that ?
>
> or do i have to build something like  $current_Dir/sub ?
Many wxWidgets functions can use relative paths to the current working
directory which you can find with wxGetCwd().
Regards,
 John Labenski
From: Daniel A. <mr....@gm...> - 2009年09月07日 15:16:07
is it possible to use relative paths ?
imagine i have a top level folder and then sub folders...
if i just want to point to a sub folder can i do that ?
or do i have to build something like $current_Dir/sub ?
From: Andrew M. <mac...@gm...> - 2009年09月04日 06:00:19
Hi,
I am trying to build wxLua 2.8.10.0 from source on Mac OS X 10.5.8, and am
encountering the following problem:
Despite specifying --disable-wxbindstc to the configure script, the make
command still tries to build the wxSTC bindings, which fail. The exact
procedure I followed is listed below.
1. I built and installed wxWidgets 2.8.10.0:
tar -xzf wxMac-2.8.10.tar.gz
cd wxMac-2.8.10/
mkdir osx-build
cd osx-build/
../configure --enable-monolithic --disable-debug --enable-shared
--enable-unicode
make
sudo make install
2. I then tried to build wxLua:
tar -xzf wxLua-2.8.10.0-src.tar.gz
cd wxLua/
mkdir osx-build/
./configure --prefix=/cross/osx --disable-debug --enable-shared
--enable-unicode --disable-wxlua-app --disable-wxluacan-app
--disable-wxluaedit-app --disable-wxluafreeze-app --disable-wxluadebug
--disable-wxluasocket --enable-monolithic-luamodule --disable-wxbindstc
make
The configure script produced the following summary:
 ----------------------------------------------------------------
 Configuration for wxLua 2.8.10.0 successfully completed.
 Summary of main configuration settings for wxLua:
 - RELEASE build
 - UNICODE mode
 - SHARED mode
 - Lua interpreter: yes
 - Lua compiler: no
 - wxLua application: no
 - wxLuaCan application: no
 - wxLuaEdit application: no
 - wxLuaFreeze application: no
 - Using BUILT-IN lua library
 - enable_wxbindadv module: yes
 - enable_wxbindaui module: yes
 - enable_wxbindbase module: yes
 - enable_wxbindcore module: yes
 - enable_wxbindgl module: no
 - enable_wxbindhtml module: yes
 - enable_wxbindmedia module: no
 - enable_wxbindnet module: yes
 - enable_wxbindrichtext module: yes
 - enable_wxbindstc module: no
 - enable_wxbindxml module: yes
 - enable_wxbindxrc module: yes
 - compact list of the wxWidgets libraries for which
 binding modules will be created:
 richtext,xrc,xml,net,html,aui,adv,core,base
 - enable_wxluadebug module: no
 - enable_wxluasocket module: no
 - enable_luamodule module: yes
 - enable_monolithic_luamodule module: yes
 - install custom wxBind stuff: yes
 - wxLua make install path settings:
 prefix : '/cross/osx'
 exec_prefix : '${prefix}'
 libdir : '${exec_prefix}/lib'
 datadir : '${datarootdir}'
 The wxWidgets build which will be used by wxLua 2.8.10.0
 has the following settings:
 - RELEASE build
 - UNICODE mode
 - SHARED mode
 - VERSION: 2.8.10
 - PORT: mac
 Now, just run make.
 ----------------------------------------------------------------
Running make succeeds up until it tries to build wxstc_bind.cpp, when it
generates the following error:
/Users/awm/Development/Lua/wxLua/osx-build/bk-deps g++ -c -o
mod_luamodule_mono_wxstc_bind.o -I.pch/wxprec_mod_luamodule_mono
-I../../modules -I./../..
-I/Users/awm/Development/Lua/wxLua/osx-build/../modules/lua/include
-I../../modules/wxbind/setup -DWXMAKINGDLL_LUAMODULE -DWXMAKINGDLL_WXBINDADV
-DWXMAKINGDLL_WXBINDAUI -DWXMAKINGDLL_WXBINDBASE -DWXMAKINGDLL_WXBINDCORE
-DWXMAKINGDLL_WXBINDGL -DWXMAKINGDLL_WXBINDHTML -DWXMAKINGDLL_WXBINDMEDIA
-DWXMAKINGDLL_WXBINDNET -DWXMAKINGDLL_WXBINDRICHTEXT -DWXMAKINGDLL_WXBINDSTC
-DWXMAKINGDLL_WXBINDXML -DWXMAKINGDLL_WXBINDXRC -DWXMAKINGDLL_WXLUADEBUG
-DWXMAKINGDLL_WXLUASOCKET -DWXMAKINGDLL_WXLUA -dynamic -fPIC -DPIC
-I/usr/local/lib/wx/include/mac-unicode-release-2.8
-I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D__WXMAC__ -DwxLUA_USEBINDING_WXGL=0 -DwxLUA_USEBINDING_WXMEDIA=0
-DwxLUA_USEBINDING_WXSTC=0 -O2 -fno-common
../../modules/wxbind/src/wxstc_bind.cpp
In file included from ../../modules/wxbind/src/wxstc_bind.cpp:19:
../../modules/wxbind/include/wxstc_bind.h:46:24: error: wx/stc/stc.h: No
such file or directory
/usr/local/include/wx-2.8/wx/fontdlg.h: In constructor
‘wxFontDialogBase::wxFontDialogBase(wxWindow*, const wxFontData*)’:
/usr/local/include/wx-2.8/wx/fontdlg.h:67: warning: ‘__base_ctor ’ is
deprecated (declared at /usr/local/include/wx-2.8/wx/fontdlg.h:66)
../../modules/wxbind/src/wxstc_bind.cpp: In function ‘int
wxLua_wxStyledTextCtrl_AddRefDocument(lua_State*)’:
../../modules/wxbind/src/wxstc_bind.cpp:38: error: ‘wxStyledTextCtrl’ was
not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:38: error: ‘self’ was not declared
in this scope
../../modules/wxbind/src/wxstc_bind.cpp:38: error: expected
primary-expression before ‘)’ token
../../modules/wxbind/src/wxstc_bind.cpp:38: error: expected `;' before
‘wxluaT_getuserdatatype’
[... many similar errors ...]
../../modules/wxbind/src/wxstc_bind.cpp: In function ‘int
wxLua_wxStyledTextEvent_constructor(lua_State*)’:
../../modules/wxbind/src/wxstc_bind.cpp:8678: error: ‘wxStyledTextEvent’ was
not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:8678: error: ‘returns’ was not
declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:8678: error: expected type-specifier
before ‘wxStyledTextEvent’
../../modules/wxbind/src/wxstc_bind.cpp:8678: error: expected `;' before
‘wxStyledTextEvent’
../../modules/wxbind/src/wxstc_bind.cpp:8680: error: no matching function
for call to ‘wxluaO_addgcobject(lua_State*&, <type error>)’
../../modules/wxlua/include/wxlstate.h:301: note: candidates are: void
wxluaO_addgcobject(lua_State*, wxObject*)
../../modules/wxlua/include/wxlstate.h:302: note: void
wxluaO_addgcobject(lua_State*, void*, wxObject*)
../../modules/wxbind/src/wxstc_bind.cpp: In function ‘wxLuaBindEvent*
wxLuaGetEventList_wxstc(size_t&)’:
../../modules/wxbind/src/wxstc_bind.cpp:8767: error:
‘wxEVT_STC_AUTOCOMP_SELECTION’ was not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:8768: error:
‘wxEVT_STC_CALLTIP_CLICK’ was not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:8769: error: ‘wxEVT_STC_CHANGE’ was
not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:8770: error: ‘wxEVT_STC_CHARADDED’
was not declared in this scope
[... many similar errors ...]
./../modules/wxbind/src/wxstc_bind.cpp:10167: error: ‘wxSTC_YAML_REFERENCE’
was not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:10168: error: ‘wxSTC_YAML_TEXT’ was
not declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp: In function ‘wxLuaBindClass*
wxLuaGetClassList_wxstc(size_t&)’:
../../modules/wxbind/src/wxstc_bind.cpp:10257: error: ‘wxStyledTextCtrl’ has
not been declared
../../modules/wxbind/src/wxstc_bind.cpp:10257: error: ‘ms_classInfo’ was not
declared in this scope
../../modules/wxbind/src/wxstc_bind.cpp:10258: error: ‘wxStyledTextEvent’
has not been declared
make[1]: *** [mod_luamodule_mono_wxstc_bind.o] Error 1
make: *** [modules] Error 2
Any suggestions are welcome.
Thanks,
Andrew
P.S. How do I enable building the Lua compiler (luac) when using the
internal lua?
P.P.S. I should also point out that the wxWidgets library has to be compiled
with version 2.6 compatibility turned on in order for the wxLua bindings for
wxSashWindow to build.

Showing 19 results of 19

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 によって変換されたページ (->オリジナル) /