我有创造鸣叫()种实例,具有跨度内容是“HOHO”即使线60应设置问题 - https://github.com/metaperl/enyo-identica-tutorial/blob/master/source/App.js#L60如何在enyo类中绑定属性?
我也试过t.setText("hoho");
但也不能工作。
我有创造鸣叫()种实例,具有跨度内容是“HOHO”即使线60应设置问题 - https://github.com/metaperl/enyo-identica-tutorial/blob/master/source/App.js#L60如何在enyo类中绑定属性?
我也试过t.setText("hoho");
但也不能工作。
你应该打电话setText()
,而不是违反tweet类型的封装。但是,问题似乎是致电addContent()
。这不符合你的想法。要么拨打addContent()
与t.getText()
,要么实际添加新的推文控件到滚动条。 addContent()
预计会传入一个字符串(请参阅:http://enyojs.com/api/#enyo.Control)。
你可能想,而不是做这样的事情:
reloadTweets: function() {
this.$.main.createComponent({kind: "Tweet", text: "hohoho"}, {owner: this});
this.$.main.render();
}
虽然,你可能-really-想要做的是直接添加鸣叫的滚轮或创建一个轻量级目录,并添加项目什么。
答案是here这是接近Pre101的建议。
这是我工作的代码:
reloadTweets: function(inSender, inEvent) {
this.$.main.createComponent({
kind: "Tweet",
text: "ho ho ho ho"
});
this.render();
}
是'main.createComponent'指命名该组件的'main'“主”,也就是FittableRows应用程序的一个组成部分? –
哎呀,我放弃了这个。我将编辑来解决这个问题。 – Pre101