[OpenLayers-Users] Format.XML write and IE

Tim Schaub tschaub at openplans.org
Fri Jan 25 22:31:44 EST 2008


Hey-

Bart van den Eijnden (OSGIS) wrote:
> Right, maybe it's working too much with Ext, and having singletons for this
> kind of stuff, like Ext.DomHelper.
> 
> I would "expect" Format.XML to be a singleton as well.
> 

In general, we don't want the parsers to be singletons because 1) some 
of them have options for configuration, and 2) some parsers inherit from 
others (as is the case with XML).  This could all be handled 
differently, but the "class"ical pattern is pervasive in the library.

Tim


> Best regards,
> Bart
> 
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> http://www.osgis.nl
> 
> 
> --------- Oorspronkelijk bericht --------
> Van: Christopher Schmidt <crschmidt at metacarta.com>
> Naar: Bart van den Eijnden OSGIS <bartvde at osgis.nl>
> Cc: users at openlayers.org
> Onderwerp: Re: [OpenLayers-Users] Format.XML write and IE
> Datum: 24/01/08 10:46
> 
>> On Thu, Jan 24, 2008 at 10:27:30AM +0100, Bart van den Eijnden (OSGIS)
> wrote:
>> &gt; It was my own stupid mistake, I was using:
>> &gt; 
>> &gt; var boundingFeature = OpenLayers.Format.XML.prototype.write(stChild);
> 
>> &gt; 
>> &gt; where I should have used:
>> &gt; 
>> &gt; var xml = new OpenLayers.Format.XML(); 
>> &gt; var boundingFeature = xml.write(stChild); 
>>
>> Was this as the result of documentation somewhere? Copy paste? It's not
>> the first time I've seen it happen, and I'd like to know why people do
>> it, if we can.
>>
>> As a rule, if you're not working on the code in lib/, you shoudl never
>> have a '.prototype.' in your code.  (I think.)
>>
>> Regards,
>> -- 
>> Christopher Schmidt
>> MetaCarta
>>
>>
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> !DSPAM:4033,479893a1211102092453641!
> 




More information about the Users mailing list