[squeak-dev] #clearCredentials vs. ModificationForbidden

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Fri Jun 5 17:36:44 UTC 2020


This does not work for me:


x := 'x'.
x beReadOnlyObject.
y := ''.
x becomeForward: y copyHash: false.


Still raises a ModificationForbidden.


Best,

Christoph

<http://www.hpi.de/>
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
Gesendet: Freitag, 5. Juni 2020 19:31:30
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] #clearCredentials vs. ModificationForbidden

With copyHash: false, I hope you can. It should not touch the original
object, which is to be discarded anyway.

Am Fr., 5. Juni 2020 um 19:24 Uhr schrieb Thiede, Christoph
<Christoph.Thiede at student.hpi.uni-potsdam.de>:
>
> > Use becomeForward: and collect garbage?
>
>
> Afaik you cannot forward a read-only object?
>
> ________________________________
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Jakob Reschke <forums.jakob at resfarm.de>
> Gesendet: Freitag, 5. Juni 2020 17:53:30
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] #clearCredentials vs. ModificationForbidden
>
> Use becomeForward: and collect garbage?
>
> Marcel Taeumel <marcel.taeumel at hpi.de> schrieb am Fr., 5. Juni 2020, 16:27:
>>
>> Hi all!
>>
>> How to update MCHttpRepository >> #clearCredentials?
>>
>> clearCredentials
>> user ifNotNil: [user atAllPut: $x].
>> password ifNotNil: [password atAllPut: $x].
>> user := password := String empty
>>
>> Make those strings not be read-only?
>>
>> Best,
>> Marcel
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200605/6908a3ce/attachment.html>


More information about the Squeak-dev mailing list