diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index cf5b29b..80cb4b4 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -64,10 +64,12 @@ GrafoscopioBrowser class >> docDataTutorial [ { #category : #updating } GrafoscopioBrowser class >> docDownloadFor: aDocumentType [ - "I download the interactive documentation in STON format, according to the document time which can be: 'tutorial' or 'manual'. - If a the documentation is already present in the system I made a temporal backup and download a new copy" + "I download the interactive documentation in STON format, according to the document + type which can be: 'tutorial' or 'manual'. + If a the documentation is already present in the system I made a temporal backup and + download a new copy" - | docInfo client rootFolder localDoc temporalBackup remoteDoc | + | docInfo rootFolder localDoc temporalBackup remoteDoc | (aDocumentType = 'tutorial') ifTrue: [ docInfo := self docDataTutorial ]. (aDocumentType = 'manual') ifTrue: [ docInfo := self docDataManual ]. diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index 7658ddd..8276c85 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -73,7 +73,7 @@ GrafoscopioNotebook >> initializePresenter [ header whenTextChanged: [ :arg | (tree selectedItem) content header: header text. - tree updateTree] + "tree updateTree"] ] { #category : #initialization } @@ -85,7 +85,7 @@ GrafoscopioNotebook >> initializeWidgets [ header := self newText. body disable. - body text: 'Seleciona un nodo a la izquierda'. + body text: '<-- Seleciona un nodo a la izquierda'. tree childrenBlock: [:node | node children]; displayBlock: [:node | node title ]. @@ -98,6 +98,19 @@ GrafoscopioNotebook >> notebookContent: aTree [ ] +{ #category : #persistence } +GrafoscopioNotebook >> openFromFile: aFileName [ +"I open a notebook from a file named aFileName containing a grafoscopio tree" + + | root nb | + + root := ((STON fromString: aFileName contents) at: 1) parent. + nb := self class new. + nb title: aFileName basenameWithIndicator. + nb notebookContent: root. + ^ nb openWithSpec. +] + { #category : #accessing } GrafoscopioNotebook >> tree [ ^ tree