Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
File Type Not Changing
-
In this script, changing the file type in the file type dialog doesn't actually change it. Find the .pyui file here.
-
It is good practice to avoid global variables. This is one read on why--it can be hard to debug.
In this case, it seems like havingfile_type
as a variable within your NotePadView would be cleaner, I.eself.file_type
.Now the specific problem is that, in python,you can read global variables without doing anything special, but to modify a global, you need to declare it as global. So, inside your
type_action
your first line would need to beglobal file_type
-
This solves one problem, but apparently whatever is picked in the dialog prints as none instead of what was selected