0

我正在尝试通过按钮功能获取参数addCallbackElement。但我收到以下错误:

遇到错误:TypeError:无法读取未定义的属性“nameRegister”

----------

function **createUserPanel**(e){

  var ss = SpreadsheetApp.openById(LOGS_SHEET_ID);

  var app = UiApp.getActiveApplication();

  var absolutePanelReg = app.createAbsolutePanel().setId("absolutePanelReg");

  var verticalPanelReg = app.createVerticalPanel().setId("verticalPanelReg");

  var mainPanelReg = app.createHorizontalPanel().setId("mainPanelReg");

----------

  var lbNameRegister = app.createLabel().setText("Name of user: ");

  var nameRegister = app.createTextBox().setId("nameRegister").setName("nameRegister");

  var botonSend = app.createButton().setText("Send");

  var handlerRegister = app.createServerHandler("createUser")**.addCallbackElement**(verticalPanelReg);

  botonSend.addClickHandler(handlerRegister);

----------

  verticalPanelReg.add(lbNameRegister);

  verticalPanelReg.add(nameRegister);

  mainPanelReg.add(verticalPanelReg);

  absolutePanelReg.add(mainPanelReg);

  app.add(absolutePanelReg);

  return app;
};


----------

  function **createUser**(e){

    /*var nameRegister ="test";*/

    var nameRegister = e.paramater.nameRegister;

    .......

};
4

1 回答 1

0

问题已经解决了 :

参数 > 参数

感谢“Serge insas”

于 2012-09-17T08:19:54.767 回答