Replies: 1 comment
-
Hello @aldoniel , I'm happy that you likes this library. Kind regards, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
First, thanks a lot for writing remi. I find it really useful for private projects on android (termux) / computer, especially with the gui editor.
However, I encountered some bugs with the editor (at random ?). Sometimes, when saving to disk, reloading, writing again,
def construct_ui(self):
gets duplicated and the last methoddef onclick_button_xxxself, emitter):
is removed.So, I found cleaner to write my code in a separate file from where I import the file produced by the editor.
I implemented this using monkey patching. Maybe there was a cleaner way ? but it works.
To do so, I re-define main()
I also monkey patch a dictionary into the gui file so I have an easier access to the widgets
(My demo code is here https://github.com/aldoniel/ldvelh_calc )
Also, while trying to understand how to monkey patch, I patched def init to count how many times the main gui class was instantiated.
(where
gui
is the file containing the gui from the editor andLDVELH_gui
the project name.)Curiously, I found that when the server starts, 12 instances of the main gui class (
class LDVELH_gui(App):
) are created. Is it an expected behavior ?Oh, also, last question, wouldn't be nice to use the html
input
for the TexInput widget ? This way we would use the browser native type enforcement (usingtype="number"
for ex.) instead of try except type checking. Historical reason ?Thanks again.
Beta Was this translation helpful? Give feedback.
All reactions