Subclass CCPhysicsSprite using CCSpriteBatchNode issues

Subclass CCPhysicsSprite using CCSpriteBatchNode issues
0.0 0


I am trying to use CCPhysicsSprite by subclassing it and using spritebatching but I’m getting error messages and code is breaking on CCSpriteBatchNode::addChild method.
// check CCSprite is using the same texture id CCAssert(pSprite->getTexture()->getName() == m_pobTextureAtlas->getTexture()->getName(), "CCSprite is not using the same texture id");
Please advise.

Below is my code:
//Create method from my CCPhysicsSprite subclass

SBBall* SBBall::createUsingSpriteFrameName( const char *pszFileName )
    SBBall *sprite = new SBBall();

    if ( sprite && sprite->createWithSpriteFrameName(pszFileName) )
        return sprite;
    return NULL;

Code to implement my subclass using spritebatch to load images in the HelloWorldScene.cpp:

    CCSpriteBatchNode *sbatch = CCSpriteBatchNode::create("BBMenuSystem/SD/BBMenuSystem.pvr.ccz");

    SBBall *ball = SBBall::createUsingSpriteFrameName("btnPlay");