ccs.ListView items does not display text

Hi, I’m trying to add a ccs.LabelBMFont to a ccs.layout widget, but there is no text being rendered, I can add a button or an image and it works OK. Is this a bug?

This is the code, attached is a the complete sample. You should change the cocos2d path.

         // Create the list view
        var listView = ccs.ListView.create();
        // set list view ex direction
        listView.setDirection(ccs.ScrollViewDir.vertical);
        listView.setTouchEnabled(true);
        listView.setBounceEnabled(true);
        listView.setSize(cc.size(240, 400));
        listView.setBackGroundColor(cc.c3b(120,120,120), cc.c3b(130,130,130));
        listView.setPosition(cc.p(0,0));
        this._uiLayer.addWidget(listView);


        // create model
        var default_button = ccs.Button.create();
        default_button.setName("TextButton");
        default_button.setTouchEnabled(true);
        default_button.loadTextures(s_CloseSelected, "", "");

        // Create the LabelBMFont  THIS TEXT NEVER SHOWS UP
        var label = ccs.LabelBMFont.create();
        label.setFntFile(font_fnt);
        label.setText("List Item");
        // label.setPosition(cc.p(0,200) );
    
        var default_item = ccs.Layout.create();
        default_item.setTouchEnabled(true);
        default_item.setSize(cc.size(100,40) );
        default_button.setPosition(cc.p(default_item.getSize().width / 2, default_item.getSize().height / 2));
        default_item.addChild(default_button);
        default_item.addChild(label);

        // set default model
        listView.setItemModel(default_item);

        listView.pushBackDefaultItem();
        listView.pushBackDefaultItem();


ListviewTest.zip (262.1 KB)

Hi Martin,

I will test your attachment soon.

Thanks for feedback.
David

Hi,Martin Romañuk.
Sorry, it’s my mistake that wrote _stringValue as _strStringValue.
I fixed it at:
[https://github.com/cocos2d/cocos2d-html5/pull/1542]