void WGLWidget::connectJavaScript(Wt::EventSignalBase &s, const std::string &methodName) { std::string jsFunction = "function(obj, event){" """var o=" + glObjJsRef() + ";" """if(o) o." + methodName + "(obj,event);" "}"; s.connect(jsFunction); }
void WLineEdit::connectJavaScript(Wt::EventSignalBase& s, const std::string& methodName) { std::string jsFunction = "function(lobj, event) {" """var o = jQuery.data(" + jsRef() + ", 'lobj');" """if (o) o." + methodName + "(lobj, event);" "}"; s.connect(jsFunction); }