misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

Making a blank Miso.Dataset (with no options) results in an undefined idAttribute #180

Closed iros closed 11 years ago

iros commented 11 years ago

Comes up in the perlin noise example. In constructor if options are blank it skips the _initialize routine, thus leaving this._idAttribute = undefined. When adding rows to this blank dataset, this._idAttribute is undefined and as a result a new property called "undefined" with a value on the row being added, breaking the actual add routine, because there is no column called "undefined".

Fixing this in the constructor.js results in a load order problem because in the builds derived.js is created before any of the parsers, and we need to set the default parser to the strict parser. This is because derived.js creates a new Dataset to steal its prototype.

I am triggering initialization now regardless of options state and I moved the derived.js in the build order to the bottom after importers and parsers.

This one is a bit nutty.

iros commented 11 years ago

Oops. forked off wrong branch. closing.