我有創造鳴叫()種實例,具有跨度內容是「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