On 12 Sep 2015, at 10:25 , Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
On 12 Sep 2015, at 17:34, Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de>> wrote:
2015-09-09 14:32 GMT+02:00 Yuriy Tymchuk <yuriy.tymchuk@me.com <mailto:yuriy.tymchuk@me.com>>: Hi,
as NautilusMethodSelected contains also an information about protocol, class, package; NautilusProtocolSelected contains an information about class and package; . . .
Iâve inherited NautilusClassSelected from NautilusPackageSelected and NautilusProtocolSelected from NautilusClassSelected⦠to remove duplication. But as announcement subscription also includes itâs subclasses, if you subscribe to NautilusPackageSelected, you end up receiving also NautilusClassSelected, NautilusProtocolSelected and NautilusMethodSelected.
What is a good way to resolve this (I can simply separate all the classes, but maybe there is something important from conceptual point of view)?
I didn't know announcments are working that way, but it may make sense if you want to group announcments (register once for "WindowAnnouncement" and receiving all kind of subannouncements (WindowClosed/WindowOpened â¦)
I donât know about performance, but as far as I understand you can also subscribe to âWindowAnnouncement withAllSubclassesâ.
That would be setting yourself up for a heap of duplicates. By design, you can subscribe twice to the same announcement and receive two notifications, so doing that will net you $InheritanceLevelsFromWindowAnnouncement copies of each... Cheers, Henry