Hello again,
I am experiencing a problem with Wt 2.1.5 release version.
I have not found any mention of it on the message boards,
so i am posting it. My apologies in advance if its an error on
my part else, a description of the problem and sample code
follows:
A Wt application that has a WTimer running when, an event
is generated. The slot for that event creates and displays a
message box. When the message box button is clicked and
the box is deleted the following error appears 3x in the
wt::http debug window where the wt application is being run:
[error] "decodeSignal(): signal 's1' not exposed"
[error] "decodeSignal(): signal 's1' not exposed"
[error] "decodeSignal(): signal 's1' not exposed"
Then, the slot() for Wt::Timer::timeout signal is no longer
executed until the browsers' refresh button is clicked. I am
not sure if its simply a misuse of MessageBox on my part.
Thanks for your continued support !!!
Sample source follows:
//////playground.h/////////
#ifndef PLAYGROUND_H
#define PLAYGROUND_H
#include
#include
#include
#include
#include
#include
namespace wt_playground{
class Playground : public Wt::WContainerWidget{
public:
Playground(Wt::WContainerWidget* parent=0);
public slots:
void runSample();
void ping();
void cleanupDlg();
private:
Wt::WMessageBox* mb;
Wt::WTimer* _timer;
int _counter;
};
}//namespace
#endif
//////playground.cpp//////
#include "playground.h"
namespace wt_playground {
Playground::Playground(Wt::WContainerWidget* parent)
:WContainerWidget( parent )
{
mb=NULL;
_counter=0;
_timer = new Wt::WTimer( this );
_timer->setInterval( 1000 );
_timer->timeout.connect( SLOT(this,Playground::ping) );
_timer->start();
Wt::WPushButton* b = new Wt::WPushButton( "Click to\
generate event" , this );
b->clicked.connect( SLOT(this,Playground::runSample) );
}
void Playground::ping(){
_counter+=1;
printf( "\n ping! [ %d ] \n",_counter );
}
void Playground::runSample(){
if( !mb ){
mb = new Wt::WMessageBox( "Msg Box causes:",
"error decodeSignal() is shown and timers \
stop firing until browser refresh button is pushed",
Wt::NoIcon,Wt::Ok);
mb->buttonClicked.connect(SLOT(this,
Playground::cleanupDlg));
mb->show();
}
}
void Playground::cleanupDlg(){
if( mb ){
delete mb;
mb=NULL;
}
}
}//namespace
//////wtapp.cpp//////
#include
#include
#include
#include
#include "playground.h"
Wt::WApplication* createApplication(const Wt::WEnvironment& env){
Wt::WApplication* app = new Wt::WApplication(env);
wt_playground::Playground* pg = new wt_playground::Playground( app->root() );
return app;
}/*create application*/
int main(int argc, char *argv[])
{
/*Boot the application*/
return WRun(argc,argv,&createApplication);
}
_________________________________________________________________
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest