[Users] Ext 3, printExtent, vector-layers with attributes and too much recursion
Andreas Hocevar
ahocevar at opengeo.org
Mon Aug 9 12:56:05 CEST 2010
Hi Marc,
the issue you are seeing is not related to #133. But you could easily avoid it by not referencing GeoExt objects in feature attributes. This is a bad practice anyway (just as bad as what we do in Feature- and LayerRecords). If you really need features to keep a reference to GeoExt objects, don't do it on the attributes, but e.g. on the feature directly (e.g. feature.test instead of feature.attributes.test).
Regards,
Andreas.
On Aug 9, 2010, at 12:36 , Marc Jansen wrote:
> Hi list,
>
> I get a too much recursion exception when I try to print a vectorlayer
> that has features with attributes that reference GeoExt-objects. I am
> pretty sure that the issue I have is related to this ticket:
> https://www.geoext.org/ticket/133
>
> You can test the behaviour with the online print-example:
> http://dev.geoext.org/trunk/geoext/examples/print-extent.html
>
> Just add a new layer to the mappanel with firebug and give it afeature
> that has one of its attributes pointing towards the mappanel object:
>
>
> var v = new OpenLayers.Layer.Vector('testmj');
> mapPanel.map.addLayer(v);
>
> v.addFeatures([
> new OpenLayers.Feature.Vector(
> OpenLayers.Geometry.fromWKT(
> "POLYGON(146.1 -41, 146.2 -41, 146.2 -41.1, 146.1 -41.1)"
> ), {test:mapPanel} // this is causing the infinite recursion
> )]);
>
>
> If you hit "print" afterwards, the error occurs.
>
> Attached to the ticket #133 (current status "Needs more work") there is
> a patch, which is not in trunk yet. Is there any chance this ticket gets
> closed soon? Or can anybody provide a suitable workaround?
>
> Regards and thanks in advance,
> Marc
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list