1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    63
    Vote Rating
    2
    scheid is on a distinguished road

      0  

    Default Proper/appropriate way to get references to objects

    Proper/appropriate way to get references to objects


    Hi All,

    I'm just learning Sencha, and have seen different ways to get references to objects like views. I want to ensure that I'm doing it in a proper way that isn't spawning new instances, etc.

    I use the technique below to navigate to cards in a card layout, which works well from a UI perspective. Is ComponentQuery.query a good way to get object references?


    var mView = Ext.ComponentQuery.query("mainview")[0];
    var moreMessagesView = Ext.ComponentQuery.query("moremessages")[0];

    mView.setActiveItem(moreMessagesView);


    Thanks!

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    aoathout is on a distinguished road

      0  

    Default


    This logic is better served in a controller and then use the 'refs' config. This will let you get references to views and keep the logic of switching views out of your UI layer. Plenty of examples / posts for using 'refs' in the forums

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    63
    Vote Rating
    2
    scheid is on a distinguished road

      0  

    Default


    Thanks so much. I'll look into incorporating the obj references there instead. I have started to use refs for some things, but don't fully understand its behavior yet. Seems powerful though.

  4. #4
    Sencha User
    Join Date
    Aug 2011
    Location
    Cedar Rapids, IA
    Posts
    63
    Vote Rating
    1
    aoathout is on a distinguished road

      0  

    Default


    Take a look at the following. Should be helpful as examples of mvc and using the new features:

    http://www.sencha.com/forum/showthre...le-MVC-example


Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi