papy newbie
Joined: 16 May 2008 Posts: 5
|
Posted: Tue Dec 23, 2008 8:00 am Post subject: Reference bug with loadProject |
|
|
Hi Cedric,
Sorry if my post is at the wrong place but i don't know where to post it.
So one of my student found a bug with reference with the loadProject function.
I have found a piece of code that describe and reproduce the bug (i think that this exemple is clear):
| Code: | insert this.test = "bar";
ref this.foo = this.test;
pushItem this.labels;
pushItem this.labelTable;
ref this.labelTable = this.labels#back;
insert this.labels#back = "foo";
pushItem this.labels;
pushItem this.labels#back.sublabels;
ref this.labels#back.sublabels#back = this.test;
pushItem this.labels;
pushItem this.labels#back.sublabels;
ref this.labels#back.sublabels#back = this.foo;
saveProject("tutu");
loadProject("tutu");
saveProject("toto"); |
the resulting project file should be :
| Code: | "project" = {
.test = "bar",
.foo = &ref "project.test" = "bar",
.labels = {
[
"0":"foo",
"1": {
.sublabels = {
[
"0":&ref "project.test" = "bar"
]
}
},
"2": {
.sublabels = {
[
"0":&ref "project.test" = "bar"
]
}
}
]
},
.labelTable = &ref "project.labels[\"0\"]" = "foo"
}
|
but it's :
| Code: | "project" = {
.test = "bar",
.foo = &ref "project.test" = "bar",
.labels = {
[
"0":"foo",
"1": {
.sublabels = {
[
"0":"bar"
]
}
},
"2": {
.sublabels = {
[
"0":"bar"
]
}
}
]
},
.labelTable = &ref "project.labels[\"0\"]" = "foo"
}
|
I think that loadProject doesn't restore references to node that are in the parent node or in a upper level than referee node.
Best regards,
Christophe Fajardo. |
|