Ok. I opened the issue 21689 <https://pharo.fogbugz.com/f/cases/21689/displayString-for-String-should-return-self>
2018-04-11 22:06 GMT+02:00 Stephane Ducasse <stepharo.s...@gmail.com>: > 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 > <stepharo.s...@gmail.com> wrote: > > ? > > > > > > On Wed, Apr 11, 2018 at 10:02 PM, Aliaksei Syrel <alex.sy...@gmail.com> > 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 Ducasse <stepharo.s...@gmail.com> > wrote: > >>> > >>> 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 > >>> <emaring...@gmail.com> wrote: > >>> > 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. "true" > >>> > s printString = s. "false" > >>> > > >>> > Regards, > >>> > > >>> > > >>> > On 10/04/2018 12:21, Denis Kudriashov wrote: > >>> >> Hi. > >>> >> > >>> >> According to the comment of #displayString it should be used as > default > >>> >> textual representation of objects in the UI: > >>> >> > >>> >> "While printString is about to give a detailled information > about > >>> >> an > >>> >> object, displayString is a message that should return a short > >>> >> string-based representation to be used by list and related UI > >>> >> frameworks. By default, simply return printString." > >>> >> "asString should not be implemented in Object, and kept for > >>> >> conversion between strings, symbols, text and characters." > >>> >> > >>> >> But String itself does not respect this message: > >>> >> > >>> >> 'some string' displayString " ==> '''someString''' " > >>> >> > >>> >> > >>> >> Is it bug? Or is there any reason for this? > >>> >> > >>> >> Best regards, > >>> >> Denis > >>> > > >>> > -- > >>> > Esteban A. Maringolo > >>> > > >>> > >> > >