redeclare

fun redeclare(declared: V): Boolean

Records declared as the declaration this pass makes, alongside the value the mirror holds now, and answers whether either of the two changed since the pair recorded before them - which is when a settle has something to do. The first declaration a mirror is given always answers true.

Unlike SwingNodeUpdater.set, which compares this pass's declaration against the last one alone, this also weighs the value the widget holds. A caller that does not adopt a change the widget reports keeps declaring the same value it always has, so a user repeating that same change would answer false from a check keyed on the declaration alone and never be caught; weighing the pair is what catches it.

Call this once per pass and per mirror. Where one settlement covers several mirrors, evaluate every one of them with or, not ||, so each records this pass whether or not an earlier one already answered true.

The mirrored value is part of the answer, so calling this while composing subscribes the composing scope to the widget's value changing under the declaration, as subscribe does.

Return

whether a settlement is due: the declared value, the mirrored value, or both, changed since the pair the last settlement recorded.

Parameters

declared

the value this pass declares for the property.