1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    34
    Vote Rating
    0
    dakamojo is on a distinguished road

      0  

    Default Understanding NavigationView Better

    Understanding NavigationView Better


    I am using Sencha Touch in Sencha Designer. I created a NavigationView which is marked as the initialView. I created two containers, LoginContainer and RegistrationContainer which are siblings in the project to the NavigationView. I created a controller that has a Controller Action bound to my NavigationView's show event (called it onShow).

    So in onShow I want to make a decision of which container (Login or Registration) should be pushed onto the NavigationView. Watching the intro video I see that I need to make a link from my containers to my NavigationView. However when I link the two containers, the first one (in this case Login) gets loaded into the NavigationView automatically. So then if in onShow I decide to push the RegistrationContainer I get it, but it has a back button that takes you back to the LoginContainer.

    What is the correct way to do what I want to do?

    Thanks.

  2. #2
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    423
    Vote Rating
    14
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    You're heading down the right path for sure. What might not be obvious from the demo is that linking the view classes into the Navigation View is only necessary if you want them to be present at the start. It's completely valid to have your Navigation View be empty at the start, and dynamically push the first card into it when you choose.

    I'm attaching a sample project that demonstrates, I think, what you're going for. You'll see that I've left the Navigation View without any children. All the juicy bits are in the 'launch' function of the controller. For the sake of demonstration I'm just choosing one container or the other at random, in place of your real logic. You'll also notice I'm using controller refs with autoCreate enabled for the login/registration components, so I don't have to manually instantiate anything. (See http://docs.sencha.com/touch/2-0/#!/...app.Controller for details on these advanced refs.)

    I hope this helps get you where you want!
    Attached Files
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    34
    Vote Rating
    0
    dakamojo is on a distinguished road

      0  

    Default


    Thanks, that explains it clearly.

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    mamaatnl is on a distinguished road

      0  

    Default Issue opening xds file

    Issue opening xds file


    I'm new to ST and am hoping the new Designer will help me to understand the basics. I have been struggling with the navigation view and am hoping your example will help me out. I'm using build 2.0.0.311 and can't seem to open or import the posted xds file properly (an empty project opens). xda files from other examples open properly. Is there anything I can do to get this sample to load as an xds file or is it possible to convert it to a xda file (if that's the issue)?

    Thanks in advance.

  5. #5
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    423
    Vote Rating
    14
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    @mamaatnl the internal project file format has changed since I posted that example, but your Designer should upgrade it automatically when you try to open it.

    If for some reason that's not working, try renaming the .metadata directory to just metadata with no leading dot, then try opening the xds.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  6. #6
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    mamaatnl is on a distinguished road

      0  

    Default


    Thanks for the suggestion. There's no (.)metadata file in the zip. To be sure I downloaded it again. What else can I do?


    Attached Images

  7. #7
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    423
    Vote Rating
    14
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Mac's Finder hides files/directories with a leading dot. You'll have to do this from a command line or with another tool that shows you hidden files.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  8. #8
    Sencha User
    Join Date
    Oct 2011
    Posts
    5
    Vote Rating
    0
    mamaatnl is on a distinguished road

      0  

    Default


    Got it to open now after renaming the folder from .metadata to metadata. Designer converted the project.

    Thanks for your patience!

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar