"Change Set: Object-asStringOrText-dgd Date: 11 October 2003 Author: Diego Gomez Deck DiegoGomezDeck@ConsultAr.com
Several widgets (example: PluggableListMorph) send by default #asStringOrText to the contained objects.
This changeset introduces an implementation in Object allowing to include a lot of different types of objects in lists just using the default implementation.
Only one simple method is added.
"
Hi diego
I do not have the time to look carefully, but is it the equivalent of the displayString in VisualWorks? In VW you have printString for "looking at the object in the debugger, inspector" and displayString to get a string when the object is displayed in list.
What is the difference between asStringOrtext and printString? If this is the VW displayString intention maybe we should call it in a similar way to convey its precise intent and fix the widgets.
Stef
On Samedi, oct 11, 2003, at 17:04 Europe/Zurich, Diego Gomez Deck wrote:
"Change Set: Object-asStringOrText-dgd Date: 11 October 2003 Author: Diego Gomez Deck DiegoGomezDeck@ConsultAr.com
Several widgets (example: PluggableListMorph) send by default #asStringOrText to the contained objects.
This changeset introduces an implementation in Object allowing to include a lot of different types of objects in lists just using the default implementation.
Only one simple method is added.
"
-- Diego Gomez Deck http://www.small-land.org
Hi Stef...
Hi diego
I do not have the time to look carefully, but is it the equivalent of the displayString in VisualWorks? In VW you have printString for "looking at the object in the debugger, inspector" and displayString to get a string when the object is displayed in list.
I'm not the expert here so what I'll say is pure-guessing based on my understanding.
What is the difference between asStringOrtext and printString? If this is the VW displayString intention maybe we should call it in a similar way to convey its precise intent and fix the widgets.
In Squeak we have not #displayString, we have #printString (and related like #fullPrintString, #printStringLimitedTo:, etc) and #asString.
#asString is only a conversion message (not a printing one), to see to see the difference evaluate:
'Squeak' printString. 'Squeak' asString.
The message in question (#asStringOrText) is a conversion method but take care of the 'OrText' part. The receiver can choose to answer a plain String or a Text (a String with formatting).
In the current version of Squeak you can find this message implemented in: String and Text (with ^ self) and in MethodReference (I guess, the only user of this idiom).
My [ENH] just generalizes this idiom in Object.
Stef
I hope this helps.
Cheers,
Diego
PS: How the French translation is progressing?
PS: How the French translation is progressing?
I'm translating the Etoy book in french (4 chapters already) and the french translation got stuck because I was waiting to know what was the future of babel. So having babel in would be a good push to the french translation.
Stef
For the others questions I will have a look once I finished with the preparation of lectures :(
Hi Stef,
PS: How the French translation is progressing?
I'm translating the Etoy book in french (4 chapters already) and the french translation got stuck because I was waiting to know what was the future of babel.
The translation efforts are in a safe area.
We're talking HOW to make the image translatable but in every case the translation-work is safe. Remember I have an almost complete Spanish translation (about 1800 phrases) and to lose them IS NOT AN OPTION.
So having babel in would be a good push to the french translation.
Sure, and we'll get it!
Stef
Cheers,
Already in the image, although uses #printString instead of the proposed #asString
squeak-dev@lists.squeakfoundation.org