Forum /
Sencha Touch 2.x Forums /
Sencha Touch 2.x: Q&A /
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.
never mind. I didn't put a reference to this.getNavig()
Thanks,
Sencha - Senior Forum Manager
Please post in the correct forum for the product/version you are using and when posting code use BBCode code tags.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us