Spec-Glamour new GUI: Open notebook from file implemented.
This commit is contained in:
parent
cc6760199f
commit
1596121745
@ -64,10 +64,12 @@ GrafoscopioBrowser class >> docDataTutorial [
|
|||||||
|
|
||||||
{ #category : #updating }
|
{ #category : #updating }
|
||||||
GrafoscopioBrowser class >> docDownloadFor: aDocumentType [
|
GrafoscopioBrowser class >> docDownloadFor: aDocumentType [
|
||||||
"I download the interactive documentation in STON format, according to the document time which can be: 'tutorial' or 'manual'.
|
"I download the interactive documentation in STON format, according to the document
|
||||||
If a the documentation is already present in the system I made a temporal backup and download a new copy"
|
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 = 'tutorial') ifTrue: [ docInfo := self docDataTutorial ].
|
||||||
(aDocumentType = 'manual') ifTrue: [ docInfo := self docDataManual ].
|
(aDocumentType = 'manual') ifTrue: [ docInfo := self docDataManual ].
|
||||||
|
@ -73,7 +73,7 @@ GrafoscopioNotebook >> initializePresenter [
|
|||||||
|
|
||||||
header whenTextChanged: [ :arg |
|
header whenTextChanged: [ :arg |
|
||||||
(tree selectedItem) content header: header text.
|
(tree selectedItem) content header: header text.
|
||||||
tree updateTree]
|
"tree updateTree"]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #initialization }
|
{ #category : #initialization }
|
||||||
@ -85,7 +85,7 @@ GrafoscopioNotebook >> initializeWidgets [
|
|||||||
header := self newText.
|
header := self newText.
|
||||||
|
|
||||||
body disable.
|
body disable.
|
||||||
body text: 'Seleciona un nodo a la izquierda'.
|
body text: '<-- Seleciona un nodo a la izquierda'.
|
||||||
|
|
||||||
tree childrenBlock: [:node | node children];
|
tree childrenBlock: [:node | node children];
|
||||||
displayBlock: [:node | node title ].
|
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 }
|
{ #category : #accessing }
|
||||||
GrafoscopioNotebook >> tree [
|
GrafoscopioNotebook >> tree [
|
||||||
^ tree
|
^ tree
|
||||||
|
Loading…
Reference in New Issue
Block a user