[Cuis-dev] Small refactors to remove duplicated code in Browser
Juan Vuletich
juan at cuis.st
Thu Apr 9 10:03:18 PDT 2026
Hi Facu,
I think both changes are perfectly safe, and good cleanup. Just pushed
them to GitHub.
Thanks!
On 2026-04-07 5:19 PM, Facundo Javier Gelatti via Cuis-dev wrote:
> Hi!
>
> I attach two independent changes.
>
> A first one to remove some duplicated code for #defineClass:notifying:
> in Browser and HierarchyBrowser (I extracted a new message to be able
> to just add the difference).
>
> A second one, to remove the duplication in #removeMessageCategory in
> Browser and CodeFileBrowser, but which I'm not sure about and needs
> more explanation (which is below).
>
> The differences in #removeMessageCategory in Browser and
> CodeFileBrowser are:
>
> * that Browser /always/ sends changed: #messageCategoryList (which I
> guess is harmless?), and
> * CodeFileBrowser /does not/ send changed: #classSelectionChanged.
>
> But if we check the senders of #classSelectionChanged, we see it's
> only used in the context of #changed:, but no object seems to be
> listening to that change. If that's the case, then we can remove all
> usages of #classSelectionChanged and then remove the
> CodeFileBrowser>>#removeMessageCategory method (so CodeFileBrowser
> inherits the one from Browser). And that's what's done in the second
> change set.
>
> Cheers!
> Facu
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260409/087618ef/attachment.htm>
More information about the Cuis-dev
mailing list