On Sep 16, 2015, at 10:36 AM, Thierry Goubier <thierry.goubier@gmail.com> wrote:



2015-09-16 10:18 GMT+02:00 Skip Lentz <skip.lentz@inria.fr>:

As far as I know, you can���t compare to the old class organization because it is already changed to the new one..

Yes but: the receiver of the announcement may have a copy of the old one. For example, when AltBrowser receives that, it clears its current knowledge of the class organisation and rebuilts it.

Ah yes, that way it is possible.

 

> I'm not sure your ProtocolRenamed solves that.

While it may not solve the problem of ClassReorganized lacking information, it does give extra information as to what happened. Right now you simply don���t know when a protocol was renamed.

Because, up to know, we managed by either: rebuilding what depends on the organisation, or use it for something else.

For example, usually in Smalltalk, protocols are ordered and a user may reorder them by hand -> ClassReorganized. Nautilus takes a different view (order alphabetically, add a all protocol), hence Pharo protocols have integrated the Nautilus viewpoint (the 'all' protocol), and AltBrowser disregard this (the 'all' protocol and the ordering) because I prefer a different way of ordering.
 

> But it won't do much harm... Unless Nautilus overeacts and refresh itself 20 times, that it :)

If Nautilus does not subscribe to ProtocolRenamed then nothing happens, no?
I am willing to create an issue, propose a slice, etc.

One more thing. I hope that when renaming the protocol, the relevant MethodRecategorized are sent, because many things depend on that one.

Yes, those are already sent. ProtocolRenamed, if implemented, should be announced in addition to those.

I need to check AltBrowser behavior on this one. Renaming a protocol is not what I expected. It looks harmless, but it has important consequences if the protocol is an extension or an override.

Alright, let me know.

 

Thanks for your reply :)

PS: There���s something else related to System-Announcements, namely that when I rename a category I get no CategoryRenamed announcement.
I will send an e-mail about that later.

Hum, SystemOrganizer>>#renameCategory:toBe: sends it (in Pharo4).

Indeed it does, but RPackageTag>>#renameTo:category: suspends the SystemAnnouncer while it sends SystemOrganizer>>#renameCategory:toBe:.
I don���t know why, I���m interested to know. Because RPackageTag>>#renameTo:category: is used when you rename a category (in Nautilus, at least).

Skip