var GraphicsLayer = GraphicsLayer.createSubclass({
declaredClass:"egova.layers.GraphicsLayer",
...
addGraphic:function (id, layerTag, geometry, style, attr,
hStyle, popupTemplate) {
var graphic = new Graphic({geometry:geometry});
this.setSymbol(graphic,style);
graphic.style = style;
graphic.attributes = attr;
graphic.id = id;
graphic.hStyle = hStyle;
graphic.layerTag = layerTag;
graphic.extent = geometry.extent;
popupTemplate&&(graphic.popupTemplate = popupTemplate);
this.add(graphic);
return graphic;
}
});
when to add a graphic to graphicslayer,console prints the errors"Accessor#set Assigning an instance of 'esri.Graphic' which is not a subclass of 'esri.Graphic'",what's the problem?