I try in Dojo
var a=new DATALINK_MSTP();
but I got error base class is not a callable constructor
dojo.declare("DATALINK", null, {
    _id:'',
    _type:'',
    _network:'',
    _mac:'',
    _hop_count:'',
    _mqueue:'',
    constructor: function(){
 开发者_如何学Python       this._id='';
        this._type='';
        this._newtwork='';
        this._mac='';
        this._hop_count='';
        this._mqueue=new MQUEUE();
    },
    get_id:function(){
        return this._id;
    },
    set_id:function(id){
        this._id=id;
    },
    get_type:function(){
        return this._type;
    },
    set_type:function(type){
        this._type=type;
    },
    get_network:function(){
        return this._network;
    },
    set_network:function(network){
        this._network=network;
    },
    get_mac:function(){
        return this._mac;
    },
    set_mac:function(mac){
        this._mac=mac;
    },
    get_hop_count:function(){
        return this._hop_count;
    },
    set_hop_count:function(hop_count){
        this._hop_count=hop_count;
    },
    get_mqueue:function(){
        return this.mqueue;
    },
    set_mqueue:function(mqueue){
        this._mqueue=mqueue;
    },
    generate_div:function(){
    },
    generate_xml:function(){
    }
});
dojo.declare("DATALINK_MSTP","DATALINK", {
        _mstp:'',
    constructor: function(){
        this._mstp=new MSTP();
    },
    get_mstp:function(){
        return this._mstp;
    },
    set_mstp:function(mstp){
        this._mstp=mstp;
    },
    generate_xml:function(){
    }
});
dojo.declare("DATALINK_BIP","DATALINK", {
        _bip:'',
    constructor: function(/*id,type, network, mac, hop_count,mqueue,bip*/){
        this._bip=new BIP();
    },
    get_bip:function(){
        return this._bip;
    },
    set_bip:function(bip){
        this._bip=bip;
    },
    generate_xml:function(){
    }
});
I worked earlier with Dojo and it workd fine, but I have some arguments at constructor classes(I have tested MSTP class, it works fine). Can anybody tell me where I make mistake ?
try this :
dojo.declare("DATALINK_MSTP", DATALINK, {...});
dojo.declare("DATALINK_BIP", DATALINK, {...});
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论