another problem I’ve found in CCEditBox in iOS is that if I set the text of the CCEditBox after creation the text is shown only when it gets the focus. This problem is visible also in the TestCpp project adding a call to setText:
m_pEditName = CCEditBox::create(editBoxSize, CCScale9Sprite::create("extensions/green_edit.png"));
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
m_pEditName->setText("Hello world"); // Here is set the text
Giannandrea Castaldi wrote:
I’m upgrading from cocos2dx 2.1.1 beta3 to 2.1.4 and I’ve a problem with CCEditBox in iOS. When the textfield has the focus and then there is the keyboard open the textfield isn’t updated with the text I’m inserting. When I close the keyboard the text I’ve inserted appears in the textfield.
I’ve found out that the problem is solved if I add the CCEditBox in the root view of the scene (as in TestCpp), in my app there is another view as dialog and this cause the problem.
Thanks in advance.