title: Assertion failed while creating Menu Item Label in cocos2dx
body: <p>I am building a game in cocos2dx in which i have to create menu item label. I am creating them in a loop and then adding them in menu:</p>
  
  <pre><code> auto menuForNumberButtons = Menu::create();
      menuForNumberButtons-&gt;setPosition(Vec2(0,0));
      this-&gt;addChild(menuForNumberButtons, 3);
      for (int  yy = 0; yy &lt; 3; yy++ )
      {
          for (int xx = 0; xx &lt; 3; xx++) 
          {
              counterOfNumers++;
  
              MenuItemLabel *numberButton=MenuItemLabel::create(Label::createWithTTF(String::createWithFormat("%d",counterOfNumers)-&gt;getCString(), "arial.ttf", visibleSize.width*0.05), this, menu_selector(BSHSuDokuKeypad::numberButtonPressed));
              numberButton-&gt;setScaleX(widthOfNumberCell*0.5 / numberButton-&gt;getBoundingBox().size.width);
              numberButton-&gt;setScaleY(heightOfNumberCell*0.5 / numberButton-&gt;getBoundingBox().size.height);
              numberButton-&gt;setPosition(Vec2(visibleSize.width*0.005+widthOfNumberCell*xx + numberButton-&gt;getBoundingBox().size.width*0.5,  visibleSize.height*0.7+  heightOfNumberCell*yy + numberButton-&gt;getBoundingBox().size.height*0.5));
              menuForNumberButtons-&gt;addChild(numberButton);}}
  </code></pre>
  
  <p>but when i click on any number. it gives me an error saying assertion failed without calling the callback function. 
  Any help?</p>