From 2f36d495914262a383cee1a8ade34532ff93f2ca Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 9 Jan 2019 07:21:57 +0100 Subject: [PATCH] tweaked format for serializing atomic data lists --- HISTORY.md | 4 ++++ snap.html | 2 +- src/store.js | 8 ++++---- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 6a2068c3..73baca49 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,10 @@ # Snap! (BYOB) History ## in development + +### 2019-01-09 +* Store: tweaked format for serializing atomic data lists + ### 2019-01-08 * Objects: automatically parse csv files on import, experimental "raw data" and "parse" ops * Lists: fixed an off-by-one error in becomeLinked() diff --git a/snap.html b/snap.html index e25f0b34..5200e716 100755 --- a/snap.html +++ b/snap.html @@ -17,7 +17,7 @@ - + diff --git a/src/store.js b/src/store.js index 8c680003..b24b9512 100644 --- a/src/store.js +++ b/src/store.js @@ -61,7 +61,7 @@ normalizeCanvas, contains*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2019-January-08'; +modules.store = '2019-January-09'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1315,7 +1315,7 @@ SnapSerializer.prototype.loadValue = function (model, object) { return model.contents === 'true'; case 'list': if (model.attributes.hasOwnProperty('linked')) { - if (model.attributes.format === 'csv') { + if (model.attributes.struct === 'atomic') { v = Process.prototype.parseCSV(model.contents); v.becomeLinked(); record(); @@ -1347,7 +1347,7 @@ SnapSerializer.prototype.loadValue = function (model, object) { }); return lst; } - if (model.attributes.format === 'csv') { + if (model.attributes.struct === 'atomic') { v = Process.prototype.parseCSV(model.contents); record(); return v; @@ -2153,7 +2153,7 @@ List.prototype.toXML = function (serializer, mediaContext) { (!this.isLinked || !StageMorph.prototype.enableSublistIDs)) { // special case for a less cluttered format return serializer.format( - '@', this.asCSV()