Unable to access published properties of dynamically created kinds in expected way

I am encountering strange behavior when trying to access the published properties of dynamically created kinds. In the code below this.$.testComp.a evaluates to undefined while this.$.testComp.published.a evaluates to "A" as expected. This fiddle demonstrates the issue: http://jsfiddle.net/pwnosaurus/yNyn4/ What am I doing wrong here?
enyo.kind({
    name: "test",
    components:[
        {kind: enyo.Button, content:"foo", ontap: "doIt"},
    ],
    doIt: function(){
        //instantiate a new component
        this.createComponent({
            name: "testComp",
            content: "bar",
            published: {
                a: "A",
           }
        });
        this.render();
        this.log(this.$.testComp.a);            //logs undefined
        this.log(this.$.testComp.published.a);  //logs A
    },
});

foo = new test();
foo.renderInto(document.body);

Comments

Sign In or Register to comment.