I'm struggling a lot coming from R2 and dealing with faces. get-facet seems extremely unintuitive to me.
Let's say I have an area:
view [c: area "hello"] print get-facet c 'text-edit
get-facet always returns "hello" even if I type something else in the area. What is going on with this? The 'caret and 'state facet objects contain the correct text, but I cannot find a way to access them.
The correct command is
get-face. Get facet should be used forFor the example above, it is fixed by:
From an explanation from Cyphre:
get-faceis intended for the application programmers butget-facetis intended for style developers because it directly accesses the style internals. If styles are updated it may break code ifget-faceis not used. One should avoid using refinements such as /text or /data on faces as it was easy to do in R2AREA's facet TEXT-EDIT looks like it just stores the initialization, and the state/caret facet objects contain run-time data