Переглянути джерело

Announcements class comments

Nicolas Petton 11 роки тому
батько
коміт
aa81cb9035
2 змінених файлів з 10 додано та 0 видалено
  1. 2 0
      js/Kernel-Announcements.js
  2. 8 0
      st/Kernel-Announcements.st

+ 2 - 0
js/Kernel-Announcements.js

@@ -1,5 +1,6 @@
 smalltalk.addPackage('Kernel-Announcements', {});
 smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
+smalltalk.AnnouncementSubscription.comment="The subscription is a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible."
 smalltalk.addMethod(
 "_announcementClass",
 smalltalk.method({
@@ -109,6 +110,7 @@ smalltalk.AnnouncementSubscription);
 
 
 smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
+smalltalk.Announcer.comment="The code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0aThe Announcer holds annoncement subscriptions (`AnnouncementSubscription`) in a private registry.\x0a\x0aUse `#on:do:` to register subscriptions."
 smalltalk.addMethod(
 "_announce_",
 smalltalk.method({

+ 8 - 0
st/Kernel-Announcements.st

@@ -2,6 +2,9 @@ Smalltalk current createPackage: 'Kernel-Announcements' properties: #{}!
 Object subclass: #AnnouncementSubscription
 	instanceVariableNames: 'block announcementClass'
 	package: 'Kernel-Announcements'!
+!AnnouncementSubscription commentStamp!
+The subscription is a single entry in a subscription registry of an `Announcer`.
+Several subscriptions by the same object is possible.!
 
 !AnnouncementSubscription methodsFor: 'accessing'!
 
@@ -35,6 +38,11 @@ handlesAnnouncement: anAnnouncement
 Object subclass: #Announcer
 	instanceVariableNames: 'registry subscriptions'
 	package: 'Kernel-Announcements'!
+!Announcer commentStamp!
+The code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).
+The Announcer holds annoncement subscriptions (`AnnouncementSubscription`) in a private registry.
+
+Use `#on:do:` to register subscriptions.!
 
 !Announcer methodsFor: 'announcing'!