I have an entry widget that I'm trying to insert generated text into. It's just a string pulled froma pre-existing list, shouldn't be an issue.
however it is.
This is the whole project
https://github.com/Lokee86/npcGeneratorPublic
the code in question that's causing a problem is this
def generate(self):
fn.main(self.creature, self)
self.genre_entry.delete(0, tk.END)
self.genre_entry.insert(0, self.creature.genre)
in the the latest version this is at the bottom of the WindowMonster class in the window.py module. In earlier versions the logic is in the functionality.py module in the main() function or in generate_genre() function.
No matter where I put it, the insert function will only work intermittently. print() debugging and tracing has shown this is the problem, if it's something else I can't imagine what it would be. There is no such similar issue with inserting to the other fields that currently support it, which are Name and Stats.
You'll need an OpenAI style API to connect to to use the name generator, but the genre and stat generators are both just powered by the random lib.
Any insights would be helpful, I've been working on this for a while and I've run out of ideas.