Closed johnspackman closed 4 days ago
Something, somewhere, says that if you use deferredInit
then you do not use init
, and I'm pretty sure that's what I found was the case when reimplementing properties. Once a property value has been initialized, e.g., with init
, it can't be changed with another initialization, in this case, initX()
. Exclude the init
members of the property descriptors, and it should work as expected.
Ah - thank you that makes sense, although it seems a bit odd; it seems really odd that the initXxx
function will call apply
and fire events, whether defining the initial value or not.
@johnspackman Is your problem solved? May I close it?
@goldim yes :)
It looks like the deferred init / aka init defined by constructor does not work; the docs say that you can use the
initXxx()
method to change the initialisation value, and this is a key reason for having theinitXxx
function - but I'm finding that it ignores the actual value passed intoinitXxxx()
.This seems like a substantial and surprising regression that crept in at some point, please can I have some extra eyes to sanity check my example?
Here's the documentation: https://archive.qooxdoo.org/current/pages/core/defining_properties.html
Here's the example code, also available at https://tinyurl.com/2mbuuum2
The output is: