Persistence on basic notebooks done! Text and code playgrounds are saved almost automatically (text needs explicit saving).
This commit is contained in:
parent
f2319ec3e7
commit
c9e410a36d
@ -76,9 +76,15 @@ GrafoscopioNotebook >> changeBody: aNode [
|
|||||||
body body class = TextModel
|
body body class = TextModel
|
||||||
ifTrue: [body body whenTextChanged: [ :arg | aNode body: arg ]].
|
ifTrue: [body body whenTextChanged: [ :arg | aNode body: arg ]].
|
||||||
body body class = GlamourPresentationModel
|
body body class = GlamourPresentationModel
|
||||||
ifTrue: [
|
ifTrue: [ | playground |
|
||||||
"Transcript show:" "body body glmPres inspect" ].
|
playground := body body glmPres.
|
||||||
"Transcript show: body body class; cr."
|
playground when: GLMContextChanged
|
||||||
|
do: [ :ann | ann property = #text
|
||||||
|
ifTrue: [ | playgroundText |
|
||||||
|
playgroundText := (playground pane ports at: 2) value.
|
||||||
|
aNode body: playgroundText]
|
||||||
|
]
|
||||||
|
].
|
||||||
header text: aNode header.
|
header text: aNode header.
|
||||||
body needRebuild: true.
|
body needRebuild: true.
|
||||||
self buildWithSpecLayout: self class defaultSpec.
|
self buildWithSpecLayout: self class defaultSpec.
|
||||||
@ -451,9 +457,11 @@ GrafoscopioNotebook >> promoteNode [
|
|||||||
|
|
||||||
{ #category : #operation }
|
{ #category : #operation }
|
||||||
GrafoscopioNotebook >> removeNode [
|
GrafoscopioNotebook >> removeNode [
|
||||||
| currentNode |
|
| nodeToDelete |
|
||||||
currentNode := tree selectedItem content.
|
nodeToDelete := tree selectedItem content.
|
||||||
currentNode parent removeNode: currentNode.
|
nodeToDelete parent removeNode: nodeToDelete.
|
||||||
|
"tree selectedItem: tree selectedItem parentNode."
|
||||||
|
tree selectOnlyLastHighlighted.
|
||||||
tree needRebuild: true.
|
tree needRebuild: true.
|
||||||
tree roots: tree roots.
|
tree roots: tree roots.
|
||||||
self buildWithSpecLayout: self class defaultSpec.
|
self buildWithSpecLayout: self class defaultSpec.
|
||||||
|
Loading…
Reference in New Issue
Block a user