Behavior.st
changeset 24505 d6fd2fc59509
parent 24479 2b01fef43f16
child 24521 9e0ae8e51e4b
equal deleted inserted replaced
24504:a3b2ffb4a2d5 24505:d6fd2fc59509
  3031 
  3031 
  3032     ^ [
  3032     ^ [
  3033         |newObject|
  3033         |newObject|
  3034 
  3034 
  3035         newObject := self evaluatorClass evaluateFrom:aStream ifFail:[^ exceptionBlock value].
  3035         newObject := self evaluatorClass evaluateFrom:aStream ifFail:[^ exceptionBlock value].
  3036         "ProtoObjects do not inherit from Obejct. Take care when restoring them"
  3036         "ProtoObjects do not inherit from Object. Take care when restoring them"
  3037         ((newObject class == self) or:[(newObject isKindOf:self) or:[self == Object and:[newObject isProtoObject]]])
  3037         ((newObject class == self) 
       
  3038          or:[(newObject isKindOf:self) 
       
  3039          or:[self == Object and:[newObject isProtoObject]]])
  3038             ifTrue:[newObject]
  3040             ifTrue:[newObject]
  3039             ifFalse:[exceptionBlock value].
  3041             ifFalse:[exceptionBlock value].
  3040     ] on:Error do:exceptionBlock.
  3042     ] on:Error do:exceptionBlock.
  3041 
  3043 
  3042     "
  3044     "
  3062     "
  3064     "
  3063 
  3065 
  3064     "Modified: / 16-02-2017 / 21:26:38 / stefan"
  3066     "Modified: / 16-02-2017 / 21:26:38 / stefan"
  3065     "Modified: / 28-07-2017 / 18:58:13 / cg"
  3067     "Modified: / 28-07-2017 / 18:58:13 / cg"
  3066     "Modified: / 05-06-2018 / 12:11:48 / Stefan Vogel"
  3068     "Modified: / 05-06-2018 / 12:11:48 / Stefan Vogel"
  3067     "Modified (comment): / 07-01-2019 / 17:36:46 / Stefan Vogel"
  3069     "Modified (format): / 01-08-2019 / 18:02:49 / Stefan Vogel"
  3068 !
  3070 !
  3069 
  3071 
  3070 readFromString:aString
  3072 readFromString:aString
  3071     "create an object from its printed representation.
  3073     "create an object from its printed representation.
  3072      For most classes, the string is expected to be in a format created by
  3074      For most classes, the string is expected to be in a format created by