CCActionInterval in menu_selector!

Hello to everybody!

I want to hide my Layer by clicking the menu item with CCMoveTo Action.

So I created a class MenuLayer : public cocos2d::CCLayer
and added there a menu item
@
CCMenuItemImage *mSettingsItem = CCMenuItemImage::itemFromNormalImage(
“menu/settings480x320.png”,
“menu/settings_hover480x320.png”,
this,
menu_selector(MenuLayer::menuSettings));
@

So menuSettings function looks like this:
@
void MenuLayer::menuSettings(CCObject* pSender)
{
this~~>runAction;
}
@
When I try to click Settings menu Item I get en error wich redirrects me to the CCActionManager.cpp at line 205 pAction~~>startWithTarget(pTarget);

Please help me! I need to run Action on the Menu item click.


MenuLayer.cpp.zip (0.8 KB)

Nobody can help me? Hey ! Where are you all?

You should retain hideMenu.

yes - thanks! That was the reason!