-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
175 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Class { | ||
#name : 'PyramidGenericCommand', | ||
#superclass : 'PyramidBlocTextCommand', | ||
#instVars : [ | ||
'selector' | ||
], | ||
#category : 'Pyramid-Bloc-plugin-bloc-text', | ||
#package : 'Pyramid-Bloc', | ||
#tag : 'plugin-bloc-text' | ||
} | ||
|
||
{ #category : 'as yet unclassified' } | ||
PyramidGenericCommand >> getValueFor: aBLElement [ | ||
|
||
^ aBLElement perform: selector | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidGenericCommand >> selector [ | ||
|
||
^ selector | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidGenericCommand >> selector: anObject [ | ||
|
||
selector := anObject | ||
] | ||
|
||
{ #category : 'as yet unclassified' } | ||
PyramidGenericCommand >> setValueFor: aBLElement with: aValue [ | ||
|
||
aBLElement perform: selector asMutator with: aValue | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
Class { | ||
#name : 'PyramidMagritteProperty', | ||
#superclass : 'Object', | ||
#instVars : [ | ||
'magritteDescription', | ||
'commandExecutor', | ||
'presenterBuilder' | ||
], | ||
#category : 'Pyramid-property', | ||
#package : 'Pyramid', | ||
#tag : 'property' | ||
} | ||
|
||
{ #category : 'ad' } | ||
PyramidMagritteProperty >> buildPresenterFromCluster: aCluster [ | ||
|
||
^ self presenterBuilder | ||
cluster: aCluster; | ||
property: self; | ||
build | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> command [ | ||
|
||
^ PyramidGenericCommand new | ||
selector: magritteDescription accessor readSelector; | ||
yourself | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> commandExecutor [ | ||
^ commandExecutor | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> commandExecutor: aPyramidCallbackCommandExecutor [ | ||
|
||
commandExecutor := aPyramidCallbackCommandExecutor | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> initialize [ | ||
|
||
super initialize. | ||
presenterBuilder := PyramidPopingPresenterBuilder new | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> magritteDescription [ | ||
|
||
^ magritteDescription | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> magritteDescription: anObject [ | ||
|
||
magritteDescription := anObject | ||
] | ||
|
||
{ #category : 'tests' } | ||
PyramidMagritteProperty >> makeNewInput [ | ||
|
||
^ magritteDescription acceptSimpleReneVisitor: self | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> name [ | ||
|
||
^ magritteDescription label | ||
] | ||
|
||
{ #category : 'accessing' } | ||
PyramidMagritteProperty >> presenterBuilder [ | ||
|
||
^ presenterBuilder | ||
] | ||
|
||
{ #category : 'visiting' } | ||
PyramidMagritteProperty >> visitNumberDescription: aMANumberDescription [ | ||
|
||
| presenter | | ||
presenter := PyramidNumberInputPresenter new. | ||
presenter help: magritteDescription comment. | ||
aMANumberDescription min ifNotNil: [ | ||
presenter min: aMANumberDescription min ]. | ||
|
||
^ presenter | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters