Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-12 Thread Stephane Ducasse
Thanks denis! No problem syrel I was also dead tired :) On Thu, Apr 12, 2018 at 10:19 AM, Denis Kudriashov wrote: > Ok. I opened the issue 21689 > > 2018-04-11 22:06 GMT+02:00 Stephane Ducasse : >> >> The point is a list of strings should be

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-12 Thread Denis Kudriashov
Ok. I opened the issue 21689 2018-04-11 22:06 GMT+02:00 Stephane Ducasse : > The point is a list of strings should be displayed as > > a > b > c > > and not > > 'a' > 'b' > 'c' > > It

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-11 Thread Stephane Ducasse
The point is a list of strings should be displayed as a b c and not 'a' 'b' 'c' It shows that often people confuse asString and printString BTW. On Wed, Apr 11, 2018 at 10:05 PM, Stephane Ducasse wrote: > ? > > > On Wed, Apr 11, 2018 at 10:02 PM, Aliaksei Syrel

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-11 Thread Aliaksei Syrel
I had to read more carefully :) Yes, it should be true, but now it is false, which is a problem. Cheers, Alex On 11 April 2018 at 22:02, Aliaksei Syrel wrote: > Hi, > > I am sorry for interrupting this conversation... but > > | s | > s := 'Hello, ''Funny'' World'. > s

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-11 Thread Stephane Ducasse
? On Wed, Apr 11, 2018 at 10:02 PM, Aliaksei Syrel wrote: > Hi, > > I am sorry for interrupting this conversation... but > > | s | > s := 'Hello, ''Funny'' World'. > s displayString = s "false" and not true! > > Cheers, > Alex > > On 11 April 2018 at 21:53, Stephane

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-11 Thread Aliaksei Syrel
Hi, I am sorry for interrupting this conversation... but | s | s := 'Hello, ''Funny'' World'. s displayString = s *"false"* and not true! Cheers, Alex On 11 April 2018 at 21:53, Stephane Ducasse wrote: > Yes I think that > > | s | > s := 'Hello, ''Funny'' World'. > s

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-11 Thread Stephane Ducasse
Yes I think that | s | s := 'Hello, ''Funny'' World'. s displayString = s. "true" s printString = s. "false" is ok and widgets should use displayString. Stef On Tue, Apr 10, 2018 at 5:28 PM, Esteban A. Maringolo wrote: > Isn't #displayString implemented in terms of

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Esteban A. Maringolo
In Object yes (to default to the existing #printOn: implementation), but there are several other implementors of #displayOn: that work completely different (e.g. Collection, UndefinedObject, etc). Nonetheless, I think the #printOn:/#displayOn: is a good practice, in my Pharo classes I "polyfill"

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Benoit St-Jean via Pharo-dev
--- Begin Message --- As far as I can remember, yes.  Dolphin has always been like that. ***BUT*** you will also notice that Dolphin has always used #printOn: inside #displayOn: ! (Latest image is also like that) - Benoît St-Jean Yahoo! Messenger: bstjean Twitter:

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Esteban A. Maringolo
Current VisualWorks (8.x) has #Object>>displayString but it is not implemented in terms of #displayOn: Dolphin Smalltalk is the one that has #displayString implemented in terms of #displayOn: and uses #displayString in all end user presentations of the object, so for aPerson, the inspector would

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Benoit St-Jean via Pharo-dev
--- Begin Message --- In the "old" days, programmers made sure to respect the following conventions : you implement #storeOn:, #displayString: and #printOn: .  Eventually, an object will be sent #storeString and #printString and will use your #whateverOn: implementation.  It looks like that

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Denis Kudriashov
Hi Esteban. We have method #displayOn: but it has different purpose: argument is a kind of canvas. So it is not related. 2018-04-10 17:28 GMT+02:00 Esteban A. Maringolo : > Isn't #displayString implemented in terms of #displayOn: the same way > #printString is implemented

Re: [Pharo-dev] Why String do not implement #displayString?

2018-04-10 Thread Esteban A. Maringolo
Isn't #displayString implemented in terms of #displayOn: the same way #printString is implemented in terms of "printOn:"? And in the case of String #displayString should return the receiver (it is, self), so the following should be true. | s | s := 'Hello, ''Funny'' World'. s displayString = s.