There is a problem when repeat a CCJumpTo

2011.09.30 update:
There are only just like CCJumpTo (CCxxxTo) has this problem.

old:
For some reason,I want to repeat a CCJumpTo Action:

//  CCPlace* pGoback = CCPlace::actionWithPosition(startPoint);
//  CCJumpTo* pJumpTo = CCJumpTo::actionWithDuration(1.0f, targetPoint, 10, 5);
//  CCSequence* pSeq = CCSequence::actions(pGoback,pJumpTo,NULL);
//  CCRepeatForever* pRepeat= CCRepeatForever::actionWithAction(pSeq);
//  sprite->runAction(pRepeat);

Yes,I want a sprite jump to a point,then go back to the startPoint. and repeat again and angain.
But,it is strange that the code didn't work on my expect:
In first time the sprite do the right thing ,but after that the  sprite just jump down gradually.

 I checked the code,finally I found the reason:
1.The CCJmpTo action only init their member variable.

CCJumpTo* CCJumpTo::actionWithDuration(cocos2d::ccTime duration, cocos2d::CCPoint position, cocos2d::ccTime height, int jumps)
{
    CCJumpTo *pJumpTo = new CCJumpTo();
    pJumpTo->initWithDuration(duration, position, height, jumps);
    pJumpTo->autorelease();

    return pJumpTo;
}

2.When the action run, it just modify member variable.

void CCJumpBy::update(cocos2d::ccTime time)
{
    // parabolic jump (since v0.8.2)
    if (m_pTarget)
    {
        ccTime frac = fmodf(time * m_nJumps, 1.0f);
        ccTime y = m_height * 4 * frac * (1 - frac);
        y += m_delta.y * time;
        ccTime x = m_delta.x * time;
        m_pTarget->setPosition(ccp(m_startPosition.x + x, m_startPosition.y + y));
    }
}

3.The action will not inited when the action started.

void CCJumpBy::startWithTarget(CCNode *pTarget)
{
    CCActionInterval::startWithTarget(pTarget);
    m_startPosition = pTarget->getPosition();
}


All above-mentioned cause that  the action's member variable value will retain to the next execution of the same action.
So,My suggestion is that it is necessary to set some member variables to save the original arguments , then when the action
started to run,use the original arguments to do Initialization.

And I also think this problem exist in CCMoveTo/By.

Before that ,here is another solution:
void XXX::genrateAction()
{
//  CCPlace* pGoback = CCPlace::actionWithPosition(startPoint);
//  CCJumpTo* pJumpTo = CCJumpTo::actionWithDuration(1.0f, targetPoint, 10, 5);
//  CCSequence* pSeq = CCSequence::actions(pGoback,pJumpTo,NULL);
//  CCRepeatForever* pRepeat= CCRepeatForever::actionWithAction(pSeq);
//  sprite->runAction(pRepeat);
}
sprite->runAction(CCRepeatForver::action(CCCallFunc::actionWithTarget(this, callfunc_selector(XXX::genrateAction)));

I don’t think it is a problem of CCJumpTo/By. It is the purpose of the action.
So, I agree with the solution that use XXX::genrateAction().

I have updated my code in this post.
Yes,After my thinking,I noticed that the xxxBy Actions have no this problem, but the xxxTo actions have the problem.
why? since every xxxTo action means that a node is to transform one status to the target status, so It is necessary to recaulate the status between the current and target status on start run this action again

I just encountered the same problem with CCJumpTo:
the first row of jumps is ok (increasing x from origin), the back row (to the left, decreasing x) is falling down (unwanted y decrement), the 3rd row ir right (but with lower y than initial point), the 4th row is falling again, etc etc.
No problems with CCJumpBy.