I’m trying to dynamically create a list of buttons in a ToolBar. The events are not going off, and when I try to change there properties I get a “uncaught typedef: Cannot call methed setcaption on undefined” I have the following code that create the buttons,
LoadTabs: function()
{
this.$.tabs.createComponents([
{name: "mycusbut", caption: "b",onclick: "btnClick" }, // this event never goes off!!!!
{caption: "b"},
{caption: "c"}
]);
// this.$.frediop.setCaption("Put some text here"); // handle the button click
},
The event btnClick never goes off, and the code that tries to change the property.
btnClick: function()
{
this.$.mycusbut.setCaption("Put some text here"); // get a undefined object error
}