2010-11-22 1 views
1

Ext.extend()を継承すると、IntellisenseがObjectメソッド以外のメソッドを表示することができません。 Intellisenseが追加の方法を表示することは可能ですか?IntellisenseはExt.extendで拡張されたオブジェクトで動作しますか?

this SO questionで提案された回避策を使用して、名前空間が機能するようになったため、この問題に関連するとは思われません。

サンプルコードは以下の通りです:私はMNS.Production.DetailedGrid()コマンドのインテリセンスを取得しても

///<reference path="ext-base.js" /> 
///<reference path="ext-all.js" /> 
///<reference path="namespace.js" /> 
MNS.Production.DetailedGrid = Ext.extend(MNS.commonUI.GridPanel, 
{ 
    initComponent: function() { 
    var columns = this.getColumns(); 
    }, 

    getColumns: function() { 
    var columns = 
    //...build columns 
    }, 
    //.... 
    //....Additional methods, etc. 
}); 


var detailedGrid = new MNS.Production.DetailedGrid(); 

、私はデフォルトの方法を除いて、detailedGridオブジェクトのメソッドのいずれかのインテリセンスを得ることはありません。 Visual Studioでこれらのメソッドを表示するにはどうすればよいですか?

答えて

0

私はtwo ways to extend an object using ExtJSがあるものの、インテリセンスがあなたのコードで動作することを唯一の方法は、あなたが次の構文を使用した場合であることを発見しましたファイルの先頭。

0

このMSDNの記事は見ましたか?

///<reference path="ext-base.js" /> 
///<reference path="ext-all.js" />  
// create constructor for new class 
Ext.ResizableConstrained = function(el, config){ 
    Ext.ResizableConstrained.superclass.constructor.call(this, el, config); 
}; 

// extend the base class 
Ext.extend(Ext.ResizableConstrained, Ext.Resizable, { 
    setXConstraint : function(left, right){ 
     // Obtain a reference to parent dd property and setXConstraint 
     this.dd.setXConstraint(left, right); 
    }, 

    setYConstraint : function(up, down){ 
    // Obtain a reference to parent dd property and setYConstraint 
    this.dd.setYConstraint(up, down); 
    } 
}); 

///参照がでする必要があります MSDN Blog

+0

そのブログの記事には、修正が2008年のものであると記載されており、次回のリリースで修正される予定です。私は2010年を使っているので、それはうまくいくとは思っていませんでしたが、とにかく運がないと試しました。 – amccormack

関連する問題