def save(self, editor):
if not editor.f:
fpathname = asksaveasfilename()
if not fpathname:
# file not saved
return False
editor.open(fpathname)
self.write(editor=editor)
# file saved
return True