From unnamed to named windows.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2016-07-19 13:56:25 +00:00
parent bf98d67b8f
commit 17e0405b11

View File

@ -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.