Automatic download of documentation.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2016-10-18 21:12:07 +00:00
parent 048da3a55f
commit 16559eb0d6
3 changed files with 7 additions and 114 deletions

View File

@ -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'
]

View File

@ -46,6 +46,11 @@ GrafoscopioDocumentation class >> download: fileNameWithRelativePath [
into: parentFolder
]
{ #category : #updating }
GrafoscopioDocumentation class >> initialize [
self update
]
{ #category : #updating }
GrafoscopioDocumentation class >> isUpdated [
^ (self listOutdated size > 0) ifTrue: [ ^ false ] ifFalse: [ ^ true ]

View File

@ -26,7 +26,7 @@ Class {
#category : #'Grafoscopio-UI'
}
{ #category : #'as yet unclassified' }
{ #category : #specs }
GrafoscopioGUI class >> defaultSpec [
<spec: #default>
@ -296,7 +296,7 @@ GrafoscopioGUI class >> exampleBootstrapUI [
ui openWithSpecLayout: lay.
]
{ #category : #'as yet unclassified' }
{ #category : #'class initialization' }
GrafoscopioGUI class >> initialize [
self startDockingBar.
]