0

Ext 3.3.1 アプリケーションを Ext 4 に移行しようとしています (現時点では互換性レイヤーを使用)。GeoExt でいくつか問題が発生しました。現在、99 行目で「ページにロードされていないクラスから拡張しようとしています」と表示されています。99 行目は以下のコードのすべてです。

この問題に対処する方法についての提案やヒントは大歓迎です。ありがとう。

    return selectControl;
},featureSelected:function(evt){
    if(!this._selecting){
        var store=this.grid.store;
        var row=store.findBy(function(record,id){
            return record.data.feature==evt.feature;
        });
        if(row!=-1&&!this.isSelected(row)){
            this._selecting=true;
            this.selectRow(row,!this.singleSelect);
            this._selecting=false;
            this.grid.getView().focusRow(row);
        }
    }
},
featureUnselected:function(evt){
    if(!this._selecting){
        var store=this.grid.store;
        var row=store.findBy(function(record,id){
            return record.data.feature==evt.feature;
        });
        if(row!=-1&&this.isSelected(row)){
            this._selecting=true;
            this.deselectRow(row);
            this._selecting=false;
            this.grid.getView().focusRow(row);
        }
    }
},
rowSelected:function(model,row,record){
    var feature=record.data.feature;
    if(!this._selecting&&feature){
        var layers=this.getLayers();
        for(var i=0,len=layers.length;i<len;i++){
           if(layers[i].selectedFeatures.indexOf(feature)==-1){
               this._selecting=true;
               this.selectControl.select(feature);
               this._selecting=false;
               break;
            }
        }
    }
},
rowDeselected:function(model,row,record){
    var feature=record.data.feature;
    if(!this._selecting&&feature){
        var layers=this.getLayers();
        for(var i=0,len=layers.length;i<len;i++){
            if(layers[i].selectedFeatures.indexOf(feature)!=-1){
                this._selecting=true;
                this.selectControl.unselect(feature);
                this._selecting=false;
                break;
            }
        }
    }
},
getLayers:function(){
    return this.selectControl.layers||[this.selectControl.layer];
}
};
GeoExt.grid.FeatureSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,GeoExt.grid.FeatureSelectionModelMixin);
Ext.namespace("GeoExt","GeoExt.data");
GeoExt.data.LayerReader=function(meta,recordType){
    meta=meta||{};
    if(!(recordType instanceof Function)){
        recordType=GeoExt.data.LayerRecord.create(recordType||meta.fields||{});
    }
4

1 に答える 1

1

私はこれを見つけました。それはあなたの問題を解決しますか?

Ext.ux.form.AGrid = Ext.extend(Ext.grid.EditorGridPanel、{blabla:'test'})新しいExt.defineを使用してみてください。動的ロードを使用している場合は、define with extend:'someclass'を使用する必要があります。そうすれば、ダイナミックローダーは拡張するクラスを最初にロードするようになります。

または、ext-all.jsを使用して、古い方法で実行することもできます。

http://www.sencha.com/forum/archive/index.php/t-125402.html?s=cdae2bc4c55d9b9436b67d7a799addee

于 2011-08-09T16:15:58.687 に答える