Ticket #285 (closed defect: fixed)
copy empty text morph sets contents to undefined, when there is a connection
| Reported by: | jenslincke | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Apps | Keywords: | |
| Cc: |
Description
creating a text example: connect(this, "textString", this.get("layeredRealList"), "filterItems", {});
Change History
comment:2 Changed 4 months ago by jenslincke
fixed in 130542
solution lively.morphic.TextChunk?.addMethods({
restoreFromCacheContent: function () {
if this.storedString is undefined we dont want to print it "undefined"
this.textString = this.storedString ""; delete this.storedString;
}});
test lively.morphic.Tests.TextMorphTests?.addMethods({
test08CopyTextWithConnection: function () {
issue 285 var m = new lively.morphic.Text(new Rectangle(0,0, 100, 20), ""); connect(m, 'textString', m, 'someOtherField') var copy = m.duplicate() this.assert(copy.textString == , 'copy is broken')
}});
Note: See
TracTickets for help on using
tickets.

http://lively-kernel.org/repository/webwerkstatt/issues/120126_CopyEmtpyTextWithConnectionBroken.xhtml