-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] invalid attr:variable? #44
Comments
interesting, attr:variable only created for checkbuttons, so might be related to #43 |
Regarding content of Also shouldn't there be an option for attr:variable in Attribute pane? |
Hello @mrx23dot. Thank you for you interest in Formation and raising this issue. The issues has been around for a while and I initially dismissed it as a simple annoyance but I will get round to fixing it.
Yeah. They are definitely related and fixing one will resolve the other.
Those are elements belonging to the studio's UI interface and not the design file. They are supposed to be stripped from the generated XML.
The option is there under |
Don't get me wrong, Formation is still the best editor I found for Tkinter, it's just a bit behind compared to wxPython editors. (but at least Tkinter is shipped with python) Adding some warning msg to console would be great when there is something wrong in .xml layout (like invalid attr:variable), or assertion msg, currently it just exits without knowing why. |
Thanks for the commendations. The wxPython editors have been a round for longer and have a lot more people working on them. I am just one guy but I will do my best. I believe we can improve the state of the project when issues are reported like like this. So, feel free to report as many issues as you can find or suggest features.
When previewing designs using the run button, they are run in a separate process so I will try to pipe the output back and display an error dialog. |
Also when I run the same invalid .xml in my .py file this line just exits, without reason, so you would need an assertion output that you could capture in the editor. |
This should be fixed. @mrx23dot you can add the error reporting on preview as a separate feature request issue. |
A simple layout like this executes on green button:,
![2024-10-31 13_23_26-Formation studio - C__apps_myApps_mSerial_testlayout xml](https://private-user-images.githubusercontent.com/4163396/381962341-49a158d0-520f-4da0-a43f-abff5d4f1cfe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MjgyMzksIm5iZiI6MTczOTUyNzkzOSwicGF0aCI6Ii80MTYzMzk2LzM4MTk2MjM0MS00OWExNThkMC01MjBmLTRkYTAtYTQzZi1hYmZmNWQ0ZjFjZmUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTRUMTAxMjE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmUwZTZmYzMwZDVmYzI2MjE3ODIxMWRhN2JhZGMyZmUwODhmNzQyODQ2NzhmZGJjZDQ2NjBkNTNmNzYxNzBhMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.B0qdk5A0txhRdAurE9WGjDM9-5ng0W9nsSoNJAElUw0)
but when I add a checkbox, it doesn't show a preview when I press the green button.
if I remove
attr:variable=".!frame3.!panedwindow.!panedwindow.!tabview.!designcontext.!designer.!checkbutton2"
from xml line
<tkinter.ttk.Checkbutton name="checkbutton2" attr:variable=".!frame3.!panedwindow.!panedwindow.!tabview.!designcontext.!designer.!checkbutton2" attr:text="checkbutton2" layout:width="112" layout:height="25" layout:x="99" layout:y="88" layout:bordermode="outside"/>
it fixes the issue and shows the UI with
app = AppBuilder(path="testlayout.xml")
so looks like attr:variable is invalid (without any warning)
Your environment
OS: Windows
formation-studio-0.7.0
Python version: Python 3.7.0
The text was updated successfully, but these errors were encountered: