But I dont want to use too many ifTrue , ifFalse and end up with a long method.
So I was thinking creating a OrderedCollection that would be 2D , first dimension is the regex that fits the type the second is the pharo object that corresponds to this type . Then I will have a common method for each of those pharo object to deal with the parsing.
But I was wondering how to use a class that I dont know its name until runtime. For example lets say i get a string
aPythonString := '< Bone [ "side bone" , IK = True , ( 1.0 , 0.1 , 0.2) ]>'
I would want in this case to send the message the EphBoneType parse : aPythonString. The problem is that I dont know the contents of the string until I receive it. So I want the name of the class to be composed according the string received .
Is this possible ? Is this a smart way ? How would you do it ?