We should make sure to unregister to all announcement when the window is
closed.
(Or is there any reason or situation in which nautilus can properly work
after the window is closed?)

2015-09-06 10:41 GMT+02:00 stepharo <[email protected]>:

> Hi
>
> I'm trying to understand what there is a need for this window ifNil: [^
> self ]
> And I wonder is this is not  problem due to a global announcer that would
> keep announcer even when the nautilus widget
> has been deleted.
> Any other suggestions?
>
> Stef
>
> classRemoved: anAnnouncement
>     | class oldPackage |
>     window ifNil: [ ^ self ].
>     window isDisplayed
>         ifFalse: [ ^ self ].
>     class := anAnnouncement classRemoved.
>     (self classWidget getClassesList includes: class)
>         ifTrue:
>             [
>
> classRecategorized: anAnnouncement
>
>     window ifNil: [ ^ self ].
>     window isDisplayed ifFalse: [ ^ self ].
>     self selectedPackage ifNotNil:[:selection |
>     ({ anAnnouncement oldCategory. anAnnouncement newCategory }
>         anySatisfy: [ :each | selection includesCategory: each ])
>             ifTrue: [ self updatePackageGroupAndClassList ]]
>
>
> classRemoved: anAnnouncement
>     | class oldPackage |
>     window ifNil: [ ^ self ].
>     window isDisplayed
>         ifFalse: [ ^ self ].
>     class := anAnnouncement classRemoved.
>     (self classWidget getClassesList includes: cla
>
>

Reply via email to