[squeak-dev] Possible buggy senders of Class >> #category?

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Tue Dec 17 12:00:17 UTC 2019


Hi Marcel, thanks for the pointers! Just fixed that in XmasDecorations :-)


Follow-up question, consider the following (for me, quite likely) scenario: I develop a new convenience method for a system class, for example Collection >> #detect:ifAbsent:. Before committing it to Trunk, I only use it in a separate package as an extension method. Later, it is released via Trunk updates. When I now install my package in an up-to-date image, the category name will not end with '*-override', so unloading the package will delete the method.


So why does MCMethodDefinition >> #unload distinguish between regular extension methods and override extension methods, instead of recovering every method's history? :-)

Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Dienstag, 17. Dezember 2019 11:38:30
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] Possible buggy senders of Class >> #category?

Hi Christoph,

extensions to classes that are actually overrides -- so that selector was already taken before in that class -- are managed via Monticello through that "-override" suffix.

See:
MCMethodDefinition >> #isOverrideMethod
MCMethodDefinition >> #unload
MCPackage >> #snapshot

My Widgets project does this in Morph:

[cid:d2902c73-d6c7-4660-9920-b1812067aabb]

When unloading Widgets through Monticello, the orignal methods should be restored.

[cid:9111eaab-ede2-44ad-bb18-3e4d0b647d07]

Best,
Marcel


Am 16.12.2019 23:44:39 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:

I also heard this the first time now. Many thanks for the tip!


Does this exactly depend on the "override" suffix? So if I overrode dozens of methods, I could not distribute them into special categories?

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von tim Rowledge <tim at rowledge.org>
Gesendet: Montag, 16. Dezember 2019 23:30:11
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Possible buggy senders of Class >> #category?



> On 2019-12-16, at 2:20 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>
> That's exactly what's supposed to happen, if you properly named your category "*xyz-override". By marking a method as override, it belongs to both the original package and the overriding package.

Wait, what? I'm fairly sureI've never seen that mentioned before. Do we have that explained anywhere in plausibly obvious swiki page(s)?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
If only people came with pull-down menus and online help.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191217/63002cfd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 16508 bytes
Desc: image.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191217/63002cfd/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 70642 bytes
Desc: image.png
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191217/63002cfd/attachment-0003.png>


More information about the Squeak-dev mailing list