I think the original question was how to change one element from a collection 
by another one, in this case, replace a string by another one, by 'editing' an 
item, not to destructively modify a string (which would be a bad idea (tm)).

Inspect:

  #('foo' 'bar') copy

Go to the Raw view, double-click 'foo', edit it and press Return to accept -> 
no go.

Normally, we can in-place edit by double-clicking, but that seems to be broken 
(well, you can edit but it won't accept the change).

I tried this in my working 40 image, and in a recent 50 image.

> On 19 Dec 2015, at 21:24, Tudor Girba <tu...@tudorgirba.com> wrote:
> 
> Hi,
> 
> Strings are supposed to be immutable, and that is why we do not support 
> editing by default :).
> 
> If you would want to provide editing tools for a String, you would need to 
> create a new inspector extension. This would probably be a bit cumbersome 
> because you would probably have to work with basic things like 
> String>>at:put:.
> 
> A different way would be to not work with Strings directly, but with some 
> wrapper objects that hold those strings. In this case, it would be easy to 
> replace the wrapped string every time the editor changes.
> 
> Cheers,
> Doru
> 
> 
>> On Dec 19, 2015, at 11:53 AM, H. Hirzel <hannes.hir...@gmail.com> wrote:
>> 
>> Hello
>> 
>> I am inspecting a collection of strings in Pharo 5.
>> 
>> I wonder how I get at an edit pane to modify a particular string?
>> 
>> Thank you for the answer in advance
>> 
>> --Hannes
>> 
> 
> --
> www.tudorgirba.com
> www.feenk.com 
> 
> “Live like you mean it."
> 
> 


Reply via email to