diff --git a/src/GToolkit-GemStone-Pharo/GtGemstoneEvaluationResult.extension.st b/src/GToolkit-GemStone-Pharo/GtGemstoneEvaluationResult.extension.st index 479da496..ad4a759a 100644 --- a/src/GToolkit-GemStone-Pharo/GtGemstoneEvaluationResult.extension.st +++ b/src/GToolkit-GemStone-Pharo/GtGemstoneEvaluationResult.extension.st @@ -1,5 +1,22 @@ Extension { #name : #GtGemstoneEvaluationResult } +{ #category : #'*GToolkit-GemStone-Pharo' } +GtGemstoneEvaluationResult class >> createEvaluationResultFromData: aDictionaryOrObject [ + "Instantiate an evaluation result object from the given object. + We need to handle the case of the previous way of returning data." + + ^ (self isSerializedData: aDictionaryOrObject) + ifTrue: [ self fromDictionary: aDictionaryOrObject ] + ifFalse: [ + aDictionaryOrObject class = GtpoGtGemStoneEvaluationContext + ifTrue: [ + GtGemstoneEvaluationWithExceptionResult new + evaluationContext: aDictionaryOrObject ] + ifFalse: [ + GtGemstoneEvaluationWithComputedResult new + computedResult:aDictionaryOrObject ] ] +] + { #category : #'*GToolkit-GemStone-Pharo' } GtGemstoneEvaluationResult class >> fromDictionary: aDictionary [ "Answer the view specified by viewDictionary" diff --git a/src/GToolkit-GemStone/GtGemstoneEvaluationResult.class.st b/src/GToolkit-GemStone/GtGemstoneEvaluationResult.class.st index 4131aa1b..96e016e0 100644 --- a/src/GToolkit-GemStone/GtGemstoneEvaluationResult.class.st +++ b/src/GToolkit-GemStone/GtGemstoneEvaluationResult.class.st @@ -4,23 +4,6 @@ Class { #category : #'GToolkit-GemStone' } -{ #category : #'instance creation' } -GtGemstoneEvaluationResult class >> createEvaluationResultFromData: aDictionaryOrObject [ - "Instantiate an evaluation result object from the given object. - We need to handle the case of the previous way of returning data." - - ^ (self isSerializedData: aDictionaryOrObject) - ifTrue: [ self fromDictionary: aDictionaryOrObject ] - ifFalse: [ - aDictionaryOrObject class = GtpoGtGemStoneEvaluationContext - ifTrue: [ - GtGemstoneEvaluationWithExceptionResult new - evaluationContext: aDictionaryOrObject ] - ifFalse: [ - GtGemstoneEvaluationWithComputedResult new - computedResult:aDictionaryOrObject ] ] -] - { #category : #'instance creation' } GtGemstoneEvaluationResult class >> fromJSONDictionary: aDictionary [ ^ self new