Hi,
i've been using sparrow for a small while and whilist finding it great (amazing job guys!!!)
i've a problem i can't really understand, my touch events and my button presses are not being dispatched to my window i know the xib settings are correct beacouse setting breakpoints i can see the code flowing thru sparrow events chain, the target is my Game class and then the message never ever reaches my function, nor touches nor buttons.
[self addEventListener:@selector(onTouchEvent:) atObject:self forType:SP_EVENT_TYPE_TOUCH];
inside my scene class (everything else in that scene class works fine, including juggler, pre-frame events etc...).
and bit lower in the code
- (void)onTouchEvent:(SPTouchEvent*)event
{
int test
test=1;
}
i'm kinda clueless why is this happening, any ideas?
Debugging deeper i figured out that it doesn't work due to this
NSMutableArray *listeners = [mEventListeners objectForKey:event.type];
in SPEventDispatcher.m which is obiously null, so it returns the function right away, however i added the listener! The most strange thing is that mEventListeners is null itself, after i personally debugged and made sure the event was added properly. Yes i've cleaned and rebuilt already, any ideas?
Thanks.