1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    5
    Vote Rating
    0
    find101 is on a distinguished road

      0  

    Default simple navigation question

    simple navigation question


    I am a newbie;

    I am trying to achieve a simple naviation

    Main view with a picture and a button
    List view showing some content

    When I tap on the button in the mainview it should go to the list view

    Views :
    mainview (id) for navigation view
    listview (id) for list view

    Here is my code in the controller


    Ext.define('MyApp.controller.skills', {
    extend: 'Ext.app.Controller',

    config: {
    refs: {
    mainview: '#mainview',
    listview: '#listview'
    },

    control: {
    "[action=kk]": {
    tap: 'dokk'
    }
    }
    },

    dokk: function(button, e, eOpts) {
    this.Viewport.setActiveItem('listview');

    }

    });

    button has custom action action:'kk"


    when I debug this I am getting "
    Uncaught TypeError: Cannot call method 'setActiveItem' of undefined "


    I tried this.getlisview andit does not work

    thanks

  2. #2
    Sencha - Architect Dev Team
    Join Date
    Jan 2009
    Location
    Frederick, Maryland
    Posts
    758
    Vote Rating
    30
    jminnick will become famous soon enough jminnick will become famous soon enough

      0  

    Default


    Hello my friend. By looking at what you have there I think you would be best served by starting with a step by step tutorial. This will help you better understand both Sencha Touch and Sencha Architect.

    http://docs.sencha.com/architect/2/#!/guide/first_mobile_app

    Take your time with it, do not try and rush through the tutorial.
    Jason Minnick
    Sencha Architect Development Team

Thread Participants: 1