I was expecting the first getMsg call to return "Hi there!", but I see undefined.
Code:
Ext.define('MyClass', {
isMyClass: true
});
var obj = new MyClass();
obj.self.addConfig({
msg: 'Hi there!'
});
console.log(obj.getMsg()); // <-- Why undefined?
obj.setMsg('Hello');
obj.getMsg(); // <-- "Hello"
Aucun commentaire:
Enregistrer un commentaire