diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index c14ec5b..1930e2d 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -282,6 +282,19 @@ GrafoscopioNotebook >> notebookSubMenu [ action: [ self inform: 'To be implemented...' ] ] ] ] +{ #category : #persistence } +GrafoscopioNotebook >> openDefault [ +"I open a new default notebook" + + | nb | + nb := self class new. + nb + notebook: (GrafoscopioNode new becomeDefaultTree); + title: ' New | Grafoscopio notebook'; + notebookContent: nb notebook. + ^ nb openWithSpec. +] + { #category : #persistence } GrafoscopioNotebook >> openFromFile: aFileName [ "I open a notebook from a file named aFileName containing a grafoscopio tree" @@ -356,6 +369,7 @@ GrafoscopioNotebook >> saveToFile: aFileReference [ self workingFile ensureCreateFile. [ self exportAsSton: self notebook on: (self workingFile writeStream)] ensure: [ (self workingFile writeStream) ifNotNil: #close ]. + self title: self workingFile basenameWithIndicator, ' | Grafoscopio notebook'. self inform: ('File saved at: ', String cr, self workingFile fullName). GrafoscopioGUI updateRecentNotebooksWith: aFileReference.