Closed HackXIt closed 3 months ago
When opening file the self.opened_file is not set correctly:
It should be the following, otherwise a subsequent save action does not work:
if self.last_path is not None and os.path.isfile(os.path.join(self.last_path, self.opened_file)):
self.opened_file = os.path.join(self.last_path, self.opened_file)
self.load_textfile(self.opened_file)
When opening failed due to unsupported file type, everything should be reset: e.g.:
def load_textfile(self, file: str):
file_ext = file.split('.')[-1]
if file_ext not in self.supported_text_files:
# if file extension is not supported, don't try to open it and reset everything
self.opened_file = None
self.ids.text_main.text = ""
log.error(f"{self.__class__.__name__}: Unsupported file type: {file_ext}")
When clicking on ExampleAPI, the screen does not open:
ok, thanks. I will merge it for now, so that the students can already work on it. But please continue to commit, if you have a new fix.