1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    22
    Vote Rating
    1
    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
    22
    Vote Rating
    1
    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
    Gainesville, FL
    Posts
    37,220
    Answers
    3522
    Vote Rating
    859
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      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
    ________________
    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 in print!

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

Thread Participants: 1

Tags for this Thread