title: Why is Cocos2D update only firing when adding sprite to parent's CCSpriteBatchNode from child
body: <p>I don't understand why the following is happening and I hope someones here can explain it.</p>
  
  <p>I have a GameLayer (CCLayer) Class and a Food (CCNode) Class.</p>
  
  <p>In the Gamelayer Class I create a bunch of food Objects that have a sprite as a property.
  And I want to add these sprites to a CCSpriteBatchNode.  </p>
  
  <pre><code>spriteBatch = [CCSpriteBatchNode batchNodeWithFile:@"bol.png"];
  [self addChild:spriteBatch]; 
  for (int i = 0; i &lt; 1000; i++) {
  
     Food * tempfood = [Food foodWithParentNode:self];
  
     [spriteBatch addChild:[tempfood mySprite]];
  
     [self addChild:tempfood];
  
   }
  </code></pre>
  
  <p>When I use the code above, the sprites all show up on screen but don't move. (They should because I scheduled an Update in the Food Class (see below)  and in this update the position of the food objects is changed)</p>
  
  <pre><code>-(id)initWithParentNode:(CCNode *)parentNode{
  
  if((self = [super init]))
  {
      mySprite = [CCSprite spriteWithFile:@"bol.png"];
  
      CGSize screenSize = [[CCDirector sharedDirector] winSize];
  
      [[self mySprite] setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];
  
      [self scheduleUpdate];
  
  }
  
  return self;
  }
  -(void) update:(ccTime)delta
  {
    ... DO SOME position calculations ...
  
   [[self mySprite] setPosition:CGPointMake(newX, newY)];
  }
  </code></pre>
  
  <p>But if I move the code that adds the sprite to the batch from the Game class to the food class the update that changes the position does work and the foods are moving on screen.
  BUT WHY? </p>
  
  <p>So this gives:</p>
  
  <pre><code>-(id)initWithParentNode:(CCNode *)parentNode{
  
  if((self = [super init]))
  {
      mySprite = [CCSprite spriteWithFile:@"bol.png"];
  
      CGSize screenSize = [[CCDirector sharedDirector] winSize];
  
      [[self mySprite] setPosition:CGPointMake(screenSize.width/2, screenSize.height/2)];
  
      [[ (GameLayer*) parentNode spriteBatch] addChild:mySprite];
  
      [self scheduleUpdate];
  
  }
  
  return self;
  }
  </code></pre>
  
  <p>I really can't see the difference between calling </p>
  
  <pre><code>[[ (GameLayer*) parentNode spriteBatch] addChild:mySprite];
  </code></pre>
  
  <p>from the food class or :</p>
  
  <pre><code>[spriteBatch addChild:[tempfood mySprite]];
  </code></pre>
  
  <p>from the 'parent' GameLayer</p>