paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [paragui-users] Signals and Slots


From: Ulf Lorenz
Subject: Re: [paragui-users] Signals and Slots
Date: Sun, 17 Jul 2005 13:13:39 +0200
User-agent: Mutt/1.5.9i

On Sun, Jul 17, 2005 at 12:02:56PM +0300, Dimitris Mexis wrote:
> clsStartUp::clsStartUp( struct GfxOptions & gfxOptions, PG_Widget * 
> parent, PG_Rect r, char * windowtext ):
> pgWindow( parent, r, windowtext) <---------Just the constructor, just to 
> show you where it lies
> 
> this is my line that emits a signal...
> {
> rdoNation->sigClick.connect( slot( *this, &clsStartUp::handle_selectitem 
> ) );
>    PG_RadioButton & rdm = rdoNation[0];
> }
> 
> This is the slot...
> bool clsStartUp::handle_selectitem( PG_Pointer clientdata )
                                      ^^^^^^^^^^^^^^^^^^^^^

Maybe you are missing an asterisk here. 'PG_Pointer' is defined as 'void'.
However, what you want is a 'void*'.
Does rewriting this to "PG_Pointer* clientdata" help?


By the way, paragui signals also allow you to take the PG_RadioButton
directly. I.e. a PG_RadioButton::sigClick automatically supplies the
instance that triggered it, so that the line

bool clsStartUp::handle_selectitem( PG_RadioButton* btn )

should also work; this saves a useless cast.


Ulf

-- 
recursive:
            see recursive




reply via email to

[Prev in Thread] Current Thread [Next in Thread]