예제 #1
0
파일: WGLWidget.C 프로젝트: 913862627/wt
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);
}
예제 #2
0
파일: WLineEdit.C 프로젝트: quatmax/wt
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);
}