I have a weird problem with my application and I could not find anything on the internet… (Similar problems without answers).
I am posting here, hoping you may know what is wrong, so here is my problem :
I have a scrollview, that is composed of several “scrollrow”, nothing particular here. My problem is that each row is composed of several button, created as CCMenu. Everything works excepted when I want to scroll and I am pressing a button at the same time.
The problem is well known, the CCMenu “takes” the priority so it stops the scroll. (as I understand it).
So my solution was to change the priority of the CCMenu so the scroll would work!
For each CCMenu, I called “
setTouchPriority(10);”, and then I was able to scroll, even if I begin by touching a button.
The new problem is that if I want to simply press the button (no scroll), my logcat (eclipse) shows me an error message for ccTouchEnded and x-code stops at the following line : “
CCAssert(m_eState == kCCMenuStateTrackingTouch, "[Menu ccTouchEnded] -- invalid state");”
So, from what I understand, the state of the button is not ok, which explains why it does not do what I want, but why is that ?
This error is linked to the change of priority but I can’t find how to make it work…
Also, if I begin to slightly scroll, but keep my finger on the button and then release, it will work as expected. It’s the simple press “down and up” that crashes everything…
Any suggestions is appreciated.
Thank you for reading,