seandenigris / Pharo-Enhancements

MIT License
3 stars 1 forks source link

From String: Generalizing #32

Open seandenigris opened 1 year ago

seandenigris commented 1 year ago

Use Cases

Map to the best class representation…

… or a generic superclass if all else fails. This is the approach taken by LlLibraryItem. PeGtDeepestSubInstanceFilter supports this via Spotter, but then there is the non-Spotter case, which can be handled with something like:

str := Clipboard clipboardText asString.
cls := LlLibraryItem peClassForString: str.
cls fromString: str