Skip to content

Commit

Permalink
Fix loading in GemStone [feenkcom/gtoolkit#3942]
Browse files Browse the repository at this point in the history
  • Loading branch information
chisandrei committed Aug 21, 2024
1 parent e2aa4e1 commit 16a398d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
17 changes: 0 additions & 17 deletions src/GToolkit-GemStone/GtGemstoneEvaluationResult.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 16a398d

Please sign in to comment.