PDA

View Full Version : Inconsistent API?



gianmarco
17 Jun 2011, 5:14 AM
Hi,
I'm following MVC tutorial for Ext4. In this tutorial you show how to let all the pieces know of each other via some configuration properties, e.g.


Ext.create('Ext.app.Application', {
controllers: ['Tickets'], // You just specify name, Extjs know that it is App.controller.Tickets
...
});

Ext.define('Spike.controller.Tickets', {
extend: 'Ext.app.Controller',
models: ['Ticket'], // You just specify name, Extjs know that it is App.model.Ticket
...
});

Ext.define('Spike.controller.Tickets', {
extend: 'Ext.app.Controller',
models: ['Ticket'], // You just specify name, Extjs know that it is App.model.Ticket
...
});

Ext.define('Spike.store.Tickets', {
extend: 'Ext.data.Store',
model: 'Spike.model.Ticket', // You have to specify the full name, otherwise it doesn't work
...
});


So, it sound really strange to me that only the Store configuration doesn't accept simplified name for model.

What's the reason for that?