Can't get ExtJS to write to console -


i'm trying started extjs, documentation isn't helpful.

i literally have copy&pasted 1 of examples, , won't invoke controller's init function. followed there recommended directory layout

project organization:

my_app   |-- // node.js stuff   |--public        |--app        |   |--controller        |          |--users.js        |        |--ext-4        |   |--extjs        |   |--app.js        |   |--index.html        |        |--app.js 

app.js

ext.application({     requires: ['ext.container.viewport'],     name: 'am',      appfolder: 'app',      controllers: [         'users'     ],      launch: function() {         ext.create('ext.container.viewport', {             layout: 'fit',             items: [                 {                     xtype: 'panel',                     title: 'users',                     html : 'list of users go here'                 }             ]         });     } }); 

users.js

ext.define('am.controller.users', {     extend: 'ext.app.controller',      init: function() {         this.control({             'viewport > panel': {                 render: this.onpanelrendered             }         });     },      onpanelrendered: function() {         console.log('the panel rendered');     } }); 

which exactly what's in getting-started docs. page loads&displays, controller isn't, , no output console. help?!?? tried both chrome , firefox

i'm not sure why trying start ext js 4.1.3, current version 4.2.1. also, directory structure wrong: both index.html , app.js should in top directory:

+ |- app + |      |- controller + |                    |- users.js |- app.js |- index.html 

the appfolder property in ext.application call points directory relative index.html. no magic here.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -