_changeProperties
Change one or more Properties of the received Thing --
Function
Most of the time in Querki, you edit Things using the UI directly, in
the Editor. But
some Spaces want a bit of automation: they want to be able to make specific
changes when a button is pressed or a link is clicked.
_changeProperties()
provides this ability. You may specify as many
parameters as you like, each of which should be a
Property Setter of the form Property Name(value)
. So for example, if you had
a Whole Number Property named My Number, you would say My Number(42)
to
initially set that Property to 42. Any Type of Property except for Functions can be
set this way, and you may set any or all of the Model's Properties.
_changeProperties()
produces the modified Thing; it is common to pass this to
_edit
or _navigateTo
.
Note: the exact semantics of _changeProperties()
will change down the line.
While it is fine to pass the resulting Thing to another stage (using ->
), you
should not count on being able to use it in later phrases (that is, lines not
connected by ->
). This is important so that we can later support multiple
changes that happen "atomically" in a light transactional system.