paragui-users
[Top][All Lists]
Advanced

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

Re: *****SPAM***** [paragui-users] Signals and Slots


From: Alexander Pipelka
Subject: Re: *****SPAM***** [paragui-users] Signals and Slots
Date: Mon, 18 Jul 2005 10:09:30 +0200

Assuming rdoNation is a PG_RadioButton:

bool clsStartUp::handle_selectitem( PG_RadioButton* b )
{
    int id = b->GetID();
    player->setNation( id );
}

Got it ?

Am Sonntag, den 17.07.2005, 12:02 +0300 schrieb Dimitris Mexis:
> 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 )
> {
>     PG_RadioButton* b = (PG_RadioButton*)clientdata;
>     int id = b->GetID();
>     player->setNation( id );
> }
> 
> Why doesn't it work? It gives me :
> clstown.cpp:212: Fehler: keine passende Funktion f\uffffr Aufruf von 
> \uffffPG_RadioButton::SignalButtonClick<bool>::connect(SigC::Slot1<bool, 
> void*>, void*)\uffff
> /usr/include/paragui/pgsignals.h:94: Anmerkung: Kandidaten sind: 
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot3<bool, P1, P2, datatype>&, datatype) [with P1 = 
> PG_RadioButton*, P2 = bool, datatype = void*]
> /usr/include/paragui/pgsignals.h:98: Anmerkung:                  
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot2<bool, P1, datatype>&, datatype) [with P1 = PG_RadioButton*, 
> P2 = bool, datatype = void*]
> /usr/include/paragui/pgsignals.h:102: Anmerkung:                  
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot2<bool, P1, datatype>&) [with P1 = PG_RadioButton*, P2 = bool, 
> datatype = void*]
> /usr/include/paragui/pgsignals.h:106: Anmerkung:                  
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot1<bool, datatype>&) [with P1 = PG_RadioButton*, P2 = bool, 
> datatype = void*]
> /usr/include/paragui/pgsignals.h:110: Anmerkung:                  
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot1<bool, datatype>&) [with P1 = PG_RadioButton*, P2 = bool, 
> datatype = void*]
> /usr/include/paragui/pgsignals.h:114: Anmerkung:                  
> SigC::Connection PG_Signal2<P1, P2, datatype>::connect(const 
> SigC::Slot0<bool>&) [with P1 = PG_RadioButton*, P2 = bool, datatype = void*]
> In the end....HOW can anyone connect a RADIOBUTTON or something that has 
> clientdata to a slot!? Please do not send me back to the examples, 
> because the signals and slot mechanisms are for....buttons(!) The only 
> thing that I saw worth to investigate is building a MyClass, but is this 
> the right way ? How could I? In the end is there anyone who used the 
> radiobutton and clientdata?  Someone?
> 
> 
> _______________________________________________
> paragui-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/paragui-users
> 
-- 
Alexander Pipelka

BMS Bayer GmbH
Thimiggasse 35/12
A-1180 Wien

Phone:  +43 1 524 81 3400
Fax:    +43 1 524 81 3480
Web:    www.bms-austria.com






reply via email to

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