2015-09-16 10:18 GMT+02:00 Skip Lentz <skip.lentz@inria.fr>:
On Sep 15, 2015, at 4:40 PM, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Hi Martin, Skip,
it makes sense, sort of.
ClassReorganized could be handled already by just either discarding whatever cache you would have on the protocols of the class (for example, in a browser) or comparing the new class organisation with the old one.
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.
You may be pointing to, however, another issue: ClassReorganized not carrying enough information (i.e. not the old set of protocols).
Yes⦠it only has the class which has been affected. No way to compare it.
This is it. But ClassReorganized can be used for reordering the protocols.
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. 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.
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). Thierry