> On 12 Sep 2015, at 10:25 , Yuriy Tymchuk <[email protected]> wrote: > >> >> On 12 Sep 2015, at 17:34, Nicolai Hess <[email protected] >> <mailto:[email protected]>> wrote: >> >> >> >> 2015-09-09 14:32 GMT+02:00 Yuriy Tymchuk <[email protected] >> <mailto:[email protected]>>: >> 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
signature.asc
Description: Message signed with OpenPGP using GPGMail
