GREEN button text overlaid in EPG Search after Add Timer
Reproduction steps
In Graphical EPG, navigate to a program that repeats within the week.
Press YELLOW EPG Search.
Navigate to any entry in the search results and press GREEN Add Timer.
In the Timer Edit screen press OK to accept the timer.
On return to the EPG Search screen, the GREEN button hint has Change timer/Add timer overwritten in the button text.
Comments (8)
-
-
reporter - edited description
-
reporter Components.Button
has a dummy implementation of code allows it to be a Source in a<widget source= .../>
screen widget without crashing, andComponents.Label
shares this characteristic with it.Having a
<widget source= ... render="Label" ... />
screen widget for aComponents.Button
attaches aComponents.Renderer.Label
renderer to the widget, but the dummy implementation of the "Source" codeComponents.Button
in means that changes to the text in theComponents.Button
aren't pushed downstream to the renderer.Since there is also a
<widget name= ... />
screen widget for theComponents.Button
, there are two objects displaying in the same spot, theComponents.Button
and theComponents.Renderer.Label
. However, whenButton.setText()
is called, there's no corresponding "push" of the new value to the renderer, so its display isn't changed.If the
Button
is given an initial text value, though, when theComponents.Renderer.Label
connects to theComponents.Button
, it reads the text value of theButton
and displays it (independently of the display in theComponents.Button
).However, if
Components.Button.setText()
is called with a new value, this value is displayed in theComponents.Button
, but it is not propagated to the Components.Renderer.Label, resulting in over-writing.So:
# in __init__() self["key_green"] = Button("Initial value") ... # after the skin has been applied (e.g. during user interaction) self["key_green"].setText("Some other value")
creates overwriting
But:
# in __init__() self["key_green"] = Button() ... # after the skin has been applied, but before the screen is displayed self["key_green"] = Button("Initial value") ... # while the user is interacting with the screen self["key_green"].setText("Some other value")
works as it should
All the above applies equally if
Components.Label
is used rather thanComponents.Button
. -
- changed status to resolved
Fix bug
#381: GREEN button text overlaid in EPG Search after Add TimerAdd Components.Label.DummySource that allows a text widget to appear in a <widget source= ... /> element in a screen skin but not display on the screen.
Use Components.Label.DummySource Components.Button.Button and Components.Label.Label so that when they are used in <widget source= ... /> widgets, the apparent intention of the code to make the widget inactive and not display, is completed, so that neither text arguments to the constructor nor text= widget attributes will be displayed on the screen.
This prevents text overwriting when the same Component instance appears in both a <widget source= ... /> and a <widget name= /> skin widget.
Also change GUIComponent.applySkin() to Label.applySkin() in MultiColorLabel.applySkin(), which it should have been anyway, but which is now required by the changes to Label.
→ <<cset c7d57e758d7e>>
-
-
Merged in prl/easy-ui-4/Fix-bug-381 (pull request #216)
Fix bug
#381: GREEN button text overlaid in EPG Search after Add Timer→ <<cset d5646d76ca1d>>
-
Fix bug
#381: GREEN button text overlaid in EPG Search after Add Timer - refixThe original fix for this bug set the Label/Button text to "" too early, so that any references to widget.getText() in the widget's Screen.init() returned "".
This caused problems in other parts of the UI, including crashing when number buttons were used to change channel in live TV.
This fix sets the widget text field at the normal time, but saves it and sets the text to "" when a downstream Converter/Renderer connects, so that the downstream receives "" when it reads widget.text in the connection process.
The text is restored to its correct value in widget.applySkin(), as in the original fix.
This should prevent any user code "seeing" the changed text value as "".
→ <<cset 49735abc70bb>>
-
Merged in prl/easy-ui-4/Fix-bug-381-redo (pull request #218)
Fix bug
#381: GREEN button text overlaid in EPG Search after Add Timer - refix→ <<cset 5a624983b500>>
- Log in to comment
Issue
#432was marked as a duplicate of this issue.