-
17 Sep 2012 2:36 AM #1
Unanswered: view is not defined error message
Unanswered: view is not defined error message
The below is my code. I am unable to create view it is giving error as view is not defined. pls give me
solution. Thanks in advance.
Code:Ext.define('Acsellerate.view.Main', { extend: 'Ext.navigation.View', alias: 'widget.main', config: { //useTitleForBackButtonText: true, defaultBackButtonText: '', navigationBar: { backButton: { iconCls: 'reply', iconMask: true }, cls: 'title', layout: { pack: 'center', type: 'hbox' } }, items: [{ title: 'First', items: [{ xtype: 'button', text: 'Push a new view!', handler: function() { //use the push() method to push another view. It works much like //add() or setActiveItem(). it accepts a view instance, or you can give it //a view config. alert('hi'); view.push({ title: 'Second', html: 'Second view!' }); } }] }] } });Last edited by jay@moduscreate.com; 18 Sep 2012 at 6:17 AM. Reason: NO [code][/code] tags in post
-
18 Sep 2012 6:17 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,170
- Vote Rating
- 32
- Answers
- 83
I modified your post. Please wrap your stuff with CODE tags in the future.

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
18 Sep 2012 6:19 AM #3Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,170
- Vote Rating
- 32
- Answers
- 83
the "view" reference YOU are trying to access is not defined! you need to define it somehow.
btn.getParent().push({ ... });
Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.


Reply With Quote