Problems with CCIMEDelegate

Problems with CCIMEDelegate
0.0 0



I’m having problems making a an example of TextInputTest.

I made two classes.
~~CreateUserScene (the scene that implements the protocol)

The keyboard must be shown when I click on the texinput, but I’m getting this log:

Cocos2d: ++++++++++++++++++++++++++++++++++++++++++++ Cocos2d: KeyboardNotificationLayer:clickedAt(-47.000000,-7.000000) Cocos2d: KeyboardNotificationLayer:TrackNode at(origin:48.500000,225.500000, size:223.000000,29.000000) Cocos2d: CreateUserScene:CCTextFieldTTF detachWithIME Cocos2d: ----------------------------------

It seems like the “getRect” function its not working property.
Changing this line of code the keyboard works, but cannot be detached.

this->onClickTrackNode(CCRect::CCRectContainsPoint(rect, point));

What I’m doing wrong?


Note: I cannot attach multiples files neither on chrome neither on safari. (Mac os X) (1.4 KB)


second file


third file


Solved: ConvertTouchToNodeSpace is not needed, but I don’t know why.

CCRect rect;
//CCPoint point = convertTouchToNodeSpaceAR(pTouch);
//CCLOG(“KeyboardNotificationLayer:clickedAt(f,f)”, point.x, point.y);

rect = getRect(m_pTrackNode);
CCLOG (“KeyboardNotificationLayer:TrackNode at(origin:%f,%f, size:%f,%f)”,
rect.origin.x, rect.origin.y, rect.size.width, rect.size.height);

this~~>onClickTrackNode(CCRect::CCRectContainsPoint(rect, endPos));