<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I am receiving the following error while trying to display legend graphic in LayerContainer of Tree.</DIV>
<DIV> </DIV>
<DIV><SPAN class="objectBox objectBox-errorMessage hasBreakSwitch " role=presentation><FONT color=#ff0000>this.addEvents is not a function</FONT></SPAN></DIV>
<DIV><SPAN class="objectBox objectBox-errorMessage hasBreakSwitch " role=presentation><FONT color=#ff0000>"load"</FONT></SPAN><BR></DIV>
<DIV>The code that I am trying with is:</DIV>
<DIV> </DIV>
<DIV>var mloader = GeoExt.tree.LayerLoader(<BR> {<BR> createNode: function(attr)<BR> {<BR> attr.iconCls = this.store.getById(attr.layer.id).get('icon');<BR> GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);<BR>
}<BR> }<BR> );</DIV>
<DIV> </DIV>
<DIV> var layerCon = new GeoExt.tree.LayerContainer(<BR> {<BR> text: "Layers",<BR> layerStore: mapPanel.layers,<BR> loader: mloader,<BR> expanded: true<BR>
}<BR> );<BR></DIV>
<DIV>Can somebody point me out what I am doing wrong?</DIV>
<DIV> </DIV>
<DIV>I have also looked at these mail threads but could'nt figure out problem in my code:</DIV>
<DIV> </DIV>
<DIV>1. <A href="http://www.mail-archive.com/users@geoext.org/msg00392.html">http://www.mail-archive.com/users@geoext.org/msg00392.html</A></DIV>
<DIV> </DIV>
<DIV>2. <A href="http://www.mail-archive.com/users@geoext.org/msg00336.html">http://www.mail-archive.com/users@geoext.org/msg00336.html</A></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Any help is appreciated.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT color=#00007f size=2 face="verdana, helvetica, sans-serif"><STRONG>Thank you,</STRONG></FONT></DIV>
<DIV><FONT color=#00007f size=2 face="verdana, helvetica, sans-serif"><STRONG>--</STRONG></FONT></DIV>
<DIV><FONT color=#00007f size=2 face="verdana, helvetica, sans-serif"><STRONG>Jehanzeb</STRONG></FONT></DIV></td></tr></table><br>