DreamGUI
Diagnostics

DUI7xxx · Write-back

The designer's edit could not be put into the text.

Generated by scripts/diagnostics/sync.py from the plugin's code table (EDreamUIDiagnosticCode); the name on each card is the one the tests assert.

DUI7001

errorcode namePatchTargetNotFound

A designer edit with no home in the file: an unknown node, a bound property, a slot with no block.

How it happens: the designer has a change to write into the text and no place to write it: no node, style or resource of that name in the file; a property bound with <- or decided by a Shown <-, whose binding a written value would silently replace or be overwritten by; a slot Name with no block to hold a property; a node to insert whose id already exists; the root, or a loop's template, to remove or move; a file that did not parse into a tree at all. Nothing is written.

How to fix: make the change in the text, as the message says -- give the slot a { }, or remove the binding before editing in the designer.

DUI7002

errorcode nameSourceFileChangedUnderEdit

The file changed under a pending edit; nothing was written.

How it happens: a designer edit is planned against the tree last parsed from the file, and before writing, the text on disk no longer matches that tree (you edited the file in another editor, for example), or two edits landed on the same characters. The designer never writes over a file changed on disk.

How to fix: let the editor read the file again (saving it recompiles), then make the change in the designer again.

DUI7003

errorcode namePatchValueNotRepresentable

A value the language cannot spell (a non-finite number); its line is left alone.

How it happens: the printer spells a non-finite float the way printf does, and inf lexes as an identifier, so a file written with one parses and then refuses on the next compile, on a line nobody touched -- so the write is refused instead. An enum byte the enum does not declare is refused the same way. Nothing is wrong with the file, which is why this does not borrow the lexer's DUI1004.

How to fix: give the property a finite value in the designer, or write it in the text.

DUI7004

errorcode namePatchSyntaxNotWritable

An edit to something no line spells: a visibility an if decides, a shorthand that cannot be rewritten.

How it happens: some values are not written on a line of their own but made when the file is read, and the designer does not invent a line where the author wrote none: the visibility of a widget in an if branch; a SizeRule other than Fill on @fill 2, or a weight @fill cannot be written with; anything on a row of a rows table but a column's value or a line of the row's own block (a row is not removed, moved, named or given a + block from the designer).

Widget Root {
    if HasSave() {
        Text Continue { Text = "Continue" }
    }
}

How to fix: edit the text: change the if's condition or move the widget out of the branch; replace @fill 2 with @slot SizeRule = … and @slot FillWeight = 2; edit a row in its table.

DUI7005

errorcode namePatchStyleComponentNotWritable

An edit to a value a style's + line gives the node; add the line to the node or change the style.

How it happens: the node takes the value from a + Component { … } line of its style and writes no + line of that class itself. The value has two homes and the write-back takes neither: the style is shared, so writing there would move every node that wears it, and a + block of the node's own is a change to the file's shape the value pass does not make.

style RowColumn {
    + VerticalBox { Spacing = 15 }
}

Widget Left : RowColumn { }

How to fix: write + VerticalBox { Spacing = 20 } on the node itself, or change the style.

On this page