please visit it. And what changes are required to link the combobox
with database .

void WtApplication::combobox()
{root()->addWidget(new  WText("DEPARTMENT"));
 Wt::WComboBox *combo  = new Wt::WComboBox(root());
 combo->addItem("Civil");
 combo->addItem("IT");
 combo->addItem("CSE");
 combo->addItem("ECE");
 combo->addItem("ME");
 combo->addItem("EE");
 combo->addItem("PRODUCTION");
 combo->setCurrentIndex(2);
 greeting_ = new WText(root());
 combo->activated().connect(this, &WtApplication::populate);
}

combobox function link with populate function which are insert the
value in database.
void WtApplication::populate() {
        
                           greeting_->setText( combo->text());
                         ptrform acadmicbranch;
                         form *tuple = new form();
                        
                         tuple->stream = greeting_->text().toUTF8();

                     try { Transaction tt(session_);
                         acadmicbranch = session_.add(tuple);
                         tt.commit();
                   } catch (...) {}
}

when i have execute this it show some error.

/home/parvinder/Documents/academicbranchadmin/source/test.h: In member
function ‘void WtApplication::populate()’:
/home/parvinder/Documents/academicbranchadmin/source/test.h:261:56:
error: ‘class Wt::WComboBox’ has no member named ‘text’

please give me suggestion
-- 
Parvinder Rajput
website:- www.parvinder.co.in

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to