Skip to content

[asking for help] Confliction with periodic multi-thread tasks? Asking for a solution...... #2083

Answered by freakboy3742
Varisox137 asked this question in Q&A
Discussion options

You must be logged in to vote

There's no problem changing the value of a MultilineTextInput. The problem is that you can't do this from a thread (at least, not reliably, on all platforms).

Generally speaking, GUI toolkits are sensitive to having GUI operations only performed on the GUI thread. This isn't 100% true on all GUI toolkits, but it's a sufficiently widespread property of GUI toolkits that it's safe to assume it's the default behavior unless you know otherwise. Being a cross-platform toolkit, Toga is effectively constrained by the lowest-common denominator, which means you shouldn't depend on being able to modify your GUI from a non-GUI thread.

There's 2 possible fixes in your case:

  1. Do the polling on the bac…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Varisox137
Comment options

@Varisox137
Comment options

@freakboy3742
Comment options

@Varisox137
Comment options

@mhsmith
Comment options

Answer selected by Varisox137
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants