Roberto Schuster
Roberto Schuster

Reputation: 403

ExtJs 4 MVC Application Architecture: How to reference a file in a subfolder

I'm trying to use this structure on a project:

However, if I want to insert a subfolder, like:

I don't know how to reference it.

In my app.js, I can reference MyWindow1 and MyWindow2 by:

var win1 = Ext.create('MyApp.view.MyWindow1'); var win2 = Ext.create('MyApp.view.MyWindow2');

But, how can I reference MyWindow3?

I tried

var win3 = Ext.create('MyApp.view.window3.MyWindow3');

, but no success.

Upvotes: 2

Views: 1266

Answers (1)

LittleTreeX
LittleTreeX

Reputation: 1239

If your application name is MyApp and your appFolder is app, then Ext.create('MyApp.view.window3.MyWindow3'); is correct. Check the define clause and make sure it is all spelled correctly, and also make sure the spelling and capitalization matches in both the define and the folder. IE: Ext.define('MyApp.view.window3.MyWindow3', //.... The errors for misspellings in either case is very vague, but you will come to recognize it.

Upvotes: 1

Related Questions