Jens Mönig 2016-06-10 10:09:22 +02:00
rodzic 9cd720d613
commit f1d91d16ad
2 zmienionych plików z 13 dodań i 9 usunięć

Wyświetl plik

@ -62,7 +62,7 @@ CellMorph, ArrowMorph, MenuMorph, snapEquals, Morph, isNil, localize,
MorphicPreferences, TableDialogMorph, SpriteBubbleMorph, SpeechBubbleMorph,
TableFrameMorph, TableMorph, Variable, isSnapObject*/
modules.lists = '2016-May-02';
modules.lists = '2016-June-10';
var List;
var ListWatcherMorph;
@ -387,9 +387,11 @@ List.prototype.becomeLinked = function () {
stop = this.length();
for (i = 0; i < stop; i += 1) {
tail.first = this.contents[i];
tail.rest = new List();
tail.isLinked = true;
tail = tail.rest;
if (i < (stop - 1)) {
tail.rest = new List();
tail.isLinked = true;
tail = tail.rest;
}
}
this.contents = [];
this.isLinked = true;

Wyświetl plik

@ -60,7 +60,7 @@ SyntaxElementMorph, Variable, isSnapObject, console, BooleanSlotMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.store = '2016-June-01';
modules.store = '2016-June-10';
// XML_Serializer ///////////////////////////////////////////////////////
@ -1182,7 +1182,7 @@ SnapSerializer.prototype.loadValue = function (model) {
record();
lst = v;
items = model.childrenNamed('item');
items.forEach(function (item) {
items.forEach(function (item, i) {
var value = item.children[0];
if (!value) {
v.first = 0;
@ -1194,9 +1194,11 @@ SnapSerializer.prototype.loadValue = function (model) {
if (tail) {
v.rest = myself.loadValue(tail);
} else {
v.rest = new List();
v = v.rest;
v.isLinked = true;
if (i < (items.length - 1)) {
v.rest = new List();
v = v.rest;
v.isLinked = true;
}
}
});
return lst;