Project

General

Profile

Bug #2308 » wittyTest_JScriptLoadError.cpp

Andreas Büchin, 10/10/2013 02:07 PM

 
//============================================================================
// Name : wittyTest2.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <vector>



/*
* Copyright (C) 2008 Emweb bvba, Heverlee, Belgium.
*
* See the LICENSE file for terms of use.
*/

#include <Wt/WApplication>
#include <Wt/WBreak>
#include <Wt/WContainerWidget>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
#include <Wt/WText>
#include <Wt/WTableView>
#include <Wt/WStandardItemModel>
#include <Wt/WStandardItem>
#include <Wt/WTimer>
#include <Wt/WString>
#include <Wt/WStackedWidget>
#include <Wt/WMenu>
// c++0x only, for std::bind
// #include <functional>
using namespace std;
using namespace Wt;


/*
* A simple hello world application class which demonstrates how to react
* to events, read input, and give feed-back.
*/
class HelloApplication : public Wt::WApplication
{
public:
HelloApplication(const Wt::WEnvironment& env);

private:
Wt::WLineEdit *nameEdit_;
Wt::WText *greeting_;

void greet();
};

/*
* The env argument contains information about the new session, and
* the initial request. It must be passed to the WApplication
* constructor so it is typically also an argument for your custom
* application constructor.
*/
HelloApplication::HelloApplication(const Wt::WEnvironment& env)
: Wt::WApplication(env)
{
setTitle("Hello world"); // application title

WApplication::instance()->require("resources/detect_timezone.js");

greeting_ = new WText("Hello",root());

}

Wt::WApplication *createApplication(const Wt::WEnvironment& env)
{
/*
* You could read information from the environment to decide whether
* the user has permission to start a new application
*/
return new HelloApplication(env);
}

int main(int argc, char **argv)
{
return Wt::WRun(argc, argv, &createApplication);
}
    (1-1/1)