1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    17
    Vote Rating
    0
    vipul30 is on a distinguished road

      0  

    Default Unanswered: Touch Navigation View - Uncaught ReferenceError: getNavig is not defined

    Unanswered: Touch Navigation View - Uncaught ReferenceError: getNavig is not defined


    I am following an example line by line using Architect for Touch, but the controller for some reason can't see my reference to the Navigation View for a list component when using onListDisclose. Can someone please see what I'm doing wrong?

    Ext.define('MyApp.view.presidentList', {
    extend: 'Ext.dataview.List',
    alias: 'widget.presidentlist',


    config: {
    store: 'presidentstore',
    onItemDisclosure: true,
    itemTpl: [
    '<div>{firstName} {lastName}</div>'
    ]
    }


    });

    Ext.define('MyApp.view.presidentDetail', {
    extend: 'Ext.Panel',
    alias: 'widget.presidentdetail',


    config: {
    title: 'president details',
    html: 'hi'
    }


    });

    Ext.define('MyApp.store.presidentStore', {
    extend: 'Ext.data.Store',
    alias: 'store.presidentstore',


    requires: [
    'MyApp.model.president'
    ],


    config: {
    data: [
    {
    firstName: 'George',
    middleName: 'W',
    lastName: 'Washington'
    },
    {
    firstName: 'Mike',
    middleName: 'W',
    lastName: 'A'
    },
    {
    firstName: 'Joe',
    middleName: 'W',
    lastName: 'D'
    },
    {
    firstName: 'Larry',
    middleName: 'W',
    lastName: 'P'
    },
    {
    firstName: 'Rojer',
    middleName: 'W',
    lastName: 'Washington'
    }
    ],
    model: 'MyApp.model.president',
    storeId: 'presidentstore'
    }
    });

    Ext.define('MyApp.model.president', {
    extend: 'Ext.data.Model',
    alias: 'model.president',


    config: {
    fields: [
    {
    name: 'firstName'
    },
    {
    name: 'middleName'
    },
    {
    name: 'lastName'
    }
    ]
    }
    });

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


    config: {
    refs: {
    navig: 'navig'
    },


    control: {
    "list": {
    disclose: 'onListDisclose'
    }
    }
    },


    onListDisclose: function(list, record, target, index, e, options) {
    console.log('getNavig: ', getNavig());
    }


    });


    Thank you.

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Posts
    17
    Vote Rating
    0
    vipul30 is on a distinguished road

      0  

    Default


    never mind. I didn't put a reference to this.getNavig()

    Thanks,

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    436
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Please post in the correct forum for the product/version you are using and when posting code use BBCode code tags.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.