Rename open and save document to read and write in NWDoc

This commit is contained in:
Veronica K. B. Olsen
2021-04-25 17:10:12 +02:00
parent 1e48c6dcfe
commit d473615ccf
11 changed files with 67 additions and 59 deletions
+5 -2
View File
@@ -278,13 +278,16 @@ class Tokenizer():
if self.theItem is None:
return False
self.theText = ""
if theText is not None:
# If the text is set, just use that
self.theText = theText
else:
# Otherwise, load it from file
theDocument = NWDoc(self.theProject, self.theParent)
self.theText = theDocument.openDocument(theHandle)
theDoc = NWDoc(self.theProject, self.theParent)
theText = theDoc.readDocument(theHandle)
if theText:
self.theText = theText
docSize = len(self.theText)
if docSize > nwConst.MAX_DOCSIZE: