Cocos2D-JS TableView’s pit, call Settag, you must re-call once on the outside

tableCellAtIndex:function (table, idx) {
var cell = table.dequeueCell();
if (!cell) {
cell = new cc.TableViewCell();
//Create a small cell
var pnl_cell = this.root.getChildByName("pnl_cell").clone();
pnl_cell.setName("pnl_cell ");
pnl_cell.setPosition(cc.p(0, 0));
pnl_cell.setVisible(true);
cell.addChild(pnl_cell);

var headIcon = CMF.createHeadIcon("res/icon/gem.png", "gems");
headIcon.setPosition(cc.p(47, 66));
pnl_cell.addChild(headIcon );

pnl_cell.getChildByName("btn_choose").setTag(idx);
pnl_cell.getChildByName("btn_choose").addTouchEventListener(this.call_clickAddItem, this);
}

var pnl_cell = cell.getChildByName("pnl_cell"); //Cell control
pnl_cell.getChildByName("btn_choose").set Tag(idx); //tag must be reset
return cell;
},

tableCellAtIndex:function (table, idx) {
var cell = table.dequeueCell();
if (!cell) {
cell = new cc.TableViewCell();
//Create a small cell
var pnl_cell = this.root.getChildByName("pnl_cell").clone();
pnl_cell.setName("pnl_cell");
pnl_cell.setPosition(cc.p(0, 0));< br /> pnl_cell.setVisible(true);
cell.addChild(pnl_cell);

var headIcon = CMF.createHeadIcon("res/icon/gem.png", "gems") ;
headIcon.setPosition(cc.p(47, 66));
pnl_cell.addChild(headIcon);

pnl_cell.getChildByName("btn_choose").setTag(idx );
pnl_cell.getChildByName("btn_choose").addTouchEventListener(this.call_clickAddItem, this);
}

var pnl_cell = cell.getChildByName("pnl_cell"); / /Cell Control
pnl_cell.getChildByName("btn_choose").setTag(idx); //tag must be reset
return cell;
},

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3660 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.