Hey Alex,

2010/2/22 Alex Sadovsky <[email protected]>:
> Hello!
>
> There seems to be a problem with WTimer and WDialog.
> I use a periodic WTimer for regular updated of some widgets and
> WDialog to edit some other widgets. After I open and close WDialog a
> few times WTimer stops sending signals. What could be the cause to
> this problem? I'm using Wt 3.0.0.

I tried to reproduce this problem with Wt 3.0.0 and latest git, but
failed to reproduce the problem. I am using the attached test case.
Can you modify this test case so that you get the erratic behavior ?

Regards,
koen
/*
 * Copyright (C) 2010 Emweb bvba, Kessel-Lo, Belgium.
 *
 * See the LICENSE file for terms of use.
 */
#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WMessageBox>
#include <Wt/WPushButton>
#include <Wt/WText>
#include <Wt/WTimer>

using namespace Wt;

class TestApp : public WApplication {
public:
  TestApp( const WEnvironment& env ) :
    WApplication( env ) {

    WTimer *timer = new WTimer();
    timer->setInterval(2000);
    timer->timeout().connect(SLOT(this, TestApp::timeout));
    timer->start();

    WPushButton *push = new WPushButton("create dialog", root());
    push->clicked().connect(SLOT(this, TestApp::showDialog));

    text_ = new WText(root());
  }

  void showDialog() {
    WMessageBox::show("Hey there", "Tell me about it", Ok);
  }

  void timeout() {
    text_->setText(boost::lexical_cast<std::string>(i++));
  }

  int i;
  WText *text_;
};

WApplication *createApplication(const WEnvironment& env)
{
  WApplication *app = new TestApp(env);
  return app;
}

int main(int argc, char **argv)
{
  return WRun(argc, argv, &createApplication);
}
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to