Ticket #40 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

FeatureRecord.create and LayerRecord.create should not modify globally defined prototypes

Reported by: sbenthall Assigned to:
Priority: major Milestone: 0.5
Component: GeoExt.data Version:
Keywords: Cc:
State: Commit

Description

Currently, FeatureRecord.create and LayerRecord.create modify the globally defined prototypes of their respective classes by adding extra fields. This is not the intended behavior of those two methods.

The attached patch is a fix for this problem. It uses a method similar to that used in Ext.data.Record.create to make new Record constructors have a new list of fields that is not shared by the Record class's prototype.

Attachments

records.patch (3.7 kB) - added by sbenthall on 04/14/09 22:26:45.
now with regression tests
records.2.patch (3.6 kB) - added by elemoine on 04/15/09 14:20:13.

Change History

04/14/09 22:26:45 changed by sbenthall

  • attachment records.patch added.

now with regression tests

04/14/09 22:32:14 changed by sbenthall

(In [382]) Made FeatureRecord.create() and LayerRecord.create() not modify prototype fields. (see #40)

04/15/09 14:20:13 changed by elemoine

  • attachment records.2.patch added.

04/15/09 14:21:26 changed by elemoine

Good catch Sebastian! I slightly modified your patch. Tell if the patch is fine to you.

04/15/09 18:34:16 changed by sbenthall

Yep, definitely good modifications. Patch looks great, Eric.

04/16/09 08:30:57 changed by elemoine

  • state changed from Review to Commit.

04/16/09 08:32:41 changed by elemoine

  • status changed from new to closed.
  • resolution set to fixed.

(In [400]) FeatureRecord.create and LayerRecord.create should not modify globally defined prototypes, initial patch from sbenthall, r=me (closes #40)