How to write toga dummy backend code #2064
Replies: 1 comment 3 replies
-
I'm a little confused about these questions. The dummy backend isn't some magical special language - it's Python code. So - how do you write a function that returns a value? Like this:
The behavior of the dummy backend is design to be the same as a "normal" GUI backend, but without actually creating a GUI or having a dependency on a GUI framework. It's a mock - a simulation of what a "real" backend would do. To that end:
As an example - when you give a widget focus, that's an action - so As for examples... the entire dummy backend is full of examples. If you need help with a specific task, you'll need to ask specific question. |
Beta Was this translation helpful? Give feedback.
-
In the dummy backend, we need to write the same backend functions as on other backends. So, how does one write a:
Directly return the value with
return
?I have no idea, how to do this.
Using
self._get_value()
?Using
self._set_value()
?Using
self._action()
?Also it would be really helpful, if someone could provide an example usage of accomplishing these tasks in the dummy backend.
Beta Was this translation helpful? Give feedback.
All reactions