Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    6
    Vote Rating
    0
    sealpond is on a distinguished road

      0  

    Default Answered: Classes are not declared. Simple MVC with store

    Answered: Classes are not declared. Simple MVC with store


    Hi
    I get an error msg when i try to load a store in my app. The error msg is Uncaught Error: The following classes are not declared even if their files have been loaded: 'App.store.Events'.

    My app.js
    Code:
    Ext.Loader.setConfig({
      enabled: true
    });
    
    
    Ext.application({
      name: 'App',
      models: ['Event'],
      controllers: ['Main'],
      stores: ['Events'],
      
      launch: function() {
          Ext.create('App.view.Viewport');
      }
    });
    My Model Event.js
    Code:
    Ext.define('App.model.Event', {
      extend: 'Ext.data.Model',
      fields: ['event_date', 'event_title', 'event_body', 'event_image']
      });
    My Controller Main.js
    Code:
    Ext.define('App.controller.Main', {
      extend: 'Ext.app.Controller',
      
      views: ['Home', 'Products', 'Blog', 'Contact']
      
    });
    My Store Events.js
    Code:
    Ext.regStore('App.store.Events', {
        extend: 'Ext.data.Store',
        model: 'App.model.Event',
        config: {
        autoLoad: true,
        proxy: {
          type: 'scripttag',
          url : 'http://broken.se/app/fetch_events'
        }
    }
    });
    My View Blog.js
    Code:
    Ext.define('App.view.Blog', {
      extend: 'Ext.List',
      xtype: 'blogpage',
      store: 'App.store.Events',
      config: {
        title: 'Blog',
        iconCls: 'star',
        itemTpl: '{event_title}'
      }
    });
    Its feels like i have forgot to load the store somewhere but cant find any answer to how in the forums.

  2. Did you really intend to use Ext.regStore rather than Ext.define?

  3. #2
    Sencha User
    Join Date
    Nov 2011
    Posts
    53
    Answers
    2
    Vote Rating
    0
    paul_todd is on a distinguished road

      0  

    Default


    Did you really intend to use Ext.regStore rather than Ext.define?

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    6
    Vote Rating
    0
    sealpond is on a distinguished road

      0  

    Default


    Quote Originally Posted by paul_todd View Post
    Did you really intend to use Ext.regStore rather than Ext.define?
    Not by purpose, cant say i really know the difference though, but thanks alot, you have saved my day

Thread Participants: 1