The Komponent Value Text Preview shows 77.36879 (correct).
The actual wallpaper shows the correct value too.
Now we use $gv(Value)$ in a progress bar inside the Komponent, but it shows the literal formula as the Text Preview (see Vysor screenshot, attached)
Also, whilst the wallpaper in reality shows the correct value, the preview screen in the KLWP editor shows zero (probably as text is an illegal numeric value so is default to 0?)
I would guess that the core code is fine, but there's a bug *within* the editor that is failing to spot formulae and failign to evaluate them in preview contexts.
All the best, Tim Watts
PS - KLWP ROCKS!!! Yes I paid :) It is extremely powerful and very solid.
??? I just went back and looked again and it fixed itself? Both the preview graphics and the Text Preview box are now showing the computed answer, not the literal formula
Another bug related to this is that if you inherit a global text from a main component with a function and you link a text global in a subcomponent (same and different name) to the main component, the formula is inserted as text instead of it being calculated
main component
- global text <name> = $df(YYYY)$
subcomponent
- global text <name1> = (inherit <name> from parent)
- global text <name2> = $gv(name1)$ => shows as $df(YYYY)$
Even after save, close and reopen
Expected behavior: get the value of <name> in <name1> and <name2>
I hope someone can confirm this bug. I stumble on this many times to transfer data between components.
I was currently creating some dynamic colors in root (via text fields because color fields won't accept calculations), but can't transfer them to my sub component now :/
I am also experiencing this bug in the following way:
In root, I have global variables that pick a color, for example, the following:
GV1 = $if(wi(temp) > 50, #FF0000FF, #FFFF0000)$
GV2 = $ce(gv(GV1), sat, 50)$
For the wallpaper I am making, I want to pass these variables to a komponent that is also in root. Inside the komponent, I make variables, set them to global, and link then to the root variables. Rather than the output of the formula, I get the formula itself ($if(wi(temp) > 50, #FF0000FF, #FFFF0000)$ for GV1 and $ce(gv(GV1), sat, 50)$ for GV2), rendering the global unusable.
I'm not sure if this affects anything from an efficiency standpoint, but if I want to change the formula, I have to change it both in root and in the komponent (since I can't use the global function).
Unfortunately, even if I exit the app and restart, the bug persists.
@Libnanian This is the same problem I described below and there is another thread that I opened with this explination. It has been confirmed in that thread, but I think it is not high on the priority list or it is difficult to solve. I'll check if I can find that thread.