It's expecting an int for the row to insert the string. Also it doesn't
return a string:
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WStringListModel.html#a3bf0b8d2e110cbd518a57f74e8f9e4c6

so you could change the line from:

        tuple->store = "A: " +
Wt::WStringListModel::insertString(strl).toUTF8();

to:

tuple->store  = "A: " + strl.toUTF8();
Wt::WStringListModel::insertString(ROW_NUMBER, strl);

Where ROW_NUMBER is the number of the row you want to store it in .. or more
likely you'll want:

tuple->store  = "A: " + strl.toUTF8();
Wt::WStringListModel::addString(strl);

Maybe strl is empty ?



On Mon, Jul 11, 2011 at 3:00 AM, PARVINDER RAJPUT <[email protected]>wrote:

> Hello Everyone.
> I have made the simple application and postgre database are used. but i am
> facing problem in application.
> My application is simple insert the text in database. Text stored in string
> variable.
> see my application at this link.
> http://paste.ubuntu.com/641409/
>
> problem intat part:-
>
> void WtApplication::populate() {
>     msg("<b>Populate</b>");
>     std::string strl;
> std::string strl;
> strl="parvinder rajput";
>     ptrA a;
>
>     { A *tuple = new A();
>
>         tuple->store = "A: " +
> Wt::WStringListModel::insertString(strl).toUTF8();
>
>     try { Transaction tt(session_);
>             a = session_.add(tuple);
>             tt.commit();
>         } catch (...) {}
>   }
>
> error is:
> /home/parvinder/Desktop/website/source/test.C: In member function ‘void
> WtApplication::populate()’:
> /home/parvinder/Desktop/website/source/test.C:109:65: error: no matching
> function for call to ‘Wt::WStringListModel::insertString(std::string&)’
> /usr/include/Wt/WStringListModel:67:8: note: candidate is: void
> Wt::WStringListModel::insertString(int, const Wt::WString&)
>
> please help me. i am beginner of witty.
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to