hi:
 when I edit some text in WTextEdit,then click "submit" PushButton,but
in newBlogOK function ,mpBlog->text() will return current content
empty,if press Enter,can return current WTextEdit content ?
void XBlogPage::newBlog
{
...
  WPushButton*  pOK=new WPushButton("submit",pGroupBox);
    pOK->clicked().connect(SLOT(this, XBlogPage::newBlogOK));
   mpBlog = new Wt::WTextEdit(pGroupBox);
    mpBlog->setRows(30);
...
}
void XBlogPage::newBlogOK
{
     XDBBlog * pDBBlog = new XDBBlog();
    pDBBlog->mUid=mpWebApp->getTableUID("tblog");
    pDBBlog->mTitle=mpTitle->text().toUTF8();
     ....
    pDBBlog->mMemo=mpBlog->text().toUTF8();
    Wt::Dbo::Transaction dbTran(*mpWebApp->mpDBSession);
    mpWebApp->mpDBSession->add(pDBBlog);
    dbTran.commit();
}


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to