#2 Compile Errors

closed
nobody
9
2005-02-23
2005-01-19
Dave Smith
No

I have followed the configurations outlined in the
tutorial. I keep getting the following error at build.

Main.cpp
c:\cppProjects\HelloWorld\HelloWorld\MyWidget.h(10) :
error C2660: 'SmartWin::Widget::create' : function does
not take 0 arguments

What am I overlooking...???...

I am using VC++ 7.1.3088 in .net studio. Under Windows
XP Pro.

I'm hoping this can be resolved as I'm excited about
the ease of functionality your library provides...

please send response to:

crashbangboom@gmail.com

Thanks...

Dave

Discussion

  • Dave Smith

    Dave Smith - 2005-01-19
    • priority: 5 --> 9
     
  • andrew7

    andrew7 - 2005-02-14

    Logged In: YES
    user_id=1157678

    Hello Dave,

    Sorry. The tutorial lagged behind the library slightly.
    instead of create(), SmartWin uses createWindow() now.

    Also, createMessageBox().show("Hello World Was Here"); is
    used instead of ->show

    I will try to get the tutorial fixed pronto..
    You may have figured this out by looking at the examples by
    now but here is the corrected source:

    best regards, Andrew

    #include "SmartWin.h"
    using namespace SmartWin;

    class MyWidget
    : public WidgetFactory<WidgetWindow, MyWidget>
    {
    public:
    void clicked( WidgetButton * btn )
    {
    createMessageBox().show("Hello World
    Was Here"); // <=== CHANGE
    }

    void init()
    {
    createWindow(); // <=== CHANGE
    setText("Hello World");
    WidgetButton * btn = createButton();
    btn->setText("My Button");
    btn->setSize(100, 100, 100, 100);
    btn->onClicked(clicked);
    }
    };

    //-------------------------

    int main( Application & app )
    {
    MyWidget * widget = new MyWidget();
    widget->init();

    return( app.run() );
    }

     
  • Thomas Hansen

    Thomas Hansen - 2005-02-23
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks