Ouch, I overlooked this. Thank you for the fast feedback! merged via Morphic-ct.1906. :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2022-02-24T12:17:34+01:00, marcel.taeumel@hpi.de wrote:<br>
<br>
> Hi Christoph --<br>
> <br>
> +1 but be careful to answer 'nil' in such cases:<br>
> <br>
> ...<br>
> otherProperties ifNil: [^ self].<br>
> <br>
> ...<br>
> <br>
> Best,<br>
> Marcel<br>
> Am 24.02.2022 11:59:30 schrieb commits at source.squeak.org <commits at source.squeak.org>:<br>
> A new version of Morphic was added to project The Inbox:<br>
> http://source.squeak.org/inbox/Morphic-ct.1905.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: Morphic-ct.1905<br>
> Author: ct<br>
> Time: 24 February 2022, 11:59:10.222147 am<br>
> UUID: ac4eb336-4623-5f48-9485-b4e46c636580<br>
> Ancestors: Morphic-mt.1904<br>
> <br>
> Proposal: For Morph extensions, establish the common return value semantics known from most other collection protocols. I.e., #setProperty:... now answers the added value and #removeProperty: answers the removed value.<br>
> <br>
> This can also help us to clean up a number of senders, browse this for an impression:<br>
> self systemNavigation browseAllCallsOn: #removeProperty: and: #valueOfProperty:<br>
> <br>
> =============== Diff against Morphic-mt.1904 ===============<br>
> <br>
> Item was changed:<br>
> ----- Method: Morph>>removeProperty: (in category 'accessing - properties') -----<br>
> removeProperty: aSymbol<br>
> + "Remove the property named aSymbol if it exists. Answer the old value or nil."<br>
> - "removes the property named aSymbol if it exists"<br>
> extension ifNil: [^ self].<br>
> + ^ extension removeProperty: aSymbol!<br>
> - extension removeProperty: aSymbol!<br>
> <br>
> Item was changed:<br>
> ----- Method: Morph>>setProperties: (in category 'accessing - properties') -----<br>
> setProperties: aList<br>
> + "Set many properties at once from a list of prop, value, prop, value. Answer the list."<br>
> - "Set many properties at once from a list of prop, value, prop, value"<br>
> <br>
> 1 to: aList size by: 2 do: [:ii |<br>
> + self setProperty: (aList at: ii) toValue: (aList at: ii+1)].<br>
> + ^ aList!<br>
> - self setProperty: (aList at: ii) toValue: (aList at: ii+1)].!<br>
> <br>
> Item was changed:<br>
> ----- Method: Morph>>setProperty:toValue: (in category 'accessing - properties') -----<br>
> setProperty: aSymbol toValue: anObject<br>
> + "Change the receiver's property named aSymbol to anObject. Answer anObject."<br>
> - "change the receiver's property named aSymbol to anObject"<br>
> anObject ifNil: [^ self removeProperty: aSymbol].<br>
> + ^ self assureExtension setProperty: aSymbol toValue: anObject!<br>
> - self assureExtension setProperty: aSymbol toValue: anObject!<br>
> <br>
> Item was changed:<br>
> ----- Method: MorphExtension>>removeProperty: (in category 'accessing - other properties') -----<br>
> removeProperty: aSymbol<br>
> + "Removes the property named aSymbol if it exists. Answer the old value or nil."<br>
> + | value |<br>
> - "removes the property named aSymbol if it exists"<br>
> otherProperties ifNil: [^ self].<br>
> + value := otherProperties removeKey: aSymbol ifAbsent: [].<br>
> + otherProperties isEmpty ifTrue: [self removeOtherProperties].<br>
> + ^ value!<br>
> - otherProperties removeKey: aSymbol ifAbsent: [].<br>
> - otherProperties isEmpty ifTrue: [self removeOtherProperties]!<br>
> <br>
> Item was changed:<br>
> ----- Method: MorphExtension>>setProperty:toValue: (in category 'accessing - other properties') -----<br>
> setProperty: aSymbol toValue: abObject<br>
> + "Change the receiver's property named aSymbol to anObject. Answer anObject."<br>
> + ^ self assureOtherProperties at: aSymbol put: abObject!<br>
> - "change the receiver's property named aSymbol to anObject"<br>
> - self assureOtherProperties at: aSymbol put: abObject!<br>
> <br>
> <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220224/b9e5fbce/attachment.html><br>
> <br>