Results 1 to 3 of 3

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

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    22
    Vote Rating
    1
      0  

    Default 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
      0  

    Default

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

    Thanks,

  3. #3
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •