With Javascript/Web project this code will work:
@
var Panel_tactics = ccs.UIHelper.seekWidgetByName(this._widget, “Panel_tactics”);
var tableView = cc.TableView.create(this, Panel_tactics.getSize());
tableView.setDirection(cc.SCROLLVIEW_DIRECTION_VERTICAL);
tableView.setPosition(Panel_tactics.getPosition());
tableView.setDelegate(this);
Panel_tactics.addChild(tableView);@
浏览器:
Panel_tactics.addChild(tableView); 报 Uncaught TypeError: Object # has no method ‘getLayoutParameter’ 错误。
ccs.UIPanel.addChild 增加 ccs.* 控件,没有错误。
cc.Layer.addChild 增加 cc.tableView ,也没有错误。
JSB project:
调用 Panel_tactics.addChild(tableView); ,app程序 直接崩溃了。