I
* just started working with both the ui and keyboard modules and I’m getting used to them as we speak.
a external file save all the R,G,B values for both my background of my premade pyui views and sub views. In the regular app I am able to manipulate the rgb values using the sliders and I’m able to save it to a json file like so
T
{"Background": {"Color": {"R": 1, "G": 1, "B": 1}}, "Ui": {"Border": {"Width": 0, "Radius": 0}, "Color": {"R": 1, "G": 1, "B": 1}}}
And have it be opened by the custom view class automatically when i open the views in the regular app with no issue at all.
I thought I’d do the same thing using my keyboard pyui’s. I’ve noticed that the script has no issue opening the json file as it does load up and apply to the background and sub view colors. But I’ve noticed that every time I try to have the keyboard script save any text as I was hoping to create a clipboard function for the keyboard as well as the rgb values it just doesn’t function. The script and ui doesn’t crash by any means, but it seems anytime that I try to write/append to a file it just doesn’t work.
Does anyone know why this is? If anyone has any advice on how I can do better please let me know. For those that may want to critique my shitty code I’ll include it below.
Here’s my custom class for my keyboard views. Everything seems to work aside from not writing files.