<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi Bart,</DIV>
<DIV> </DIV>
<DIV>Sorry I forget to put list address in cc.</DIV>
<DIV> </DIV>
<DIV>My problem is still there, giving me the same error, pointing towards LayerLoader.js<BR><BR></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><BR><BR>--- On <B>Mon, 19/7/10, Bart van den Eijnden (OSGIS) <I><bartvde@osgis.nl></I></B> wrote:<BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><BR>From: Bart van den Eijnden (OSGIS) <bartvde@osgis.nl><BR>Subject: Re: [Users] Error while try to display LegendGraphics in Layer Tree<BR>To: "Jehanzeb Orakzai" <jehanzeb_orakzai@yahoo.com><BR>Cc: users@geoext.org<BR>Date: Monday, 19 July, 2010, 18:53<BR><BR>
<DIV class=plainMail>Always reply to the list please,.<BR><BR>Loader needs to get an instance, so:<BR><BR>loader: new mloader(),<BR><BR>Best regards,<BR>Bart<BR><BR>> I have tried like this but still its not working and give me the same<BR>> error:<BR>> <BR>> var mloader = Ext.extend(GeoExt.tree.LayerLoader(<BR>> {<BR>> createNode: function(attr)<BR>> {<BR>> attr.iconCls =<BR>> this.store.getById(attr.layer.id).get('icon');<BR>>
<BR>> GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);<BR>> }<BR>> }<BR>> ));<BR>><BR>><BR>><BR>> Thank you,<BR>> --<BR>> Jehanzeb<BR>><BR>> --- On Mon, 19/7/10, Bart van den Eijnden (OSGIS) <<A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=bartvde@osgis.nl" ymailto="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A>><BR>> wrote:<BR>><BR>><BR>> From: Bart van den Eijnden (OSGIS) <<A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=bartvde@osgis.nl" ymailto="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A>><BR>>
Subject: Re: [Users] Error while try to display LegendGraphics in Layer<BR>> Tree<BR>> To: "Jehanzeb Orakzai" <<A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=jehanzeb_orakzai@yahoo.com" ymailto="mailto:jehanzeb_orakzai@yahoo.com">jehanzeb_orakzai@yahoo.com</A>><BR>> Cc: "GeoExt" <<A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=users@geoext.org" ymailto="mailto:users@geoext.org">users@geoext.org</A>><BR>> Date: Monday, 19 July, 2010, 17:36<BR>><BR>><BR>> Use Ext.extend to extend GeoExt.tree.LayerLoader.<BR>><BR>> Best regards,<BR>> Bart<BR>><BR>>> Hi,<BR>>> <BR>>> I am receiving the following error while trying to display legend<BR>>> graphic<BR>>> in LayerContainer of Tree.<BR>>> <BR>>> this.addEvents is not a function<BR>>> "load"<BR>>><BR>>> The code that I am trying with is:<BR>>> <BR>>> var mloader =
GeoExt.tree.LayerLoader(<BR>>> {<BR>>> createNode: function(attr)<BR>>> {<BR>>> attr.iconCls =<BR>>> this.store.getById(attr.layer.id).get('icon');<BR>>> <BR>>> GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);<BR>>>
}<BR>>> }<BR>>> );<BR>>> <BR>>> var layerCon = new GeoExt.tree.LayerContainer(<BR>>> {<BR>>> text: "Layers",<BR>>> layerStore: mapPanel.layers,<BR>>>
loader: mloader,<BR>>> expanded: true<BR>>> }<BR>>> );<BR>>><BR>>> Can somebody point me out what I am doing wrong?<BR>>> <BR>>> I have also looked at these mail threads but could'nt figure out problem<BR>>> in my code:<BR>>> <BR>>> 1. <A href="http://www.mail-archive.com/users@geoext.org/msg00392.html" target=_blank>http://www.mail-archive.com/users@geoext.org/msg00392.html</A><BR>>> <BR>>> 2. <A href="http://www.mail-archive.com/users@geoext.org/msg00336.html" target=_blank>http://www.mail-archive.com/users@geoext.org/msg00336.html</A><BR>>> <BR>>> <BR>>> Any help
is appreciated.<BR>>> <BR>>> <BR>>> Thank you,<BR>>> --<BR>>> Jehanzeb<BR>>><BR>>><BR>>> _______________________________________________<BR>>> Users mailing list<BR>>> <A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=Users@geoext.org" ymailto="mailto:Users@geoext.org">Users@geoext.org</A><BR>>> <A href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target=_blank>http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR>>><BR>><BR>><BR>> --<BR>> Looking for flexible support on OpenLayers or GeoExt? Please check out<BR>> <A href="http://www.osgis.nl/support.html" target=_blank>http://www.osgis.nl/support.html</A><BR>><BR>> Bart van den Eijnden<BR>> OSGIS<BR>> <A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=bartvde@osgis.nl"
ymailto="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A><BR>><BR>><BR>><BR>><BR>><BR><BR><BR>-- <BR>Looking for flexible support on OpenLayers or GeoExt? Please check out<BR><A href="http://www.osgis.nl/support.html" target=_blank>http://www.osgis.nl/support.html</A><BR><BR>Bart van den Eijnden<BR>OSGIS<BR><A href="http://uk.mc243.mail.yahoo.com/mc/compose?to=bartvde@osgis.nl" ymailto="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A><BR><BR></DIV></BLOCKQUOTE></td></tr></table><br>