+ 1
I need for example a string representation of objects generally to display in anchors in our seaside application. We have a class DomainObject from which most of our classes inherit, so this is probably the place to add a 'displayString' for something like this.
Not necessarily domain objects only.
Some core objects (Blocks, CompiledMethods, etc.) could benefit from having a developer string representation (#printString) and a UI string representation (#displayString).
I don't really understand why. How would you distinguish between which (kinds of) core objects and which not? Will you not end up with a displayString on Object again?
Yes, I want displayString on Object.
What I don't like is #asString in Object.
I want to be able to do: Transcript show: anyObject displayString.
Without getting a single quoted output if anyObject was a String.
Regards.