Re: [wxlua-users] operator--(int)

2008-10-30 Thread John Labenski
On Thu, Oct 30, 2008 at 3:09 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > John Labenski wrote: >>> obj = iter3:op_mul() >> >> This should error out since op_mul() expects an argument. > > No it really works. And operator*() generates things different compared too > operator*( const a2dAffineMa

Re: [wxlua-users] operator--(int)

2008-10-30 Thread klaas.holwerda
John Labenski wrote: >> obj = iter3:op_mul() > > This should error out since op_mul() expects an argument. No it really works. And operator*() generates things different compared too operator*( const a2dAffineMatrix& m ) Which is what i need, only the naming i don't like. > >> If possible addi

Re: [wxlua-users] operator--(int)

2008-10-29 Thread John Labenski
On Wed, Oct 29, 2008 at 5:49 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > John Labenski wrote: >> I will look into the adding both pre and post increment/decrement >> operators however. >> > All the better. Should work now. op_inc/dec are for post inc/decrementing and op_preinc/dec are for pre

Re: [wxlua-users] operator--(int)

2008-10-29 Thread klaas.holwerda
John Labenski wrote: > I will look into the adding both pre and post increment/decrement > operators however. > > All the better. And if its not asking to much, i would be great if you could distinguish between *() and *( arg). As i said, to dereference, i now need to use op_mul, which looks a

Re: [wxlua-users] operator--(int)

2008-10-28 Thread John Labenski
On Tue, Oct 28, 2008 at 4:45 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > klaas.holwerda wrote: >> > It looks like this post inc solved itself, i out commented it in my > binding files, and things still work. > So it seems STL does not really need this operator after all. > I think i am getting

Re: [wxlua-users] operator[]

2008-10-28 Thread John Labenski
On Mon, Oct 27, 2008 at 3:57 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > John Labenski wrote: >> I changed it so that it does not create a "new" instance of the >> returned pointer and try to run the copy constructor on it, but rather >> it just pushes the pointer to the object into Lua. This m

Re: [wxlua-users] operator--(int)

2008-10-28 Thread klaas.holwerda
klaas.holwerda wrote: > John Labenski wrote: > >> On Sat, Oct 25, 2008 at 1:05 PM, klaas.holwerda <[EMAIL PROTECTED]> >> wrote: >> >>> Hi John, >>> >>> %operator a2dCanvasObjectListIter& operator--(int) >>> >>> If you change it to generate this, down here, it will work: >>> >>> *returns =

Re: [wxlua-users] operator--(int)

2008-10-27 Thread klaas.holwerda
> By the way, have you found a link that exhaustively goes through the > C++ code for each operator? I can only find lists of the operators or > discussions about particular cases, but there's always some nuances > that aren't discussed. > Via: http://en.wikipedia.org/wiki/Operators_in_C_and_C

Re: [wxlua-users] operator[]

2008-10-27 Thread klaas.holwerda
John Labenski wrote: > I changed it so that it does not create a "new" instance of the > returned pointer and try to run the copy constructor on it, but rather > it just pushes the pointer to the object into Lua. This means that the > object must exist for the life of any Lua calls to it. > > Hope

Re: [wxlua-users] operator--(int)

2008-10-27 Thread klaas.holwerda
John Labenski wrote: > On Sat, Oct 25, 2008 at 1:05 PM, klaas.holwerda <[EMAIL PROTECTED]> > wrote: >> Hi John, >> >> %operator a2dCanvasObjectListIter& operator--(int) >> >> If you change it to generate this, down here, it will work: >> >> *returns = ((*self).operator++(arg1)); > > I don't think

Re: [wxlua-users] operator--(int)

2008-10-27 Thread Klaas Holwerda
John Labenski wrote: On Sat, Oct 25, 2008 at 1:05 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: Hi John, %operator a2dCanvasObjectListIter& operator--(int) If you change it to generate this, down here, it will work: *returns = ((*self).operator++(arg1)); I don't think that post-incrementin

Re: [wxlua-users] operator--(int)

2008-10-26 Thread John Labenski
On Sat, Oct 25, 2008 at 1:05 PM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > Hi John, > > %operator a2dCanvasObjectListIter& operator--(int) > > If you change it to generate this, down here, it will work: > > *returns = ((*self).operator++(arg1)); I don't think that post-incrementing makes much s

Re: [wxlua-users] operator[]

2008-10-26 Thread John Labenski
On Sun, Oct 26, 2008 at 10:52 AM, klaas.holwerda <[EMAIL PROTECTED]> wrote: > Hi John, > > The index operator almost works. > The line: >a2dLayerInfo* returns = new a2dLayerInfo((*self)[(indx)]); > should become this: >a2dLayerInfo* returns = new a2dLayerInfo(*(*self)[(indx)]); > > The copy

[wxlua-users] operator[]

2008-10-26 Thread klaas.holwerda
Hi John, The index operator almost works. The line: a2dLayerInfo* returns = new a2dLayerInfo((*self)[(indx)]); should become this: a2dLayerInfo* returns = new a2dLayerInfo(*(*self)[(indx)]); The copy constructor needs a reference, while my inde operator return a pointer. If it would retu

[wxlua-users] operator--(int)

2008-10-25 Thread klaas.holwerda
Hi John, %operator a2dCanvasObjectListIter& operator--(int) If you change it to generate this, down here, it will work: *returns = ((*self).operator++(arg1)); Found in your interesting link http://www.acm.org/crossroads/xrds2-1/ovp.html static wxLuaArgType s_wxluatypeArray_wxLua_a2d

Re: [wxlua-users] operator bind

2008-05-15 Thread andre arpin
Hi John, > Humm, I hadn't thought about adding the typecasting operators. The Lua > syntax might be a little weird for this though, "obj:op_double()", > maybe it might make more sense to add a more readable function > obj:GetAsDouble() or something. > Note that if you choose GetAsDouble then ob

Re: [wxlua-users] operator bind

2008-05-12 Thread John Labenski
On Tue, May 6, 2008 at 9:18 AM, Klaas Holwerda <[EMAIL PROTECTED]> wrote: > Hi John, > > This first few wrap fine. > > %operator a2dDoMu& operator=( const a2dDoMu& ); > %operator a2dDoMu& operator=( const wxChar* ); > %operator a2dDoMu& operator=( double ); > %operator int operat

[wxlua-users] operator bind

2008-05-06 Thread Klaas Holwerda
Hi John, This first few wrap fine. %operator a2dDoMu& operator=( const a2dDoMu& ); %operator a2dDoMu& operator=( const wxChar* ); %operator a2dDoMu& operator=( double ); %operator int operator==( const a2dDoMu& ) const; %operator int operator!=( const a2dDoMu& ) const; But