1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    18
    Answers
    2
    Vote Rating
    0
    JohnM_ is on a distinguished road

      0  

    Default Answered: Stack depth in navigation view?

    Answered: Stack depth in navigation view?


    Hi guys!

    I've got a couple of views being pushed onto a navigation view. On the navigation bar, there's a text box that I'm using as a search field... I want this to be visible only when I'm at the lowest layer of the stack of views pushed onto the navigation view.

    Currently, I'm hiding the text box when pushing a view to the navigation view, and catching the back button to unhide the text box. For a stack depth of 2, this works great. The problem is that I'd like to push more than one view to the navigation view, for a stack depth of 3, and have the text box only visible when stack depth = 1.

    Is there any way to get the number of views that have been pushed onto another view? (or, failing that, a better way to handle this)

    Thanks in advance for any information.

  2. Code:
    this.getMyView().getItems().items.length

  3. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    18
    Answers
    2
    Vote Rating
    0
    JohnM_ is on a distinguished road

      0  

    Default


    Alright well, once again, the act of typing it out was enough to spur a train of thought that got me to the answer.

    If you want to find the stack depth of a view, check the length of the items array. So obvious. Feel silly for asking.

    Code:
    this.getMyView()._items.items.length
    (where myView a ref, of course)

  4. #3
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    574
    Answers
    34
    Vote Rating
    31
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default


    Code:
    this.getMyView().getItems().items.length

  5. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    18
    Answers
    2
    Vote Rating
    0
    JohnM_ is on a distinguished road

      0  

    Default


    Yeah, I should probably be using the getter. :-\

Thread Participants: 1

Tags for this Thread

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