Buttons on TableViewCell not working after upgrade to 3.16

After upgraded from 3.10 to 3.16, the following menu button on TableViewCell not working. Do you know why? Thank you.

HelloWorldScene.h (1.1 KB)
HelloWorldScene.cpp (4.9 KB)

I do more test today with the Hello World example. You may check attached source file.

The result is interesting. You can see on the picture, only 00 and 01 buttons not clickable. All other buttons are clickable.

I do another test. If I remove the menu and added it back, all buttons working. You can run my sample by #define READD 1 and see the result.

Is it a normal behavior as expected?

Hi, I am also experiencing the same problem. Yesterday I have upgraded Cocos2dx from 3.15 to 3.16. Tableviews are started behaving abnormal. I have dig down the issue a bit and found out when I call reload data on table view, all buttons on tableview cell becomes irresponsive. Kindly let me know how can I fix this.

kindly fix this issue. I have to force upgrade to 3.16 as 3.15 cannot compile on xCode 9 and now I have to force downgrade to 3.15 and xCode 8 and 3.16 is way too unstable.

If you remove the button and add it back in the tableCellAtIndex function like below. It works, but I don’t know if there any side effects.

    Menu *menu = (Menu *)cell->getChildByTag(3);
    menu->removeFromParent();
    
    auto closeItem = MenuItemImage::create(
                                           "CloseNormal.png",
                                           "CloseSelected.png",
                                           CC_CALLBACK_1(HelloWorld::menuCloseCallback, this));
    
    if (closeItem == nullptr ||
        closeItem->getContentSize().width <= 0 ||
        closeItem->getContentSize().height <= 0)
    {
        problemLoading("'CloseNormal.png' and 'CloseSelected.png'");
    }
    else
    {
        
    }
    
    // create menu, it's an autorelease object
    auto menu2 = Menu::create(closeItem, NULL);
    menu2->setPosition(25, 120);
    cell->addChild(menu2, 1, 3);

CCNode.cpp

void Node::cleanup()

remove _eventDispatcher->removeEventListenersForTarget(this);

then fixed this issue

I can apply this solution but when we are expecting to receive proper patch from Coocs2dx Team?

Sure, but i don’t know how to use git hub.

And i don’t know that my solution is correct or not.

This was the issue for the added line in CCNode. If I remove it, what will be the fix for that issue?

any further word on this? I’ve just discovered that I have the same problem. I have a table view where each row includes a “delete” button. Previously, this worked fine, where the user could select the row (to select the saved game) or click on the delete button. However, after upgrading to 3.16, I can no longer tap on the delete button.

thanks

A hot fix is to change all removeChild(cell, true) into removeChild(cell, false) in TableView.

thanks, I’ll look into that!