|
@@ -1,15 +1,15 @@
|
|
|
define("amber_core/Kernel-Announcements", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
|
|
|
-var $vm=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
-var smalltalk=$vm,_st=$recv,globals=$globals;
|
|
|
-$vm.addPackage('Kernel-Announcements');
|
|
|
-$vm.packages["Kernel-Announcements"].transport = {"type":"amd","amdNamespace":"amber_core"};
|
|
|
+var $core=$boot.vm,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
+var smalltalk=$core,_st=$recv,globals=$globals;
|
|
|
+$core.addPackage('Kernel-Announcements');
|
|
|
+$core.packages["Kernel-Announcements"].transport = {"type":"amd","amdNamespace":"amber_core"};
|
|
|
|
|
|
-$vm.addClass('AnnouncementSubscription', $globals.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
|
|
|
+$core.addClass('AnnouncementSubscription', $globals.Object, ['valuable', 'announcementClass'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.AnnouncementSubscription.comment="I am a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "announcementClass",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -28,8 +28,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "announcementClass:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aClass){
|
|
@@ -47,14 +47,14 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "block",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1;
|
|
|
self._deprecatedAPI();
|
|
@@ -73,14 +73,14 @@ messageSends: ["deprecatedAPI", "valuable"]
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "block:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aValuable){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
self._deprecatedAPI();
|
|
|
self._valuable_(aValuable);
|
|
@@ -98,18 +98,18 @@ messageSends: ["deprecatedAPI", "valuable:"]
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "deliver:",
|
|
|
protocol: 'announcing',
|
|
|
fn: function (anAnnouncement){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1;
|
|
|
$1=self._handlesAnnouncement_(anAnnouncement);
|
|
|
-if($vm.assert($1)){
|
|
|
+if($core.assert($1)){
|
|
|
_st(self._valuable())._value_(anAnnouncement);
|
|
|
};
|
|
|
return self;
|
|
@@ -126,15 +126,15 @@ messageSends: ["ifTrue:", "handlesAnnouncement:", "value:", "valuable"]
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "handlesAnnouncement:",
|
|
|
protocol: 'announcing',
|
|
|
fn: function (anAnnouncement){
|
|
|
var self=this;
|
|
|
function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $3,$4,$2,$1,$receiver;
|
|
|
$3=_st($Smalltalk())._globals();
|
|
@@ -170,14 +170,14 @@ messageSends: ["ifNil:ifNotNil:", "at:", "globals", "name", "announcementClass",
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "receiver",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1;
|
|
|
$1=_st(self._valuable())._receiver();
|
|
@@ -195,8 +195,8 @@ messageSends: ["receiver", "valuable"]
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "valuable",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -215,8 +215,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementSubscription);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "valuable:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aValuable){
|
|
@@ -236,12 +236,12 @@ $globals.AnnouncementSubscription);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('AnnouncementValuable', $globals.Object, ['valuable', 'receiver'], 'Kernel-Announcements');
|
|
|
+$core.addClass('AnnouncementValuable', $globals.Object, ['valuable', 'receiver'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.AnnouncementValuable.comment="I wrap `valuable` objects (typically instances of `BlockClosure`) with a `receiver` to be able to unregister subscriptions based on a `receiver`.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "receiver",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -260,8 +260,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementValuable);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "receiver:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (anObject){
|
|
@@ -279,8 +279,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementValuable);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "valuable",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -299,8 +299,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementValuable);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "valuable:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (anObject){
|
|
@@ -318,14 +318,14 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.AnnouncementValuable);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "value",
|
|
|
protocol: 'evaluating',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1;
|
|
|
$1=_st(self._valuable())._value();
|
|
@@ -343,14 +343,14 @@ messageSends: ["value", "valuable"]
|
|
|
}),
|
|
|
$globals.AnnouncementValuable);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "value:",
|
|
|
protocol: 'evaluating',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1;
|
|
|
$1=_st(self._valuable())._value_(anObject);
|
|
@@ -370,22 +370,22 @@ $globals.AnnouncementValuable);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('Announcer', $globals.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
|
|
|
+$core.addClass('Announcer', $globals.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.Announcer.comment="I hold annoncement subscriptions (instances of `AnnouncementSubscription`) in a private registry.\x0aI announce (trigger) announces, which are then dispatched to all subscriptions.\x0a\x0aThe code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0a\x0a## API\x0a\x0aUse `#announce:` to trigger an announcement.\x0a\x0aUse `#on:do:` or `#on:send:to:` to register subscriptions.\x0a\x0aWhen using `#on:send:to:`, unregistration can be done with `#unregister:`.\x0a\x0a## Usage example:\x0a\x0a SystemAnnouncer current\x0a on: ClassAdded\x0a do: [ :ann | window alert: ann theClass name, ' added' ].";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "announce:",
|
|
|
protocol: 'announcing',
|
|
|
fn: function (anAnnouncement){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
_st(self["@subscriptions"])._do_((function(each){
|
|
|
|
|
|
-return $vm.withContext(function($ctx2) {
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
|
|
return _st(each)._deliver_(anAnnouncement);
|
|
|
|
|
@@ -406,15 +406,15 @@ messageSends: ["do:", "deliver:"]
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "initialize",
|
|
|
protocol: 'initialization',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
(
|
|
|
|
|
@@ -439,14 +439,14 @@ messageSends: ["initialize", "new"]
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:do:",
|
|
|
protocol: 'subscribing',
|
|
|
fn: function (aClass,aBlock){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
self._on_do_for_(aClass,aBlock,nil);
|
|
|
return self;
|
|
@@ -463,8 +463,8 @@ messageSends: ["on:do:for:"]
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:do:for:",
|
|
|
protocol: 'subscribing',
|
|
|
fn: function (aClass,aBlock,aReceiver){
|
|
@@ -472,7 +472,7 @@ var self=this;
|
|
|
function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
|
|
|
function $AnnouncementValuable(){return $globals.AnnouncementValuable||(typeof AnnouncementValuable=="undefined"?nil:AnnouncementValuable)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1,$3,$4,$6,$7,$5,$8,$2;
|
|
|
$1=self["@subscriptions"];
|
|
@@ -511,8 +511,8 @@ messageSends: ["add:", "valuable:", "new", "receiver:", "yourself", "announcemen
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:doOnce:",
|
|
|
protocol: 'subscribing',
|
|
|
fn: function (aClass,aBlock){
|
|
@@ -520,7 +520,7 @@ var self=this;
|
|
|
var subscription;
|
|
|
function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1,$2;
|
|
|
$1=_st($AnnouncementSubscription())._new();
|
|
@@ -529,7 +529,7 @@ $2=_st($1)._yourself();
|
|
|
subscription=$2;
|
|
|
_st(subscription)._valuable_((function(ann){
|
|
|
|
|
|
-return $vm.withContext(function($ctx2) {
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
|
|
_st(self["@subscriptions"])._remove_(subscription);
|
|
|
return _st(aBlock)._value_(ann);
|
|
@@ -552,8 +552,8 @@ messageSends: ["announcementClass:", "new", "yourself", "valuable:", "remove:",
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:send:to:",
|
|
|
protocol: 'subscribing',
|
|
|
fn: function (aClass,aSelector,anObject){
|
|
@@ -561,7 +561,7 @@ var self=this;
|
|
|
function $AnnouncementSubscription(){return $globals.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
|
|
|
function $MessageSend(){return $globals.MessageSend||(typeof MessageSend=="undefined"?nil:MessageSend)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $1,$3,$4,$6,$7,$5,$8,$2;
|
|
|
$1=self["@subscriptions"];
|
|
@@ -597,18 +597,18 @@ messageSends: ["add:", "valuable:", "new", "receiver:", "selector:", "yourself",
|
|
|
}),
|
|
|
$globals.Announcer);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "unsubscribe:",
|
|
|
protocol: 'subscribing',
|
|
|
fn: function (anObject){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
self["@subscriptions"]=_st(self["@subscriptions"])._reject_((function(each){
|
|
|
|
|
|
-return $vm.withContext(function($ctx2) {
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
|
|
|
return _st(_st(each)._receiver()).__eq(anObject);
|
|
|
|
|
@@ -631,20 +631,20 @@ $globals.Announcer);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('SystemAnnouncer', $globals.Announcer, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('SystemAnnouncer', $globals.Announcer, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.SystemAnnouncer.comment="My unique instance is the global announcer handling all Amber system-related announces.\x0a\x0a## API\x0a\x0aAccess to the unique instance is done via `#current`";
|
|
|
|
|
|
|
|
|
$globals.SystemAnnouncer.klass.iVarNames = ['current'];
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "current",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $2,$1,$receiver;
|
|
|
$2=self["@current"];
|
|
@@ -675,14 +675,14 @@ messageSends: ["ifNil:", "new"]
|
|
|
}),
|
|
|
$globals.SystemAnnouncer.klass);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "new",
|
|
|
protocol: 'instance creation',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
self._shouldNotImplement();
|
|
|
return self;
|
|
@@ -700,13 +700,13 @@ messageSends: ["shouldNotImplement"]
|
|
|
$globals.SystemAnnouncer.klass);
|
|
|
|
|
|
|
|
|
-$vm.addClass('SystemAnnouncement', $globals.Object, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('SystemAnnouncement', $globals.Object, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.SystemAnnouncement.comment="I am the superclass of all system announcements";
|
|
|
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "heliosClass",
|
|
|
protocol: 'helios',
|
|
|
fn: function (){
|
|
@@ -724,12 +724,12 @@ messageSends: []
|
|
|
$globals.SystemAnnouncement.klass);
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassAnnouncement', $globals.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassAnnouncement', $globals.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassAnnouncement.comment="I am the abstract superclass of class-related announcements.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "theClass",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -748,8 +748,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ClassAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "theClass:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aClass){
|
|
@@ -769,30 +769,30 @@ $globals.ClassAnnouncement);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassAdded', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassAdded', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassCommentChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassCommentChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassDefinitionChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassDefinitionChanged', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassDefinitionChanged.comment="I am emitted when the definition of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassMigrated', $globals.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassMigrated', $globals.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassMigrated.comment="I am emitted when a class is migrated.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldClass",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -811,8 +811,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ClassMigrated);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldClass:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aClass){
|
|
@@ -832,12 +832,12 @@ $globals.ClassMigrated);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassMoved', $globals.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassMoved', $globals.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassMoved.comment="I am emitted when a class is moved from one package to another.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldPackage",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -856,8 +856,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ClassMoved);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldPackage:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aPackage){
|
|
@@ -877,24 +877,24 @@ $globals.ClassMoved);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassRemoved', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassRemoved', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ClassRenamed', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ClassRenamed', $globals.ClassAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('MethodAnnouncement', $globals.SystemAnnouncement, ['method'], 'Kernel-Announcements');
|
|
|
+$core.addClass('MethodAnnouncement', $globals.SystemAnnouncement, ['method'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.MethodAnnouncement.comment="I am the abstract superclass of method-related announcements.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "method",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -913,8 +913,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.MethodAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "method:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aCompiledMethod){
|
|
@@ -934,18 +934,18 @@ $globals.MethodAnnouncement);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('MethodAdded', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('MethodAdded', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.MethodAdded.comment="I am emitted when a `CompiledMethod` is added to a class.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('MethodModified', $globals.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
|
|
|
+$core.addClass('MethodModified', $globals.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.MethodModified.comment="I am emitted when a `CompiledMethod` is modified (a new method is installed). I hold a reference to the old method being replaced.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldMethod",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -964,8 +964,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.MethodModified);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldMethod:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aMethod){
|
|
@@ -985,12 +985,12 @@ $globals.MethodModified);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('MethodMoved', $globals.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
|
|
|
+$core.addClass('MethodMoved', $globals.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.MethodMoved.comment="I am emitted when a `CompiledMethod` is moved to another protocol. I hold a refernce to the old protocol of the method.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldProtocol",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -1009,8 +1009,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.MethodMoved);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "oldProtocol:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aString){
|
|
@@ -1030,18 +1030,18 @@ $globals.MethodMoved);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('MethodRemoved', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('MethodRemoved', $globals.MethodAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.MethodRemoved.comment="I am emitted when a `CompiledMethod` is removed from a class.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('PackageAnnouncement', $globals.SystemAnnouncement, ['package'], 'Kernel-Announcements');
|
|
|
+$core.addClass('PackageAnnouncement', $globals.SystemAnnouncement, ['package'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.PackageAnnouncement.comment="I am the abstract superclass of package-related announcements.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "package",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -1060,8 +1060,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.PackageAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "package:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aPackage){
|
|
@@ -1081,43 +1081,43 @@ $globals.PackageAnnouncement);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('PackageAdded', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('PackageAdded', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.PackageAdded.comment="I am emitted when a `Package` is added to the system.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('PackageClean', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('PackageClean', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.PackageClean.comment="I am emitted when a package is committed and becomes clean.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('PackageDirty', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('PackageDirty', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.PackageDirty.comment="I am emitted when a package becomes dirty.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('PackageRemoved', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('PackageRemoved', $globals.PackageAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.PackageRemoved.comment="I am emitted when a `Package` is removed from the system.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ProtocolAnnouncement', $globals.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
|
|
|
+$core.addClass('ProtocolAnnouncement', $globals.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ProtocolAnnouncement.comment="I am the abstract superclass of protocol-related announcements.";
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "package",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
function $Package(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}
|
|
|
|
|
|
-return $vm.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
|
|
|
var $2,$1,$3,$4;
|
|
|
$2=self._protocol();
|
|
@@ -1125,7 +1125,7 @@ $2=self._protocol();
|
|
|
$ctx1.sendIdx["protocol"]=1;
|
|
|
|
|
|
$1=_st($2)._beginsWith_("*");
|
|
|
-if(!$vm.assert($1)){
|
|
|
+if(!$core.assert($1)){
|
|
|
$3=_st(self._theClass())._package();
|
|
|
return $3;
|
|
|
};
|
|
@@ -1147,8 +1147,8 @@ messageSends: ["ifFalse:", "beginsWith:", "protocol", "package", "theClass", "na
|
|
|
}),
|
|
|
$globals.ProtocolAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "protocol",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -1167,8 +1167,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ProtocolAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "protocol:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aString){
|
|
@@ -1186,8 +1186,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ProtocolAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "theClass",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -1206,8 +1206,8 @@ messageSends: []
|
|
|
}),
|
|
|
$globals.ProtocolAnnouncement);
|
|
|
|
|
|
-$vm.addMethod(
|
|
|
-$vm.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "theClass:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aClass){
|
|
@@ -1227,13 +1227,13 @@ $globals.ProtocolAnnouncement);
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ProtocolAdded', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ProtocolAdded', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ProtocolAdded.comment="I am emitted when a protocol is added to a class.";
|
|
|
|
|
|
|
|
|
|
|
|
-$vm.addClass('ProtocolRemoved', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
|
|
|
+$core.addClass('ProtocolRemoved', $globals.ProtocolAnnouncement, [], 'Kernel-Announcements');
|
|
|
|
|
|
$globals.ProtocolRemoved.comment="I am emitted when a protocol is removed from a class.";
|
|
|
|