Automatic download of documentation.
This commit is contained in:
parent
048da3a55f
commit
16559eb0d6
@ -1,112 +0,0 @@
|
|||||||
"
|
|
||||||
I'm just a way to explore Spec and its documentation for learning purposes.
|
|
||||||
"
|
|
||||||
Class {
|
|
||||||
#name : #DynamicDict,
|
|
||||||
#superclass : #ComposableModel,
|
|
||||||
#instVars : [
|
|
||||||
'data',
|
|
||||||
'list',
|
|
||||||
'content'
|
|
||||||
],
|
|
||||||
#category : #'Grafoscopio-UI'
|
|
||||||
}
|
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
|
||||||
DynamicDict class >> defaultSpec [
|
|
||||||
<spec: #default>
|
|
||||||
|
|
||||||
^ SpecLayout composed
|
|
||||||
newRow: [:row |
|
|
||||||
row
|
|
||||||
add: #list right: 0.7;
|
|
||||||
add: #content left: 0.3];
|
|
||||||
yourself
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
DynamicDict >> content [
|
|
||||||
^ content
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
DynamicDict >> content: anObject [
|
|
||||||
content := anObject
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
DynamicDict >> data [
|
|
||||||
data := {'first' -> 'I am just text' . 'second' -> 'ProfStef openPharoZenWorkspace' } asOrderedDictionary.
|
|
||||||
^ data
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
|
||||||
DynamicDict >> initializePresenter [
|
|
||||||
list whenSelectedItemChanged: [:item |
|
|
||||||
item = 'first'
|
|
||||||
ifTrue: [ self rebuildWithTextLayoutFor: item ].
|
|
||||||
item = 'second'
|
|
||||||
ifTrue: [ self rebuildWithCodeLayoutFor: item ].
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #initialization }
|
|
||||||
DynamicDict >> initializeWidgets [
|
|
||||||
|
|
||||||
|
|
||||||
list := self newList.
|
|
||||||
list items: self data keys.
|
|
||||||
content := self newText.
|
|
||||||
self focusOrder
|
|
||||||
add: list;
|
|
||||||
add: content.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
DynamicDict >> list [
|
|
||||||
^ list
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
DynamicDict >> list: anObject [
|
|
||||||
list := anObject
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
|
||||||
DynamicDict >> rebuildWithCodeLayoutFor: key [
|
|
||||||
| newLayout |
|
|
||||||
|
|
||||||
content := GlamourPresentationModel new.
|
|
||||||
content presentationClass: GTPlayground startOn: (GTPlayPage new saveContent: (data at: key)).
|
|
||||||
newLayout := SpecLayout composed
|
|
||||||
newRow: [:row |
|
|
||||||
row
|
|
||||||
add: #list right: 0.7;
|
|
||||||
add: #content left: 0.3];
|
|
||||||
yourself.
|
|
||||||
self needRebuild: false.
|
|
||||||
content needRebuild: true.
|
|
||||||
self buildWithSpecLayout: newLayout.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
|
||||||
DynamicDict >> rebuildWithTextLayoutFor: key [
|
|
||||||
| newLayout |
|
|
||||||
|
|
||||||
content := self newText text: (data at: key).
|
|
||||||
newLayout := SpecLayout composed
|
|
||||||
newRow: [:row |
|
|
||||||
row
|
|
||||||
add: #list right: 0.7;
|
|
||||||
add: #content left: 0.3];
|
|
||||||
yourself.
|
|
||||||
self needRebuild: false.
|
|
||||||
list needRebuild: false.
|
|
||||||
content needRebuild: true.
|
|
||||||
self buildWithSpecLayout: newLayout.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #api }
|
|
||||||
DynamicDict >> title [
|
|
||||||
^'Dynamic UI | test'
|
|
||||||
]
|
|
@ -46,6 +46,11 @@ GrafoscopioDocumentation class >> download: fileNameWithRelativePath [
|
|||||||
into: parentFolder
|
into: parentFolder
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GrafoscopioDocumentation class >> initialize [
|
||||||
|
self update
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #updating }
|
{ #category : #updating }
|
||||||
GrafoscopioDocumentation class >> isUpdated [
|
GrafoscopioDocumentation class >> isUpdated [
|
||||||
^ (self listOutdated size > 0) ifTrue: [ ^ false ] ifFalse: [ ^ true ]
|
^ (self listOutdated size > 0) ifTrue: [ ^ false ] ifFalse: [ ^ true ]
|
||||||
|
@ -26,7 +26,7 @@ Class {
|
|||||||
#category : #'Grafoscopio-UI'
|
#category : #'Grafoscopio-UI'
|
||||||
}
|
}
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
{ #category : #specs }
|
||||||
GrafoscopioGUI class >> defaultSpec [
|
GrafoscopioGUI class >> defaultSpec [
|
||||||
<spec: #default>
|
<spec: #default>
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ GrafoscopioGUI class >> exampleBootstrapUI [
|
|||||||
ui openWithSpecLayout: lay.
|
ui openWithSpecLayout: lay.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'as yet unclassified' }
|
{ #category : #'class initialization' }
|
||||||
GrafoscopioGUI class >> initialize [
|
GrafoscopioGUI class >> initialize [
|
||||||
self startDockingBar.
|
self startDockingBar.
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user