Hey Johannes,

2010/1/20 Johannes Kepler <[email protected]>:
> hi koen,
>
> i just cloned the git repository.
> same behavior here.
> is there a easy way to debug my program?
> the error message doesn't say too much, for me.

That is bizarre. Can you compare with the version below and see if
this one works for you (it should!) ?

Regards,
koen

#include <iostream>
#include <boost/lexical_cast.hpp>

#include <Wt/WApplication>
#include <Wt/WStandardItemModel>
#include <Wt/WStandardItem>
#include <Wt/WPushButton>
#include <Wt/WContainerWidget>
#include <Wt/WText>
#include <Wt/WTabWidget>
#include <Wt/WVBoxLayout>
#include <Wt/Ext/TableView>
#include <Wt/Ext/TabWidget>

using namespace Wt;

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

    Ext::TableView *tableStat_;

    WStandardItemModel *model = new WStandardItemModel(40, 4);
    for (int i = 0; i < 4; ++i) {
      model->setHeaderData(i, "Header " + boost::lexical_cast<std::string>(i));
      for (int j = 0; j < 40; ++j) {
        model->setData(model->index(j, i),
                       "Item " + boost::lexical_cast<std::string>(i)
                       + ", " + boost::lexical_cast<std::string>(j));
      }
    }

    tableStat_ = new Ext::TableView();
    tableStat_->setModel(model);
    tableStat_->setAlternatingRowColors(true);
    tableStat_->setPageSize(14);
    tableStat_->setDataLocation(Ext::ServerSide);
    tableStat_->setBottomToolBar(tableStat_->createPagingToolBar());

    Ext::TabWidget *tabWidget = new Ext::TabWidget(root());
    tabWidget->resize(600, 400);
    tabWidget->addTab(new WText("huuuh"), "Aha");
    tabWidget->addTab(tableStat_, "Hoho");
  }

private:
};

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

int main(int argc, char **argv)
{
  return WRun(argc, argv, &createApplication);
}

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to