1

私は最初のアプリケーションを作成するために、SenchaWebサイトのビデオをフォローしています。

これは私がフォローしているビデオです:ビデオ

これは私がブログタブに使用しているコードです:

Ext.define('GS.view.Blog',{
    extend: 'Ext.navigation.View',
    xtype: 'blogpanel',

    requires: [
        'Ext.dataview.List',
        'Ext.data.proxy.JsonP'
    ],

    config: {
        title: 'Blog',
        iconCls: 'star',

        items: {
            xtype: 'list',
            itemTpl: '{title}',

            store: {
                autoLoad: true,
                fields: ['title', 'author', 'content'],

                root: {
                    leaf: false
                },

                proxy: {
                    type: 'jsonp',
                    url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',

                    reader: {
                        type: 'json',
                        rootProperty: 'responseData.feed.entries'
                    }
                }
            }
        }
    }
});

Safariコンソールでは、StoreManager.js:97で次のエラーが発生します。

TypeError: 'undefined' is not a valid argument for 'instanceof' (evaluating 'store instanceof Ext.data.Store')

私は何が間違っているのですか?

4

1 に答える 1

2

このコードを行に追加しますstore:

 store: new Ext.create('Ext.data.Store',{
            autoLoad: true,
            fields: ['title', 'author', 'content'],

            root: {
                leaf: false
            },

            proxy: {
                type: 'jsonp',
                url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',

                reader: {
                    type: 'json',
                    rootProperty: 'responseData.feed.entries'
                }
            }
        })
于 2012-06-26T14:28:36.127 に答える