No warnings on opening new notebook with spec2.
This commit is contained in:
parent
9a7f45d8b3
commit
1fa30ba524
@ -20,7 +20,7 @@ ui openWithSpec
|
||||
"
|
||||
Class {
|
||||
#name : #GlamourPresentationModel,
|
||||
#superclass : #ComposablePresenter,
|
||||
#superclass : #SpPresenter,
|
||||
#instVars : [
|
||||
'presentation',
|
||||
'glmPres'
|
||||
@ -31,28 +31,9 @@ Class {
|
||||
{ #category : #specs }
|
||||
GlamourPresentationModel class >> defaultSpec [
|
||||
<spec: #default>
|
||||
^ SpecLayout composed add: #presentation
|
||||
]
|
||||
|
||||
{ #category : #example }
|
||||
GlamourPresentationModel class >> example [
|
||||
|ui lay|
|
||||
|
||||
ui := DynamicComposableModel new.
|
||||
ui title: 'Too Much Glamour!'.
|
||||
ui instantiateModels: #(
|
||||
play GlamourPresentationModel
|
||||
insp GlamourPresentationModel).
|
||||
|
||||
ui insp presentationClass: GTInspector startOn: 42.
|
||||
|
||||
lay := SpecLayout composed
|
||||
newColumn: [ :c |
|
||||
c newRow: [ :r | r add: #play];
|
||||
newRow: [ :r | r add: #insp ]];
|
||||
yourself.
|
||||
|
||||
ui openWithSpecLayout: lay.
|
||||
^ SpBoxLayout newHorizontal
|
||||
add: #presentation;
|
||||
yourself
|
||||
]
|
||||
|
||||
{ #category : #deprecation }
|
||||
@ -72,7 +53,7 @@ GlamourPresentationModel >> initializeWidgets [
|
||||
This is because we cannot create the morph and later set the presentation.
|
||||
So we will do all of this in the presentation: accessor.
|
||||
"
|
||||
|
||||
self presentation.
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
|
@ -34,17 +34,6 @@ GrafoscopioAbstractNode >> addTag: aTag [
|
||||
|
||||
]
|
||||
|
||||
{ #category : #exporting }
|
||||
GrafoscopioAbstractNode >> asTreeNodePresenter [
|
||||
| node |
|
||||
node := SpTreeNodePresenter new.
|
||||
node
|
||||
hasChildren: [ false ];
|
||||
children: [ {} ];
|
||||
content: self.
|
||||
^ node
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioAbstractNode >> content [
|
||||
self subclassResponsibility
|
||||
|
@ -30,10 +30,7 @@ GrafoscopioCodeModel >> body: anObject [
|
||||
|
||||
{ #category : #API }
|
||||
GrafoscopioCodeModel >> content: aGrafoscopioNodeContent [
|
||||
|
||||
body
|
||||
presentationClass: GTPlayground
|
||||
startOn: (GTPlayPage new saveContent: aGrafoscopioNodeContent)
|
||||
body text: aGrafoscopioNodeContent
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
@ -65,5 +62,5 @@ GrafoscopioCodeModel >> extractHtmlImages [
|
||||
{ #category : #initialization }
|
||||
GrafoscopioCodeModel >> initializeWidgets [
|
||||
|
||||
body := GlamourPresentationModel new.
|
||||
body := self newCode.
|
||||
]
|
||||
|
@ -32,3 +32,8 @@ GrafoscopioCodeNode >> header [
|
||||
GrafoscopioCodeNode >> shouldAskBeforeRemove [
|
||||
^ self content isNotEmpty
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioCodeNode >> specModelClass [
|
||||
^ GrafoscopioCodeModel
|
||||
]
|
||||
|
@ -518,11 +518,8 @@ GrafoscopioNewNotebook >> importLinkContent [
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNewNotebook >> initialize [
|
||||
super initialize.
|
||||
self
|
||||
notebook: (self createNewExample );
|
||||
title: ' New | Grafoscopio notebook'.
|
||||
self notebookContent: self notebook.
|
||||
|
||||
self notebook: self createNewExample.
|
||||
self notebookContent: self notebook
|
||||
]
|
||||
|
||||
{ #category : #initialization }
|
||||
@ -564,7 +561,16 @@ GrafoscopioNewNotebook >> initializeWidgets [
|
||||
add: header;
|
||||
add: body;
|
||||
add: links.
|
||||
self askOkToClose: true
|
||||
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
GrafoscopioNewNotebook >> initializeWindow: aWindowPresenter [
|
||||
super initializeWindow: aWindowPresenter.
|
||||
aWindowPresenter
|
||||
title: ' New | Grafoscopio notebook';
|
||||
windowIcon: self taskbarIcon;
|
||||
askOkToClose: true
|
||||
]
|
||||
|
||||
{ #category : #persistence }
|
||||
|
@ -1055,9 +1055,10 @@ GrafoscopioNode >> selectMarkupSubtreesToExport [
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNode >> specModelClass [
|
||||
|
||||
(self isTaggedAs: 'código') ifTrue: [^GrafoscopioCodeModel].
|
||||
(self isTaggedAs: 'johan') ifTrue:[^GrafoscopioButtonModel].
|
||||
(self isTaggedAs: 'código')
|
||||
ifTrue: [ ^ GrafoscopioCodeModel ].
|
||||
(self isTaggedAs: 'johan')
|
||||
ifTrue: [ ^ GrafoscopioButtonModel ].
|
||||
"por defecto"
|
||||
^ GrafoscopioTextModel
|
||||
]
|
||||
|
@ -896,10 +896,8 @@ GrafoscopioTextNode >> shouldAskBeforeRemove [
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioTextNode >> specModelClass [
|
||||
|
||||
(self isTaggedAs: 'código') ifTrue: [^GrafoscopioCodeModel].
|
||||
(self isTaggedAs: 'johan') ifTrue:[^GrafoscopioButtonModel].
|
||||
"por defecto"
|
||||
|
||||
^ GrafoscopioTextModel
|
||||
]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user