DEPRECATED AS A PROPERTY IN SENCHA TOUCH?

Jayden Bell

Total Post:110

Points:774
Posted by  Jayden Bell
 2024  View(s)
Ratings:
Rate this:
Hi Developers,

I am using Sencha Touch 2 to build an application. When I load the application into a browser, I am getting the following error: [DEPRECATE][Anonymous] stores is deprecated as a property directly on the Ext.app.Controller prototype. Please put it inside the config object. I cannot figure out why this error is occurring. Any help? Thanks! The first part of my MainController code is as follows:

config: {
    models: [
        'Tasks'
    ],

    stores: [
        'TaskList'
    ],

    views: [
        'MainCarousel',
        'StartScreen',
        'WhatScreen',
        'WhenScreen',
        'Login'
    ],

    refs: [{
        ref: 'mainCarousel',
        selector: 'maincarousel'
    }, {
        ref: 'whenScreen',
        selector: 'whenscreen'
    }, {
        ref: 'whatScreen',
        selector: 'whatscreen'
    }, {
        ref: 'startScreen',
        selector: 'startscreen'
    }, {
        ref: 'login',
        selector: 'login'
    }],
},
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: Deprecated as a property in Sencha Touch?

    Hi Jayden,


    Move stores[] array inside config object inside your controller definition:

    ...
    config: {
       stores: [..]
    }
    ...

    As for defining refs inside controller check out Sencha doc on how to define refs.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!