lundi 9 février 2015

Store reference to label

I create custom class:


Code:



Ext.define('myApp.util.alignmentMonitor', {
singleton: true,
interval: 1000,
lblSA: Ext.ComponentQuery.query('tbtext#sa_label')[0],
.....

Is it possible to include reference to some txt label as property of my class?

Since i change label text very often I don't want to call "Ext.ComponentQuery.query" each time but save reference to my label and then just call that reference:



Code:



this.lblSA.setText('new text');

What would be the bast way for doing this?



Store reference to label

Aucun commentaire:

Enregistrer un commentaire