| as yet unclassified |
| addConfiguration: nameString
|
| config |
config _ WAUserConfiguration named: nameString.
pool add: config.
self select: config
|
| children
|
^ Array with: trail with: selection
|
| deleteConfiguration
|
(self confirm: 'Are you sure you want to delete ', self selectedConfiguration name printString, '?')
ifTrue: [pool remove: self selectedConfiguration].
selection _ trail _ nil
|
| editorFor: aConfiguration
|
^ editors at: aConfiguration ifAbsentPut:
[WAConfigurationEditor new
configuration: aConfiguration;
onAnswer: [:v | self answer];
yourself]
|
| initialize
|
editors _ Dictionary new
|
| pool: aConfigurationPool
|
pool _ aConfigurationPool
|
| renderContentOn: html
|
html form: [
html
selectFromList: pool configurations
selected: self selectedConfiguration
callback: [:v | self select: v]
labels: [:ea | ea name].
html space.
html submitButtonWithText: 'Go'.
].
html form: [
html text: 'New configuration: '.
html textInputWithValue: '' callback: [:v | self addConfiguration: v].
html space.
html submitButtonWithText: 'Add'.
].
selection ifNotNil:
[html render: trail.
html horizontalRule.
self selectedConfiguration isDeletable ifTrue:
[html paragraph: [html anchorWithAction: [self deleteConfiguration] text: 'Delete']].
html render: selection]
|
| select: aConfiguration
|
selection _ self editorFor: aConfiguration.
trail _ WATrail on: selection
|
| selectedConfiguration
|
^ selection ifNotNil: [selection configuration]
|