Grafoscopio now stores the output of calculations! Reification of notebooks was done
on packages, so it was not needed until now (almost 2.5 years after first public commit!). Impressive what the Pharo live coding environment can do, and the stuff you can "just leave for later" :-).
This commit is contained in:
parent
ecd04cdd5a
commit
ebeb8acfcb
@ -661,6 +661,16 @@ GrafoscopioNode >> newNode [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
GrafoscopioNode >> output [
|
||||||
|
^ output
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
GrafoscopioNode >> output: anObject [
|
||||||
|
output := anObject
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
GrafoscopioNode >> parent [
|
GrafoscopioNode >> parent [
|
||||||
"Returns the parent of the current node"
|
"Returns the parent of the current node"
|
||||||
|
@ -33,6 +33,18 @@ GrafoscopioNodeTest >> testDemoteNode [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #tests }
|
||||||
|
GrafoscopioNodeTest >> testHasMarkdownSubtreesToExport [
|
||||||
|
"Because becomeDefaultTestTree contains at least one non empty 'links' object that
|
||||||
|
points to a relative path in the file system, ending in '.md' or '.markdown' the
|
||||||
|
result of this test is true.
|
||||||
|
Please see look #becomeDefaultTestTree message to see the details that makes this test true."
|
||||||
|
| tree |
|
||||||
|
tree := GrafoscopioNode new becomeDefaultTestTree.
|
||||||
|
self assert: tree selectMarkdownSubtreesToExport isNotEmpty equals: true.
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #tests }
|
{ #category : #tests }
|
||||||
GrafoscopioNodeTest >> testInitializeIsOk [
|
GrafoscopioNodeTest >> testInitializeIsOk [
|
||||||
self shouldnt: [ GrafoscopioNode new ] raise: Error
|
self shouldnt: [ GrafoscopioNode new ] raise: Error
|
||||||
|
@ -56,14 +56,17 @@ GrafoscopioNotebook >> addNode [
|
|||||||
|
|
||||||
{ #category : #operation }
|
{ #category : #operation }
|
||||||
GrafoscopioNotebook >> autoSaveBodyOf: aNode [
|
GrafoscopioNotebook >> autoSaveBodyOf: aNode [
|
||||||
|
| playground |
|
||||||
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: [ | playground |
|
ifFalse: [ ^ self ].
|
||||||
playground := body body glmPres.
|
playground := body body glmPres.
|
||||||
playground
|
playground
|
||||||
onChangeOfPort: #text
|
onChangeOfPort: #text
|
||||||
act: [ :x | aNode body: x entity value content ]]
|
act: [ :x | aNode body: x entity value content ];
|
||||||
|
onChangeOfPort: #activePresentation
|
||||||
|
act: [ aNode output: (Compiler evaluate: aNode body) ]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
|
Loading…
Reference in New Issue
Block a user