PDA

View Full Version : When to use alias and when to use defined in a controller?



davisty
5 Feb 2015, 6:59 AM
Hello,

Im trying to learn MVC and Im getting a little confused.

In the controller, when should I use the alias and when should I used the Ext.define object when referring to a button or such?

Thank You

joel.watson
9 Feb 2015, 3:20 PM
Hi--

Do you have a specific example regarding this question?

Typically, you'd use Ext.define() to define a class or override. With aliases, you would typically use these for defining short "aliases" for classes, such as an xtype for a component (e.g., widget.mygrid).

What are you trying to do within your controller?

Thanks!
Joel