Hi there!
I am really keen on learning sparrow .. but i have my starting probs .. so i come back to you for my next question
...
Can I pass events from a child to a parent!? i have a Parent class (derrived from SPSprite) where i add another SPSprite class as child! Her is the code:
movingObject = [[MovingObject alloc] init]; [self movingObject];
Do capsule the Main Class (above) from its objects i want that my "MovingObject" class is firing an Event so my parentClass will know what happend to the "MovingObject" class.
So I tried to fire the event (in "MovingObject") like this:
[self.parent addEventListener:@selector(informParentFromDestroyedObject:) atObject:self forType:SP_EVENT_TYPE_TOUCH];
and in my Parent class i have an EventHandler looking like this:
-(void)informParentFromDestroyedObject:(SPTouchEvent *)event{
NSLog(@"informParentFromDestroyedMex");
}Everything compiles fine, no errors. When i execute, the code runs without exceptions BUT the event does not fire or does not reach the parent class.
thanks for help in advance!!
chris