https://docs.factorcode.org/content/word-gadget,ui.gadgets.html says
"pref-dim -
a cached value for pref-dim; do not read or write this slot directly."
But in extra/gesture-logger/gesture-logger.factor
and extra/rosetta-code/animate-pendulum/animate-pendulum.factor
I find
{ 450 500 } >>pref-dim
a
It's probably to set the default / initial size of the gadget.
Some gadgets do it by overriding the ``pref-dim*`` word like so:
./extra/tetris/tetris.factor:M: tetris-gadget pref-dim* drop { 200 400
} ;
And a few do it by setting it like that... I think the ``pref-dim*``
approach was the int
See the documentation for the `pref-dim` word.If you read/write the `pref-dim` slot for random gadgets, you will mess up the caching of the value and possibly the layout logic of the `ui.gadgets` vocab.It's OK to set the initial value if you don't want to override the `pref-dim*` method for that pu