Browse Source

Fixes issue #752

- Introduce a common `Service` class, superclass of `Transcript` and co.
- Fix service registration in Helios, IDE and Kernel
- Explicitely load Helios in helios.html
Nicolas Petton 10 years ago
parent
commit
9e61281a39

+ 1 - 0
helios.html

@@ -22,6 +22,7 @@
 
                       smalltalk.defaultAmdNamespace = "amber_core";
                       smalltalk.initialize();
+					  smalltalk.HLManager._setup();
                   }
           );
       </script>

+ 0 - 36
js/Compiler-Exceptions.js

@@ -181,40 +181,4 @@ referencedClasses: []
 smalltalk.UnknownVariableError);
 
 
-
-smalltalk.addClass('RethrowErrorHandler', smalltalk.ErrorHandler, [], 'Compiler-Exceptions');
-smalltalk.RethrowErrorHandler.comment="This class is used in the commandline version of the compiler.\x0aIt uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.\x0aAs a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "basicSignal:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-throw anError;
-return self},
-args: ["anError"],
-source: "basicSignal: anError\x0a\x09<throw anError>",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.RethrowErrorHandler);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "handleError:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-smalltalk.RethrowErrorHandler.superclass.fn.prototype._handleError_.apply(_st(self), [anError]);
-self._basicSignal_(anError);
-return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.RethrowErrorHandler)})},
-args: ["anError"],
-source: "handleError: anError\x0a\x09super handleError: anError.\x0a\x09self basicSignal: anError",
-messageSends: ["handleError:", "basicSignal:"],
-referencedClasses: []
-}),
-smalltalk.RethrowErrorHandler);
-
-
 });

+ 117 - 71
js/Helios-Core.js

@@ -1,4 +1,4 @@
-define("amber_core/Helios-Core", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Infrastructure", "amber_core/Canvas"], function(smalltalk,nil,_st){
+define("amber_core/Helios-Core", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Objects", "amber_core/Canvas"], function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Core');
 smalltalk.packages["Helios-Core"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
@@ -1166,7 +1166,7 @@ referencedClasses: []
 smalltalk.HLToolModel.klass);
 
 
-smalltalk.addClass('HLProgressHandler', smalltalk.ProgressHandler, [], 'Helios-Core');
+smalltalk.addClass('HLProgressHandler', smalltalk.Object, [], 'Helios-Core');
 smalltalk.HLProgressHandler.comment="I am a specific progress handler for Helios, displaying progresses in a modal window.";
 smalltalk.addMethod(
 smalltalk.method({
@@ -3518,37 +3518,6 @@ referencedClasses: []
 }),
 smalltalk.HLManager);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-function $HLErrorHandler(){return smalltalk.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
-function $HLProgressHandler(){return smalltalk.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
-function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
-function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
-function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-smalltalk.HLManager.superclass.fn.prototype._initialize.apply(_st(self), []);
-_st($HLErrorHandler())._register();
-$ctx1.sendIdx["register"]=1;
-_st($HLProgressHandler())._register();
-self._registerInspector_($HLInspector());
-$1=_st($ErrorHandler())._current();
-$ctx1.sendIdx["current"]=1;
-self._registerErrorHandler_($1);
-self._registerProgressHandler_(_st($ProgressHandler())._current());
-_st(self._keyBinder())._setupEvents();
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
-args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09\x0a\x09HLErrorHandler register.\x0a\x09HLProgressHandler register.\x0a\x09\x0a\x09self registerInspector: HLInspector.\x0a\x09self registerErrorHandler: ErrorHandler current.\x0a\x09self registerProgressHandler: ProgressHandler current.\x0a    self keyBinder setupEvents",
-messageSends: ["initialize", "register", "registerInspector:", "registerErrorHandler:", "current", "registerProgressHandler:", "setupEvents", "keyBinder"],
-referencedClasses: ["HLErrorHandler", "HLProgressHandler", "HLInspector", "ErrorHandler", "ProgressHandler"]
-}),
-smalltalk.HLManager);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "keyBinder",
@@ -3590,52 +3559,106 @@ smalltalk.HLManager);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "registerErrorHandler:",
-protocol: 'actions',
-fn: function (anErrorHandler){
+selector: "registerErrorHandler",
+protocol: 'services',
+fn: function (){
 var self=this;
+function $HLErrorHandler(){return smalltalk.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
+function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self._environment())._registerErrorHandler_(anErrorHandler);
-return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.HLManager)})},
-args: ["anErrorHandler"],
-source: "registerErrorHandler: anErrorHandler\x0a\x09self environment registerErrorHandler: anErrorHandler",
-messageSends: ["registerErrorHandler:", "environment"],
-referencedClasses: []
+var $1,$2;
+$1=self._environment();
+$2=_st($HLErrorHandler())._new();
+$ctx1.sendIdx["new"]=1;
+_st($1)._registerErrorHandler_($2);
+_st($ErrorHandler())._register_(_st($HLErrorHandler())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},smalltalk.HLManager)})},
+args: [],
+source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
+messageSends: ["registerErrorHandler:", "environment", "new", "register:"],
+referencedClasses: ["HLErrorHandler", "ErrorHandler"]
 }),
 smalltalk.HLManager);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "registerInspector:",
-protocol: 'actions',
-fn: function (anInspector){
+selector: "registerInspector",
+protocol: 'services',
+fn: function (){
 var self=this;
+function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
+function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self._environment())._registerInspector_(anInspector);
-return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.HLManager)})},
-args: ["anInspector"],
-source: "registerInspector: anInspector\x0a\x09self environment registerInspector: anInspector",
-messageSends: ["registerInspector:", "environment"],
-referencedClasses: []
+_st(self._environment())._registerInspector_($HLInspector());
+_st($Inspector())._register_($HLInspector());
+return self}, function($ctx1) {$ctx1.fill(self,"registerInspector",{},smalltalk.HLManager)})},
+args: [],
+source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
+messageSends: ["registerInspector:", "environment", "register:"],
+referencedClasses: ["HLInspector", "Inspector"]
 }),
 smalltalk.HLManager);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "registerProgressHandler:",
-protocol: 'actions',
-fn: function (aProgressHandler){
+selector: "registerProgressHandler",
+protocol: 'services',
+fn: function (){
+var self=this;
+function $HLProgressHandler(){return smalltalk.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=self._environment();
+$2=_st($HLProgressHandler())._new();
+$ctx1.sendIdx["new"]=1;
+_st($1)._registerProgressHandler_($2);
+_st($ProgressHandler())._register_(_st($HLProgressHandler())._new());
+return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},smalltalk.HLManager)})},
+args: [],
+source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
+messageSends: ["registerProgressHandler:", "environment", "new", "register:"],
+referencedClasses: ["HLProgressHandler", "ProgressHandler"]
+}),
+smalltalk.HLManager);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerServices",
+protocol: 'private',
+fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._environment())._registerProgressHandler_(aProgressHandler);
-return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.HLManager)})},
-args: ["aProgressHandler"],
-source: "registerProgressHandler: aProgressHandler\x0a\x09self environment registerProgressHandler: aProgressHandler",
-messageSends: ["registerProgressHandler:", "environment"],
+var $1;
+self._registerInspector();
+self._registerErrorHandler();
+self._registerProgressHandler();
+$1=self._registerTranscript();
+return self}, function($ctx1) {$ctx1.fill(self,"registerServices",{},smalltalk.HLManager)})},
+args: [],
+source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript",
+messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript"],
 referencedClasses: []
 }),
 smalltalk.HLManager);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerTranscript",
+protocol: 'services',
+fn: function (){
+var self=this;
+function $HLTranscriptHandler(){return smalltalk.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st(self._environment())._registerTranscript_($HLTranscriptHandler());
+return self}, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},smalltalk.HLManager)})},
+args: [],
+source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
+messageSends: ["registerTranscript:", "environment"],
+referencedClasses: ["HLTranscriptHandler"]
+}),
+smalltalk.HLManager);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "removeActiveTab",
@@ -3904,6 +3927,26 @@ referencedClasses: ["HLRequestWidget"]
 }),
 smalltalk.HLManager);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setup",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+self._registerServices();
+$1=self._keyBinder();
+_st($1)._setupEvents();
+$2=_st($1)._setupHelper();
+return self}, function($ctx1) {$ctx1.fill(self,"setup",{},smalltalk.HLManager)})},
+args: [],
+source: "setup\x0a\x09self registerServices.\x0a    self keyBinder \x0a\x09\x09setupEvents;\x0a\x09\x09setupHelper",
+messageSends: ["registerServices", "setupEvents", "keyBinder", "setupHelper"],
+referencedClasses: []
+}),
+smalltalk.HLManager);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "show:",
@@ -3979,32 +4022,35 @@ smalltalk.HLManager.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "initialize",
-protocol: 'initialization',
+selector: "new",
+protocol: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._appendToJQuery_("body"._asJQuery());
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager.klass)})},
+self._shouldNotImplement();
+return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
 args: [],
-source: "initialize\x0a\x09self current appendToJQuery: 'body' asJQuery",
-messageSends: ["appendToJQuery:", "current", "asJQuery"],
+source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
+messageSends: ["shouldNotImplement"],
 referencedClasses: []
 }),
 smalltalk.HLManager.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "new",
-protocol: 'instance creation',
+selector: "setup",
+protocol: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._shouldNotImplement();
-return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.HLManager.klass)})},
+var $1,$2;
+$1=self._current();
+_st($1)._setup();
+$2=_st($1)._appendToJQuery_("body"._asJQuery());
+return self}, function($ctx1) {$ctx1.fill(self,"setup",{},smalltalk.HLManager.klass)})},
 args: [],
-source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
-messageSends: ["shouldNotImplement"],
+source: "setup\x0a\x09self current \x0a\x09\x09setup;\x0a\x09\x09appendToJQuery: 'body' asJQuery",
+messageSends: ["setup", "current", "appendToJQuery:", "asJQuery"],
 referencedClasses: []
 }),
 smalltalk.HLManager.klass);

+ 2 - 20
js/Helios-Debugger.js

@@ -1,4 +1,4 @@
-define("amber_core/Helios-Debugger", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Helios-Core", "amber_core/Helios-Workspace", "amber_core/Kernel-Exceptions"], function(smalltalk,nil,_st){
+define("amber_core/Helios-Debugger", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Helios-Core", "amber_core/Helios-Workspace"], function(smalltalk,nil,_st){
 smalltalk.addPackage('Helios-Debugger');
 smalltalk.packages["Helios-Debugger"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
@@ -875,7 +875,7 @@ referencedClasses: []
 smalltalk.HLDebuggerModel.klass);
 
 
-smalltalk.addClass('HLErrorHandler', smalltalk.ErrorHandler, [], 'Helios-Debugger');
+smalltalk.addClass('HLErrorHandler', smalltalk.Object, [], 'Helios-Debugger');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "handleError:",
@@ -923,24 +923,6 @@ referencedClasses: ["HLProgressWidget"]
 smalltalk.HLErrorHandler);
 
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "handleError:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._new())._handleError_(anError);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler.klass)})},
-args: ["anError"],
-source: "handleError: anError\x0a\x09^ self new handleError: anError",
-messageSends: ["handleError:", "new"],
-referencedClasses: []
-}),
-smalltalk.HLErrorHandler.klass);
-
 
 smalltalk.addClass('HLStackListWidget', smalltalk.HLToolListWidget, [], 'Helios-Debugger');
 smalltalk.addMethod(

+ 21 - 6
js/Helios-KeyBindings.js

@@ -1369,16 +1369,12 @@ fn: function (){
 var self=this;
 function $HLKeyBinderHelperWidget(){return smalltalk.HLKeyBinderHelperWidget||(typeof HLKeyBinderHelperWidget=="undefined"?nil:HLKeyBinderHelperWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
 smalltalk.HLKeyBinder.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@helper"]=_st($HLKeyBinderHelperWidget())._on_(self);
-$1=self["@helper"];
-_st($1)._renderStart();
-$2=_st($1)._renderCog();
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLKeyBinder)})},
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09helper := HLKeyBinderHelperWidget on: self.\x0a\x09helper \x09\x0a\x09\x09renderStart;\x0a\x09\x09renderCog",
-messageSends: ["initialize", "on:", "renderStart", "renderCog"],
+source: "initialize\x0a\x09super initialize.\x0a\x09helper := HLKeyBinderHelperWidget on: self",
+messageSends: ["initialize", "on:"],
 referencedClasses: ["HLKeyBinderHelperWidget"]
 }),
 smalltalk.HLKeyBinder);
@@ -1465,6 +1461,25 @@ referencedClasses: []
 }),
 smalltalk.HLKeyBinder);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "setupHelper",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=self["@helper"];
+_st($1)._renderStart();
+$2=_st($1)._renderCog();
+return self}, function($ctx1) {$ctx1.fill(self,"setupHelper",{},smalltalk.HLKeyBinder)})},
+args: [],
+source: "setupHelper\x0a\x09helper \x09\x0a\x09\x09renderStart;\x0a\x09\x09renderCog",
+messageSends: ["renderStart", "renderCog"],
+referencedClasses: []
+}),
+smalltalk.HLKeyBinder);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "systemIsMac",

+ 12 - 10
js/Helios-Transcript.js

@@ -126,7 +126,7 @@ smalltalk.HLTranscriptHandler.klass.iVarNames = ['transcripts'];
 smalltalk.addMethod(
 smalltalk.method({
 selector: "clear",
-protocol: 'registration',
+protocol: 'printing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
@@ -144,18 +144,20 @@ smalltalk.HLTranscriptHandler.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "initialize",
-protocol: 'initialization',
+selector: "cr",
+protocol: 'printing',
 fn: function (){
 var self=this;
-function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 return smalltalk.withContext(function($ctx1) { 
-_st($Transcript())._register_(self);
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLTranscriptHandler.klass)})},
+_st(self._transcripts())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._cr();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.HLTranscriptHandler.klass)})},
 args: [],
-source: "initialize\x0a\x09Transcript register: self",
-messageSends: ["register:"],
-referencedClasses: ["Transcript"]
+source: "cr\x0a\x09self transcripts do: [ :each | each cr ]",
+messageSends: ["do:", "transcripts", "cr"],
+referencedClasses: []
 }),
 smalltalk.HLTranscriptHandler.klass);
 
@@ -178,7 +180,7 @@ smalltalk.HLTranscriptHandler.klass);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "show:",
-protocol: 'registration',
+protocol: 'printing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 

+ 265 - 271
js/IDE.js

@@ -1,4 +1,4 @@
-define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Canvas", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
+define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Canvas", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
 smalltalk.addPackage('IDE');
 smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
@@ -444,7 +444,7 @@ referencedClasses: []
 smalltalk.ClassesListNode.klass);
 
 
-smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
+smalltalk.addClass('DebugErrorHandler', smalltalk.Object, [], 'IDE');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "handleError:",
@@ -484,17 +484,11 @@ fn: function (){
 var self=this;
 function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($ErrorHandler())._current();
-if(($receiver = $1) == nil || $receiver == null){
-self._register();
-} else {
-$1;
-};
+_st($ErrorHandler())._register_(self._new());
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.DebugErrorHandler.klass)})},
 args: [],
-source: "initialize\x0a\x09ErrorHandler current ifNil: [ self register ]",
-messageSends: ["ifNil:", "current", "register"],
+source: "initialize\x0a\x09ErrorHandler register: self new",
+messageSends: ["register:", "new"],
 referencedClasses: ["ErrorHandler"]
 }),
 smalltalk.DebugErrorHandler.klass);
@@ -1110,15 +1104,15 @@ selector: "initialize",
 protocol: 'initialization',
 fn: function (){
 var self=this;
-function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
 function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
+function $IDEInspector(){return smalltalk.IDEInspector||(typeof IDEInspector=="undefined"?nil:IDEInspector)}
 function $IDETranscript(){return smalltalk.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
 function $Workspace(){return smalltalk.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
 function $TestRunner(){return smalltalk.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3,$4,$5,$6,$7;
 smalltalk.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
-_st($InspectorHandler())._register_($Inspector());
+_st($Inspector())._register_($IDEInspector());
 self["@opened"]=true;
 $1=(function(html){
 return smalltalk.withContext(function($ctx2) {
@@ -1153,9 +1147,9 @@ return self._updatePosition();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TabManager)})},
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09InspectorHandler register: Inspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
+source: "initialize\x0a\x09super initialize.\x0a\x09Inspector register: IDEInspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
 messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
-referencedClasses: ["InspectorHandler", "Inspector", "IDETranscript", "Workspace", "TestRunner"]
+referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"]
 }),
 smalltalk.TabManager);
 
@@ -4662,227 +4656,7 @@ smalltalk.Debugger);
 
 
 
-smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
-smalltalk.addMethod(
-smalltalk.method({
-selector: "clear",
-protocol: 'actions',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(_st(self["@textarea"])._asJQuery())._val_("");
-return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.IDETranscript)})},
-args: [],
-source: "clear\x0a\x09textarea asJQuery val: ''",
-messageSends: ["val:", "asJQuery"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "cr",
-protocol: 'actions',
-fn: function (){
-var self=this;
-function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self["@textarea"])._asJQuery();
-$ctx1.sendIdx["asJQuery"]=1;
-_st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
-return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.IDETranscript)})},
-args: [],
-source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
-messageSends: ["val:", "asJQuery", ",", "val", "cr"],
-referencedClasses: ["String"]
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "label",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-return "Transcript";
-},
-args: [],
-source: "label\x0a\x09^ 'Transcript'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "open",
-protocol: 'actions',
-fn: function (){
-var self=this;
-function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($TabManager())._current();
-_st($1)._open();
-$2=_st($1)._selectTab_(self);
-return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript)})},
-args: [],
-source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
-messageSends: ["open", "current", "selectTab:"],
-referencedClasses: ["TabManager"]
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "renderBoxOn:",
-protocol: 'rendering',
-fn: function (html){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-self["@textarea"]=_st(html)._textarea();
-$1=self["@textarea"];
-_st($1)._class_("amber_transcript");
-$2=_st($1)._at_put_("spellcheck","false");
-return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDETranscript)})},
-args: ["html"],
-source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
-messageSends: ["textarea", "class:", "at:put:"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "renderButtonsOn:",
-protocol: 'rendering',
-fn: function (html){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(html)._button();
-_st($1)._with_("Clear transcript");
-$2=_st($1)._onClick_((function(){
-return smalltalk.withContext(function($ctx2) {
-return self._clear();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDETranscript)})},
-args: ["html"],
-source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
-messageSends: ["with:", "button", "onClick:", "clear"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "show:",
-protocol: 'actions',
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self["@textarea"];
-if(($receiver = $1) == nil || $receiver == null){
-self._open();
-} else {
-$1;
-};
-$2=_st(self["@textarea"])._asJQuery();
-$ctx1.sendIdx["asJQuery"]=1;
-_st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
-return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.IDETranscript)})},
-args: ["anObject"],
-source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
-messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript);
-
-
-smalltalk.IDETranscript.klass.iVarNames = ['current'];
-smalltalk.addMethod(
-smalltalk.method({
-selector: "current",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@current"];
-if(($receiver = $2) == nil || $receiver == null){
-self["@current"]=smalltalk.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
-$1=self["@current"];
-} else {
-$1=$2;
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.IDETranscript.klass)})},
-args: [],
-source: "current\x0a\x09^ current ifNil: [ current := super new ]",
-messageSends: ["ifNil:", "new"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
-return smalltalk.withContext(function($ctx1) { 
-_st($Transcript())._register_(self._current());
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.IDETranscript.klass)})},
-args: [],
-source: "initialize\x0a\x09Transcript register: self current",
-messageSends: ["register:", "current"],
-referencedClasses: ["Transcript"]
-}),
-smalltalk.IDETranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "new",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._shouldNotImplement();
-return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.IDETranscript.klass)})},
-args: [],
-source: "new\x0a\x09self shouldNotImplement",
-messageSends: ["shouldNotImplement"],
-referencedClasses: []
-}),
-smalltalk.IDETranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "open",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($TabManager())._current();
-$ctx1.sendIdx["current"]=1;
-_st($1)._open();
-$2=_st($1)._selectTab_(self._current());
-return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript.klass)})},
-args: [],
-source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self current",
-messageSends: ["open", "current", "selectTab:"],
-referencedClasses: ["TabManager"]
-}),
-smalltalk.IDETranscript.klass);
-
-
-smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
+smalltalk.addClass('IDEInspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "canBeClosed",
@@ -4896,7 +4670,7 @@ source: "canBeClosed\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4906,13 +4680,13 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
-return self}, function($ctx1) {$ctx1.fill(self,"dive",{},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"dive",{},smalltalk.IDEInspector)})},
 args: [],
 source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
 messageSends: ["inspect", "at:", "variables", "selectedVariable"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4924,13 +4698,13 @@ return smalltalk.withContext(function($ctx1) {
 self["@object"]=anObject;
 self["@variables"]=[];
 _st(self["@object"])._inspectOn_(self);
-return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.IDEInspector)})},
 args: ["anObject"],
 source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
 messageSends: ["inspectOn:"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4947,13 +4721,13 @@ $1="Inspector (nil)";
 $1=$2;
 };
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Inspector)})},
+}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.IDEInspector)})},
 args: [],
 source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4966,13 +4740,13 @@ var $1;
 self._inspect_(self["@object"]);
 self._updateVariablesList();
 $1=self._updateValueTextarea();
-return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.IDEInspector)})},
 args: [],
 source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
 messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -4998,13 +4772,13 @@ self["@sourceArea"]=$4;
 self["@sourceArea"];
 return _st(self["@sourceArea"])._renderOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.IDEInspector)})},
 args: ["html"],
 source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [ self refresh ];\x0a\x09\x09yourself.\x0a\x09\x09\x09sourceArea renderOn: html ]",
 messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
 referencedClasses: ["SourceArea"]
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5016,13 +4790,13 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 self._renderTopPanelOn_(html);
 $1=self._renderBottomPanelOn_(html);
-return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDEInspector)})},
 args: ["html"],
 source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
 messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5061,13 +4835,13 @@ return smalltalk.withContext(function($ctx2) {
 return _st(self._sourceArea())._inspectIt();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 self._updateButtons();
-return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDEInspector)})},
 args: ["html"],
 source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ self sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ self sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ self sourceArea inspectIt ].\x0a\x09self updateButtons",
 messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5129,13 +4903,13 @@ return _st(_st(html)._div())._class_("amber_clear");
 $ctx1.sendIdx["with:"]=1;
 self._updateVariablesList();
 $11=self._updateValueTextarea();
-return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.IDEInspector)})},
 args: ["html"],
 source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'; yourself.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [ self refresh ].\x0a\x09\x09\x09\x09diveButton := html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive';\x0a\x09\x09\x09\x09\x09onClick: [ self dive ]].\x0a\x09\x09\x09html div class: 'amber_clear' ].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
 messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5149,13 +4923,13 @@ self._selectedVariable_(aString);
 self._updateVariablesList();
 self._updateValueTextarea();
 $1=self._updateButtons();
-return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.IDEInspector)})},
 args: ["aString"],
 source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
 messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5172,7 +4946,7 @@ source: "selectedVariable\x0a\x09^ selectedVariable",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5187,7 +4961,7 @@ source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5202,7 +4976,7 @@ source: "setLabel: aString\x0a\x09label := aString",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5217,7 +4991,7 @@ source: "setVariables: aCollection\x0a\x09variables := aCollection",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5234,7 +5008,7 @@ source: "sourceArea\x0a\x09^ sourceArea",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5257,13 +5031,13 @@ _st(self["@diveButton"])._removeAt_("disabled");
 } else {
 _st(self["@diveButton"])._at_put_("disabled",true);
 };
-return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.IDEInspector)})},
 args: [],
 source: "updateButtons\x0a\x09(self selectedVariable notNil and: [ (self variables at: self selectedVariable) notNil ])\x0a\x09\x09ifFalse: [ diveButton at: 'disabled' put: true ]\x0a\x09\x09ifTrue: [ diveButton removeAt: 'disabled' ]",
 messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5283,13 +5057,13 @@ $2="";
 $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
 };
 _st($1)._val_($2);
-return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.IDEInspector)})},
 args: [],
 source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
 messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5319,13 +5093,13 @@ return _st(li)._class_("selected");
 };
 }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Inspector)})},
+return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.IDEInspector)})},
 args: [],
 source: "updateVariablesList\x0a\x09variablesList contents: [ :html |\x0a\x09\x09self variables keysDo: [ :each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [ self selectVariable: each ].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected' ]] ]",
 messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5342,7 +5116,7 @@ source: "variables\x0a\x09^ variables",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.Inspector);
+smalltalk.IDEInspector);
 
 
 smalltalk.addMethod(
@@ -5359,13 +5133,13 @@ _st($2)._open();
 $3=_st($2)._yourself();
 $1=$3;
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.IDEInspector.klass)})},
 args: ["anObject"],
 source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
 messageSends: ["inspect:", "new", "open", "yourself"],
 referencedClasses: []
 }),
-smalltalk.Inspector.klass);
+smalltalk.IDEInspector.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -5380,13 +5154,233 @@ _st($2)._inspect_(anObject);
 $3=_st($2)._yourself();
 $1=$3;
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Inspector.klass)})},
+}, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.IDEInspector.klass)})},
 args: ["anObject"],
 source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
 messageSends: ["inspect:", "new", "yourself"],
 referencedClasses: []
 }),
-smalltalk.Inspector.klass);
+smalltalk.IDEInspector.klass);
+
+
+smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clear",
+protocol: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self["@textarea"])._asJQuery())._val_("");
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.IDETranscript)})},
+args: [],
+source: "clear\x0a\x09textarea asJQuery val: ''",
+messageSends: ["val:", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "cr",
+protocol: 'actions',
+fn: function (){
+var self=this;
+function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self["@textarea"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
+return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.IDETranscript)})},
+args: [],
+source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
+messageSends: ["val:", "asJQuery", ",", "val", "cr"],
+referencedClasses: ["String"]
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "label",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+return "Transcript";
+},
+args: [],
+source: "label\x0a\x09^ 'Transcript'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "open",
+protocol: 'actions',
+fn: function (){
+var self=this;
+function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($TabManager())._current();
+_st($1)._open();
+$2=_st($1)._selectTab_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript)})},
+args: [],
+source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
+messageSends: ["open", "current", "selectTab:"],
+referencedClasses: ["TabManager"]
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderBoxOn:",
+protocol: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+self["@textarea"]=_st(html)._textarea();
+$1=self["@textarea"];
+_st($1)._class_("amber_transcript");
+$2=_st($1)._at_put_("spellcheck","false");
+return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDETranscript)})},
+args: ["html"],
+source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
+messageSends: ["textarea", "class:", "at:put:"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderButtonsOn:",
+protocol: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(html)._button();
+_st($1)._with_("Clear transcript");
+$2=_st($1)._onClick_((function(){
+return smalltalk.withContext(function($ctx2) {
+return self._clear();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDETranscript)})},
+args: ["html"],
+source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
+messageSends: ["with:", "button", "onClick:", "clear"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show:",
+protocol: 'actions',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=self["@textarea"];
+if(($receiver = $1) == nil || $receiver == null){
+self._open();
+} else {
+$1;
+};
+$2=_st(self["@textarea"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.IDETranscript)})},
+args: ["anObject"],
+source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
+messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript);
+
+
+smalltalk.IDETranscript.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
+self["@current"]=smalltalk.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
+$1=self["@current"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.IDETranscript.klass)})},
+args: [],
+source: "current\x0a\x09^ current ifNil: [ current := super new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+return smalltalk.withContext(function($ctx1) { 
+_st($Transcript())._register_(self._current());
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.IDETranscript.klass)})},
+args: [],
+source: "initialize\x0a\x09Transcript register: self current",
+messageSends: ["register:", "current"],
+referencedClasses: ["Transcript"]
+}),
+smalltalk.IDETranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "new",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._shouldNotImplement();
+return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.IDETranscript.klass)})},
+args: [],
+source: "new\x0a\x09self shouldNotImplement",
+messageSends: ["shouldNotImplement"],
+referencedClasses: []
+}),
+smalltalk.IDETranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "open",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st($TabManager())._current();
+$ctx1.sendIdx["current"]=1;
+_st($1)._open();
+$2=_st($1)._selectTab_(self._current());
+return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript.klass)})},
+args: [],
+source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
+messageSends: ["open", "current", "selectTab:"],
+referencedClasses: ["TabManager"]
+}),
+smalltalk.IDETranscript.klass);
 
 
 smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');

+ 0 - 161
js/Kernel-Exceptions.js

@@ -428,165 +428,4 @@ referencedClasses: []
 smalltalk.NonBooleanReceiver);
 
 
-
-smalltalk.addClass('ErrorHandler', smalltalk.Object, [], 'Kernel-Exceptions');
-smalltalk.ErrorHandler.comment="I am used to manage Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aSubclasses can register themselves as the current handler with\x0a`ErrorHandler class >> register`.\x0a\x0aSubclasses may override `#handleError:` to perform an action on the thrown exception.\x0aThe default behavior is to log the error and the context stack to the JavaScript console.";
-smalltalk.addMethod(
-smalltalk.method({
-selector: "handleError:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(anError)._context();
-$ctx1.sendIdx["context"]=1;
-if(($receiver = $1) == nil || $receiver == null){
-$1;
-} else {
-self._logErrorContext_(_st(anError)._context());
-};
-self._logError_(anError);
-return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.ErrorHandler)})},
-args: ["anError"],
-source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
-messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "log:",
-protocol: 'private',
-fn: function (aString){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(console)._log_(aString);
-return self}, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString},smalltalk.ErrorHandler)})},
-args: ["aString"],
-source: "log: aString\x0a\x09console log: aString",
-messageSends: ["log:"],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "logContext:",
-protocol: 'private',
-fn: function (aContext){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(aContext)._home();
-$ctx1.sendIdx["home"]=1;
-if(($receiver = $1) == nil || $receiver == null){
-$1;
-} else {
-self._logContext_(_st(aContext)._home());
-};
-self._log_(_st(aContext)._asString());
-return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},smalltalk.ErrorHandler)})},
-args: ["aContext"],
-source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
-messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "logError:",
-protocol: 'private',
-fn: function (anError){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._log_(_st(anError)._messageText());
-return self}, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError},smalltalk.ErrorHandler)})},
-args: ["anError"],
-source: "logError: anError\x0a\x09self log: anError messageText",
-messageSends: ["log:", "messageText"],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "logErrorContext:",
-protocol: 'private',
-fn: function (aContext){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = aContext) == nil || $receiver == null){
-aContext;
-} else {
-$1=_st(aContext)._home();
-$ctx1.sendIdx["home"]=1;
-if(($receiver = $1) == nil || $receiver == null){
-$1;
-} else {
-self._logContext_(_st(aContext)._home());
-};
-};
-return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},smalltalk.ErrorHandler)})},
-args: ["aContext"],
-source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
-messageSends: ["ifNotNil:", "home", "logContext:"],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler);
-
-
-smalltalk.ErrorHandler.klass.iVarNames = ['current'];
-smalltalk.addMethod(
-smalltalk.method({
-selector: "current",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-var $1;
-$1=self["@current"];
-return $1;
-},
-args: [],
-source: "current\x0a\x09^ current",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "register",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
-return smalltalk.withContext(function($ctx1) { 
-_st($ErrorHandler())._setCurrent_(self._new());
-return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ErrorHandler.klass)})},
-args: [],
-source: "register\x0a\x09ErrorHandler setCurrent: self new",
-messageSends: ["setCurrent:", "new"],
-referencedClasses: ["ErrorHandler"]
-}),
-smalltalk.ErrorHandler.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "setCurrent:",
-protocol: 'accessing',
-fn: function (anHandler){
-var self=this;
-self["@current"]=anHandler;
-return self},
-args: ["anHandler"],
-source: "setCurrent: anHandler\x0a\x09current := anHandler",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.ErrorHandler.klass);
-
 });

+ 359 - 109
js/Kernel-Infrastructure.js

@@ -2,67 +2,133 @@ define("amber_core/Kernel-Infrastructure", ["amber_vm/smalltalk", "amber_vm/nil"
 smalltalk.addPackage('Kernel-Infrastructure');
 smalltalk.packages["Kernel-Infrastructure"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
-smalltalk.InspectorHandler.comment="I am responsible for inspecting object.\x0a\x0aMy class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.\x0a\x0aThe default inspector object is the transcript.";
-
-smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
+smalltalk.addClass('ConsoleErrorHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.ConsoleErrorHandler.comment="I am manage Smalltalk errors, displaying the stack in the console.";
 smalltalk.addMethod(
 smalltalk.method({
-selector: "inspect:",
-protocol: 'registration',
-fn: function (anObject){
+selector: "handleError:",
+protocol: 'error handling',
+fn: function (anError){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-$1=_st(self._inspector())._inspect_(anObject);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
-args: ["anObject"],
-source: "inspect: anObject\x0a\x09^ self inspector inspect: anObject",
-messageSends: ["inspect:", "inspector"],
+$1=_st(anError)._context();
+$ctx1.sendIdx["context"]=1;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
+} else {
+self._logErrorContext_(_st(anError)._context());
+};
+self._logError_(anError);
+return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.ConsoleErrorHandler)})},
+args: ["anError"],
+source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
+messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
 referencedClasses: []
 }),
-smalltalk.InspectorHandler.klass);
+smalltalk.ConsoleErrorHandler);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "inspector",
-protocol: 'accessing',
-fn: function (){
+selector: "log:",
+protocol: 'private',
+fn: function (aString){
 var self=this;
-function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@inspector"];
-if(($receiver = $2) == nil || $receiver == null){
-self["@inspector"]=$Transcript();
-$1=self["@inspector"];
+_st(console)._log_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString},smalltalk.ConsoleErrorHandler)})},
+args: ["aString"],
+source: "log: aString\x0a\x09console log: aString",
+messageSends: ["log:"],
+referencedClasses: []
+}),
+smalltalk.ConsoleErrorHandler);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "logContext:",
+protocol: 'private',
+fn: function (aContext){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(aContext)._home();
+$ctx1.sendIdx["home"]=1;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
-$1=$2;
+self._logContext_(_st(aContext)._home());
 };
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
-args: [],
-source: "inspector\x0a\x09^ inspector ifNil: [ inspector := Transcript ]",
-messageSends: ["ifNil:"],
-referencedClasses: ["Transcript"]
+self._log_(_st(aContext)._asString());
+return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},smalltalk.ConsoleErrorHandler)})},
+args: ["aContext"],
+source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
+messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"],
+referencedClasses: []
 }),
-smalltalk.InspectorHandler.klass);
+smalltalk.ConsoleErrorHandler);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "register:",
-protocol: 'registration',
-fn: function (anInspector){
+selector: "logError:",
+protocol: 'private',
+fn: function (anError){
 var self=this;
-self["@inspector"]=anInspector;
-return self},
-args: ["anInspector"],
-source: "register: anInspector\x0a\x09inspector := anInspector",
-messageSends: [],
+return smalltalk.withContext(function($ctx1) { 
+self._log_(_st(anError)._messageText());
+return self}, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError},smalltalk.ConsoleErrorHandler)})},
+args: ["anError"],
+source: "logError: anError\x0a\x09self log: anError messageText",
+messageSends: ["log:", "messageText"],
 referencedClasses: []
 }),
-smalltalk.InspectorHandler.klass);
+smalltalk.ConsoleErrorHandler);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "logErrorContext:",
+protocol: 'private',
+fn: function (aContext){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+if(($receiver = aContext) == nil || $receiver == null){
+aContext;
+} else {
+$1=_st(aContext)._home();
+$ctx1.sendIdx["home"]=1;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
+} else {
+self._logContext_(_st(aContext)._home());
+};
+};
+return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},smalltalk.ConsoleErrorHandler)})},
+args: ["aContext"],
+source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
+messageSends: ["ifNotNil:", "home", "logContext:"],
+referencedClasses: []
+}),
+smalltalk.ConsoleErrorHandler);
+
+
+smalltalk.ConsoleErrorHandler.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ErrorHandler())._registerIfNone_(self._new());
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ConsoleErrorHandler.klass)})},
+args: [],
+source: "initialize\x0a\x09ErrorHandler registerIfNone: self new",
+messageSends: ["registerIfNone:", "new"],
+referencedClasses: ["ErrorHandler"]
+}),
+smalltalk.ConsoleErrorHandler.klass);
 
 
 smalltalk.addClass('InterfacingObject', smalltalk.Object, [], 'Kernel-Infrastructure');
@@ -508,14 +574,14 @@ selector: "inspect:",
 protocol: 'actions',
 fn: function (anObject){
 var self=this;
-function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
 return smalltalk.withContext(function($ctx1) { 
-_st(_st($InspectorHandler())._inspector())._inspect_(anObject);
+_st($Inspector())._inspect_(anObject);
 return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Environment)})},
 args: ["anObject"],
-source: "inspect: anObject\x0a\x09InspectorHandler inspector inspect: anObject",
-messageSends: ["inspect:", "inspector"],
-referencedClasses: ["InspectorHandler"]
+source: "inspect: anObject\x0a\x09Inspector inspect: anObject",
+messageSends: ["inspect:"],
+referencedClasses: ["Inspector"]
 }),
 smalltalk.Environment);
 
@@ -614,16 +680,16 @@ smalltalk.Environment);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "registerErrorHandler:",
-protocol: 'actions',
+protocol: 'services',
 fn: function (anErrorHandler){
 var self=this;
 function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
 return smalltalk.withContext(function($ctx1) { 
-_st($ErrorHandler())._setCurrent_(anErrorHandler);
+_st($ErrorHandler())._register_(anErrorHandler);
 return self}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},smalltalk.Environment)})},
 args: ["anErrorHandler"],
-source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler setCurrent: anErrorHandler",
-messageSends: ["setCurrent:"],
+source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler register: anErrorHandler",
+messageSends: ["register:"],
 referencedClasses: ["ErrorHandler"]
 }),
 smalltalk.Environment);
@@ -631,37 +697,54 @@ smalltalk.Environment);
 smalltalk.addMethod(
 smalltalk.method({
 selector: "registerInspector:",
-protocol: 'actions',
+protocol: 'services',
 fn: function (anInspector){
 var self=this;
-function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
 return smalltalk.withContext(function($ctx1) { 
-_st($InspectorHandler())._register_(anInspector);
+_st($Inspector())._register_(anInspector);
 return self}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},smalltalk.Environment)})},
 args: ["anInspector"],
-source: "registerInspector: anInspector\x0a\x09InspectorHandler register: anInspector",
+source: "registerInspector: anInspector\x0a\x09Inspector register: anInspector",
 messageSends: ["register:"],
-referencedClasses: ["InspectorHandler"]
+referencedClasses: ["Inspector"]
 }),
 smalltalk.Environment);
 
 smalltalk.addMethod(
 smalltalk.method({
 selector: "registerProgressHandler:",
-protocol: 'actions',
+protocol: 'services',
 fn: function (aProgressHandler){
 var self=this;
 function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
 return smalltalk.withContext(function($ctx1) { 
-_st($ProgressHandler())._setCurrent_(aProgressHandler);
+_st($ProgressHandler())._register_(aProgressHandler);
 return self}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},smalltalk.Environment)})},
 args: ["aProgressHandler"],
-source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler setCurrent: aProgressHandler",
-messageSends: ["setCurrent:"],
+source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler register: aProgressHandler",
+messageSends: ["register:"],
 referencedClasses: ["ProgressHandler"]
 }),
 smalltalk.Environment);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerTranscript:",
+protocol: 'services',
+fn: function (aTranscript){
+var self=this;
+function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+return smalltalk.withContext(function($ctx1) { 
+_st($Transcript())._register_(aTranscript);
+return self}, function($ctx1) {$ctx1.fill(self,"registerTranscript:",{aTranscript:aTranscript},smalltalk.Environment)})},
+args: ["aTranscript"],
+source: "registerTranscript: aTranscript\x0a\x09Transcript register: aTranscript",
+messageSends: ["register:"],
+referencedClasses: ["Transcript"]
+}),
+smalltalk.Environment);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "removeClass:",
@@ -1148,6 +1231,44 @@ referencedClasses: []
 smalltalk.JSObjectProxy.klass);
 
 
+smalltalk.addClass('NullProgressHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.NullProgressHandler.comment="I am the default progress handler. I do not display any progress, and simply iterate over the collection.";
+smalltalk.addMethod(
+smalltalk.method({
+selector: "do:on:displaying:",
+protocol: 'progress handling',
+fn: function (aBlock,aCollection,aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(aCollection)._do_(aBlock);
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.NullProgressHandler)})},
+args: ["aBlock", "aCollection", "aString"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
+messageSends: ["do:"],
+referencedClasses: []
+}),
+smalltalk.NullProgressHandler);
+
+
+smalltalk.NullProgressHandler.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($ProgressHandler())._registerIfNone_(self._new());
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.NullProgressHandler.klass)})},
+args: [],
+source: "initialize\x0a\x09ProgressHandler registerIfNone: self new",
+messageSends: ["registerIfNone:", "new"],
+referencedClasses: ["ProgressHandler"]
+}),
+smalltalk.NullProgressHandler.klass);
+
+
 smalltalk.addClass('Organizer', smalltalk.Object, [], 'Kernel-Infrastructure');
 smalltalk.Organizer.comment="I represent categorization information. \x0a\x0a## API\x0a\x0aUse `#addElement:` and `#removeElement:` to manipulate instances.";
 smalltalk.addMethod(
@@ -1896,8 +2017,126 @@ referencedClasses: []
 smalltalk.PlatformInterface.klass);
 
 
-smalltalk.addClass('ProgressHandler', smalltalk.Object, [], 'Kernel-Infrastructure');
-smalltalk.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aSubclasses of can register themselves as the current handler with\x0a`ProgressHandler class >> register`.\x0a\x0aThe default behavior is to simply iterate over the collection.";
+smalltalk.addClass('Service', smalltalk.Object, [], 'Kernel-Infrastructure');
+smalltalk.Service.comment="I implement the basic behavior for class registration to a service.\x0a\x0aSee the `Transcript` class for a concrete service.\x0a\x0a## API\x0a\x0aUse class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.";
+
+smalltalk.Service.klass.iVarNames = ['current'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "current",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=self["@current"];
+return $1;
+},
+args: [],
+source: "current\x0a\x09^ current",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Service.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "new",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._shouldNotImplement();
+return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.Service.klass)})},
+args: [],
+source: "new\x0a\x09self shouldNotImplement",
+messageSends: ["shouldNotImplement"],
+referencedClasses: []
+}),
+smalltalk.Service.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+protocol: 'registration',
+fn: function (anObject){
+var self=this;
+self["@current"]=anObject;
+return self},
+args: ["anObject"],
+source: "register: anObject\x0a\x09current := anObject",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Service.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "registerIfNone:",
+protocol: 'registration',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=self._current();
+if(($receiver = $1) == nil || $receiver == null){
+self._register_(anObject);
+} else {
+$1;
+};
+return self}, function($ctx1) {$ctx1.fill(self,"registerIfNone:",{anObject:anObject},smalltalk.Service.klass)})},
+args: ["anObject"],
+source: "registerIfNone: anObject\x0a\x09self current ifNil: [ self register: anObject ]",
+messageSends: ["ifNil:", "current", "register:"],
+referencedClasses: []
+}),
+smalltalk.Service.klass);
+
+
+smalltalk.addClass('ErrorHandler', smalltalk.Service, [], 'Kernel-Infrastructure');
+smalltalk.ErrorHandler.comment="I am the service used to handle Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aRegistered service instances must implement `#handleError:` to perform an action on the thrown exception.";
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "handleError:",
+protocol: 'error handling',
+fn: function (anError){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._current())._handleError_(anError);
+return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.ErrorHandler.klass)})},
+args: ["anError"],
+source: "handleError: anError\x0a\x09self current handleError: anError",
+messageSends: ["handleError:", "current"],
+referencedClasses: []
+}),
+smalltalk.ErrorHandler.klass);
+
+
+smalltalk.addClass('Inspector', smalltalk.Service, [], 'Kernel-Infrastructure');
+smalltalk.Inspector.comment="I am the service responsible for inspecting objects.\x0a\x0aThe default inspector object is the transcript.";
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+protocol: 'inspecting',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(self._current())._inspect_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09^ self current inspect: anObject",
+messageSends: ["inspect:", "current"],
+referencedClasses: []
+}),
+smalltalk.Inspector.klass);
+
+
+smalltalk.addClass('ProgressHandler', smalltalk.Service, [], 'Kernel-Infrastructure');
+smalltalk.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aRegistered instances must implement `#do:on:displaying:`.\x0a\x0aThe default behavior is to simply iterate over the collection, using `NullProgressHandler`.";
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "do:on:displaying:",
@@ -1905,88 +2144,99 @@ protocol: 'progress handling',
 fn: function (aBlock,aCollection,aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(aCollection)._do_(aBlock);
-return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler)})},
+_st(self._current())._do_on_displaying_(aBlock,aCollection,aString);
+return self}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},smalltalk.ProgressHandler.klass)})},
 args: ["aBlock", "aCollection", "aString"],
-source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
-messageSends: ["do:"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09self current do: aBlock on: aCollection displaying: aString",
+messageSends: ["do:on:displaying:", "current"],
 referencedClasses: []
 }),
-smalltalk.ProgressHandler);
+smalltalk.ProgressHandler.klass);
+
 
+smalltalk.addClass('Transcript', smalltalk.Service, [], 'Kernel-Infrastructure');
+smalltalk.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.";
 
-smalltalk.ProgressHandler.klass.iVarNames = ['current'];
 smalltalk.addMethod(
 smalltalk.method({
-selector: "current",
-protocol: 'accessing',
+selector: "clear",
+protocol: 'printing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self["@current"];
-if(($receiver = $2) == nil || $receiver == null){
-self["@current"]=self._new();
-$1=self["@current"];
-} else {
-$1=$2;
-};
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
+_st(self._current())._clear();
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.Transcript.klass)})},
 args: [],
-source: "current\x0a\x09^ current ifNil: [ current := self new ]",
-messageSends: ["ifNil:", "new"],
+source: "clear\x0a\x09self current clear",
+messageSends: ["clear", "current"],
 referencedClasses: []
 }),
-smalltalk.ProgressHandler.klass);
+smalltalk.Transcript.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "initialize",
-protocol: 'initialization',
+selector: "cr",
+protocol: 'printing',
 fn: function (){
 var self=this;
+function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-self._register();
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ProgressHandler.klass)})},
+_st(self._current())._show_(_st($String())._cr());
+return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.Transcript.klass)})},
 args: [],
-source: "initialize\x0a\x09self register",
-messageSends: ["register"],
+source: "cr\x0a\x09self current show: String cr",
+messageSends: ["show:", "current", "cr"],
+referencedClasses: ["String"]
+}),
+smalltalk.Transcript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+protocol: 'printing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self._show_(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Transcript.klass)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09self show: anObject",
+messageSends: ["show:"],
 referencedClasses: []
 }),
-smalltalk.ProgressHandler.klass);
+smalltalk.Transcript.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "register",
-protocol: 'initialization',
+selector: "open",
+protocol: 'instance creation',
 fn: function (){
 var self=this;
-function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
 return smalltalk.withContext(function($ctx1) { 
-_st($ProgressHandler())._setCurrent_(self._new());
-return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.ProgressHandler.klass)})},
+_st(self._current())._open();
+return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Transcript.klass)})},
 args: [],
-source: "register\x0a\x09ProgressHandler setCurrent: self new",
-messageSends: ["setCurrent:", "new"],
-referencedClasses: ["ProgressHandler"]
+source: "open\x0a\x09self current open",
+messageSends: ["open", "current"],
+referencedClasses: []
 }),
-smalltalk.ProgressHandler.klass);
+smalltalk.Transcript.klass);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "setCurrent:",
-protocol: 'accessing',
-fn: function (anHandler){
+selector: "show:",
+protocol: 'printing',
+fn: function (anObject){
 var self=this;
-self["@current"]=anHandler;
-return self},
-args: ["anHandler"],
-source: "setCurrent: anHandler\x0a\x09current := anHandler",
-messageSends: [],
+return smalltalk.withContext(function($ctx1) { 
+_st(self._current())._show_(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.Transcript.klass)})},
+args: ["anObject"],
+source: "show: anObject\x0a\x09self current show: anObject",
+messageSends: ["show:", "current"],
 referencedClasses: []
 }),
-smalltalk.ProgressHandler.klass);
+smalltalk.Transcript.klass);
 
 
 smalltalk.addClass('SmalltalkImage', smalltalk.Object, [], 'Kernel-Infrastructure');
@@ -2705,11 +2955,11 @@ fn: function (aBlock,aString){
 var self=this;
 function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
 return smalltalk.withContext(function($ctx1) { 
-_st(_st($ProgressHandler())._current())._do_on_displaying_(aBlock,self,aString);
+_st($ProgressHandler())._do_on_displaying_(aBlock,self,aString);
 return self}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},smalltalk.SequenceableCollection)})},
 args: ["aBlock", "aString"],
-source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler current\x0a\x09\x09do: aBlock on: self displaying: aString",
-messageSends: ["do:on:displaying:", "current"],
+source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler \x0a\x09\x09do: aBlock \x0a\x09\x09on: self \x0a\x09\x09displaying: aString",
+messageSends: ["do:on:displaying:"],
 referencedClasses: ["ProgressHandler"]
 }),
 smalltalk.SequenceableCollection);

+ 4 - 4
js/Kernel-Objects.js

@@ -137,14 +137,14 @@ selector: "inspect",
 protocol: 'inspecting',
 fn: function (){
 var self=this;
-function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
 return smalltalk.withContext(function($ctx1) { 
-_st($InspectorHandler())._inspect_(self);
+_st($Inspector())._inspect_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.ProtoObject)})},
 args: [],
-source: "inspect\x0a\x09InspectorHandler inspect: self",
+source: "inspect\x0a\x09Inspector inspect: self",
 messageSends: ["inspect:"],
-referencedClasses: ["InspectorHandler"]
+referencedClasses: ["Inspector"]
 }),
 smalltalk.ProtoObject);
 

+ 3 - 137
js/Kernel-Transcript.js

@@ -70,147 +70,13 @@ fn: function (){
 var self=this;
 function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 return smalltalk.withContext(function($ctx1) { 
-_st($Transcript())._register_(self._new());
+_st($Transcript())._registerIfNone_(self._new());
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ConsoleTranscript.klass)})},
 args: [],
-source: "initialize\x0a\x09Transcript register: self new",
-messageSends: ["register:", "new"],
+source: "initialize\x0a\x09Transcript registerIfNone: self new",
+messageSends: ["registerIfNone:", "new"],
 referencedClasses: ["Transcript"]
 }),
 smalltalk.ConsoleTranscript.klass);
 
-
-smalltalk.addClass('Transcript', smalltalk.Object, [], 'Kernel-Transcript');
-smalltalk.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.";
-
-smalltalk.Transcript.klass.iVarNames = ['current'];
-smalltalk.addMethod(
-smalltalk.method({
-selector: "clear",
-protocol: 'printing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._clear();
-return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.Transcript.klass)})},
-args: [],
-source: "clear\x0a\x09self current clear",
-messageSends: ["clear", "current"],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "cr",
-protocol: 'printing',
-fn: function (){
-var self=this;
-function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
-return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._show_(_st($String())._cr());
-return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.Transcript.klass)})},
-args: [],
-source: "cr\x0a\x09self current show: String cr",
-messageSends: ["show:", "current", "cr"],
-referencedClasses: ["String"]
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "current",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-var $1;
-$1=self["@current"];
-return $1;
-},
-args: [],
-source: "current\x0a\x09^ current",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "inspect:",
-protocol: 'printing',
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._show_(anObject);
-return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Transcript.klass)})},
-args: ["anObject"],
-source: "inspect: anObject\x0a\x09self show: anObject",
-messageSends: ["show:"],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "new",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-self._shouldNotImplement();
-return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.Transcript.klass)})},
-args: [],
-source: "new\x0a\x09self shouldNotImplement",
-messageSends: ["shouldNotImplement"],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "open",
-protocol: 'instance creation',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._open();
-return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Transcript.klass)})},
-args: [],
-source: "open\x0a\x09self current open",
-messageSends: ["open", "current"],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "register:",
-protocol: 'instance creation',
-fn: function (aTranscript){
-var self=this;
-self["@current"]=aTranscript;
-return self},
-args: ["aTranscript"],
-source: "register: aTranscript\x0a\x09current := aTranscript",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "show:",
-protocol: 'printing',
-fn: function (anObject){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-_st(self._current())._show_(anObject);
-return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.Transcript.klass)})},
-args: ["anObject"],
-source: "show: anObject\x0a\x09self current show: anObject",
-messageSends: ["show:", "current"],
-referencedClasses: []
-}),
-smalltalk.Transcript.klass);
-
 });

+ 0 - 19
st/Compiler-Exceptions.st

@@ -89,22 +89,3 @@ variableName: aString
 	variableName := aString
 ! !
 
-ErrorHandler subclass: #RethrowErrorHandler
-	instanceVariableNames: ''
-	package: 'Compiler-Exceptions'!
-!RethrowErrorHandler commentStamp!
-This class is used in the commandline version of the compiler.
-It uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.
-As a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.!
-
-!RethrowErrorHandler methodsFor: 'error handling'!
-
-basicSignal: anError
-	<throw anError>
-!
-
-handleError: anError
-	super handleError: anError.
-	self basicSignal: anError
-! !
-

+ 41 - 25
st/Helios-Core.st

@@ -404,7 +404,7 @@ on: anEnvironment
         yourself
 ! !
 
-ProgressHandler subclass: #HLProgressHandler
+Object subclass: #HLProgressHandler
 	instanceVariableNames: ''
 	package: 'Helios-Core'!
 !HLProgressHandler commentStamp!
@@ -1175,18 +1175,6 @@ confirm: aString ifTrue: aBlock
 		show
 !
 
-registerErrorHandler: anErrorHandler
-	self environment registerErrorHandler: anErrorHandler
-!
-
-registerInspector: anInspector
-	self environment registerInspector: anInspector
-!
-
-registerProgressHandler: aProgressHandler
-	self environment registerProgressHandler: aProgressHandler
-!
-
 removeActiveTab
 	self removeTab: self activeTab
 !
@@ -1241,16 +1229,21 @@ defaultEnvironment
 
 !HLManager methodsFor: 'initialization'!
 
-initialize
-	super initialize.
-	
-	HLErrorHandler register.
-	HLProgressHandler register.
-	
-	self registerInspector: HLInspector.
-	self registerErrorHandler: ErrorHandler current.
-	self registerProgressHandler: ProgressHandler current.
-    self keyBinder setupEvents
+setup
+	self registerServices.
+    self keyBinder 
+		setupEvents;
+		setupHelper
+! !
+
+!HLManager methodsFor: 'private'!
+
+registerServices
+	self
+		registerInspector;
+		registerErrorHandler;
+		registerProgressHandler;
+		registerTranscript
 ! !
 
 !HLManager methodsFor: 'rendering'!
@@ -1315,6 +1308,27 @@ show: aTab
 	aTab show; focus
 ! !
 
+!HLManager methodsFor: 'services'!
+
+registerErrorHandler
+	self environment registerErrorHandler: HLErrorHandler new.
+	ErrorHandler register: HLErrorHandler new
+!
+
+registerInspector
+	self environment registerInspector: HLInspector.
+	Inspector register: HLInspector
+!
+
+registerProgressHandler
+	self environment registerProgressHandler: HLProgressHandler new.
+	ProgressHandler register: HLProgressHandler new
+!
+
+registerTranscript
+	self environment registerTranscript: HLTranscriptHandler
+! !
+
 HLManager class instanceVariableNames: 'current'!
 
 !HLManager class methodsFor: 'accessing'!
@@ -1325,8 +1339,10 @@ current
 
 !HLManager class methodsFor: 'initialization'!
 
-initialize
-	self current appendToJQuery: 'body' asJQuery
+setup
+	self current 
+		setup;
+		appendToJQuery: 'body' asJQuery
 ! !
 
 !HLManager class methodsFor: 'instance creation'!

+ 1 - 7
st/Helios-Debugger.st

@@ -315,7 +315,7 @@ on: aMethodContext
 		yourself
 ! !
 
-ErrorHandler subclass: #HLErrorHandler
+Object subclass: #HLErrorHandler
 	instanceVariableNames: ''
 	package: 'Helios-Debugger'!
 
@@ -341,12 +341,6 @@ onErrorHandled
 		remove
 ! !
 
-!HLErrorHandler class methodsFor: 'error handling'!
-
-handleError: anError
-	^ self new handleError: anError
-! !
-
 HLToolListWidget subclass: #HLStackListWidget
 	instanceVariableNames: ''
 	package: 'Helios-Debugger'!

+ 4 - 1
st/Helios-KeyBindings.st

@@ -473,7 +473,10 @@ setupEvents
 
 initialize
 	super initialize.
-	helper := HLKeyBinderHelperWidget on: self.
+	helper := HLKeyBinderHelperWidget on: self
+!
+
+setupHelper
 	helper 	
 		renderStart;
 		renderCog

+ 9 - 9
st/Helios-Transcript.st

@@ -71,26 +71,26 @@ transcripts
 	^ transcripts ifNil: [ transcripts := OrderedCollection new ]
 ! !
 
-!HLTranscriptHandler class methodsFor: 'initialization'!
-
-initialize
-	Transcript register: self
-! !
-
-!HLTranscriptHandler class methodsFor: 'registration'!
+!HLTranscriptHandler class methodsFor: 'printing'!
 
 clear
 	self transcripts do: [ :each |
 		each clear ]
 !
 
-register: aTranscript
-	self transcripts add: aTranscript
+cr
+	self transcripts do: [ :each | each cr ]
 !
 
 show: aString
 	self transcripts do: [ :each |
 		each show: aString ]
+! !
+
+!HLTranscriptHandler class methodsFor: 'registration'!
+
+register: aTranscript
+	self transcripts add: aTranscript
 !
 
 unregister: aTranscript

+ 80 - 80
st/IDE.st

@@ -149,7 +149,7 @@ on: aClass browser: aBrowser classes: aCollection level: anInteger
 		yourself
 ! !
 
-ErrorHandler subclass: #DebugErrorHandler
+Object subclass: #DebugErrorHandler
 	instanceVariableNames: ''
 	package: 'IDE'!
 
@@ -165,7 +165,7 @@ handleError: anError
 !DebugErrorHandler class methodsFor: 'initialization'!
 
 initialize
-	ErrorHandler current ifNil: [ self register ]
+	ErrorHandler register: self new
 ! !
 
 Widget subclass: #SourceArea
@@ -454,7 +454,7 @@ removeTab: aWidget
 
 initialize
 	super initialize.
-	InspectorHandler register: Inspector.
+	Inspector register: IDEInspector.
 	opened := true.
 	[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.
 	'body' asJQuery
@@ -1514,81 +1514,11 @@ updateVariablesList
 		ifNotNil: [ inspectButton removeAt: 'disabled' ]
 ! !
 
-TabWidget subclass: #IDETranscript
-	instanceVariableNames: 'textarea'
-	package: 'IDE'!
-
-!IDETranscript methodsFor: 'accessing'!
-
-label
-	^ 'Transcript'
-! !
-
-!IDETranscript methodsFor: 'actions'!
-
-clear
-	textarea asJQuery val: ''
-!
-
-cr
-	textarea asJQuery val: textarea asJQuery val, String cr.
-!
-
-open
-	TabManager current
-	open;
-	selectTab: self
-!
-
-show: anObject
-	textarea ifNil: [ self open ].
-	textarea asJQuery val: textarea asJQuery val, anObject asString.
-! !
-
-!IDETranscript methodsFor: 'rendering'!
-
-renderBoxOn: html
-	textarea := html textarea.
-	textarea
-	class: 'amber_transcript';
-	at: 'spellcheck' put: 'false'
-!
-
-renderButtonsOn: html
-	html button
-	with: 'Clear transcript';
-	onClick: [ self clear ]
-! !
-
-IDETranscript class instanceVariableNames: 'current'!
-
-!IDETranscript class methodsFor: 'initialization'!
-
-initialize
-	Transcript register: self current
-! !
-
-!IDETranscript class methodsFor: 'instance creation'!
-
-current
-	^ current ifNil: [ current := super new ]
-!
-
-new
-	self shouldNotImplement
-!
-
-open
-	TabManager current
-	open;
-	selectTab: self current
-! !
-
-TabWidget subclass: #Inspector
+TabWidget subclass: #IDEInspector
 	instanceVariableNames: 'label variables object selectedVariable variablesList valueTextarea diveButton sourceArea'
 	package: 'IDE'!
 
-!Inspector methodsFor: 'accessing'!
+!IDEInspector methodsFor: 'accessing'!
 
 label
 	^ label ifNil: [ 'Inspector (nil)' ]
@@ -1618,7 +1548,7 @@ variables
 	^ variables
 ! !
 
-!Inspector methodsFor: 'actions'!
+!IDEInspector methodsFor: 'actions'!
 
 dive
 	(self variables at: self selectedVariable) inspect
@@ -1637,7 +1567,7 @@ refresh
 		updateValueTextarea
 ! !
 
-!Inspector methodsFor: 'rendering'!
+!IDEInspector methodsFor: 'rendering'!
 
 renderBottomPanelOn: html
 	html div
@@ -1690,13 +1620,13 @@ renderTopPanelOn: html
 		updateValueTextarea.
 ! !
 
-!Inspector methodsFor: 'testing'!
+!IDEInspector methodsFor: 'testing'!
 
 canBeClosed
 	^ true
 ! !
 
-!Inspector methodsFor: 'updating'!
+!IDEInspector methodsFor: 'updating'!
 
 selectVariable: aString
 	self selectedVariable: aString.
@@ -1729,7 +1659,7 @@ updateVariablesList
 				li class: 'selected' ]] ]
 ! !
 
-!Inspector class methodsFor: 'instance creation'!
+!IDEInspector class methodsFor: 'instance creation'!
 
 inspect: anObject
 	^ self new
@@ -1744,6 +1674,76 @@ on: anObject
 		yourself
 ! !
 
+TabWidget subclass: #IDETranscript
+	instanceVariableNames: 'textarea'
+	package: 'IDE'!
+
+!IDETranscript methodsFor: 'accessing'!
+
+label
+	^ 'Transcript'
+! !
+
+!IDETranscript methodsFor: 'actions'!
+
+clear
+	textarea asJQuery val: ''
+!
+
+cr
+	textarea asJQuery val: textarea asJQuery val, String cr.
+!
+
+open
+	TabManager current
+	open;
+	selectTab: self
+!
+
+show: anObject
+	textarea ifNil: [ self open ].
+	textarea asJQuery val: textarea asJQuery val, anObject asString.
+! !
+
+!IDETranscript methodsFor: 'rendering'!
+
+renderBoxOn: html
+	textarea := html textarea.
+	textarea
+	class: 'amber_transcript';
+	at: 'spellcheck' put: 'false'
+!
+
+renderButtonsOn: html
+	html button
+	with: 'Clear transcript';
+	onClick: [ self clear ]
+! !
+
+IDETranscript class instanceVariableNames: 'current'!
+
+!IDETranscript class methodsFor: 'initialization'!
+
+initialize
+	Transcript register: self current
+! !
+
+!IDETranscript class methodsFor: 'instance creation'!
+
+current
+	^ current ifNil: [ current := super new ]
+!
+
+new
+	self shouldNotImplement
+!
+
+open
+	TabManager current
+		open;
+		selectTab: self current
+! !
+
 TabWidget subclass: #ProgressBar
 	instanceVariableNames: 'percent progressDiv div'
 	package: 'IDE'!

+ 0 - 60
st/Kernel-Exceptions.st

@@ -161,63 +161,3 @@ object: anObject
 	object := anObject
 ! !
 
-Object subclass: #ErrorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Exceptions'!
-!ErrorHandler commentStamp!
-I am used to manage Smalltalk errors.
-See `boot.js` `handleError()` function.
-
-Subclasses can register themselves as the current handler with
-`ErrorHandler class >> register`.
-
-Subclasses may override `#handleError:` to perform an action on the thrown exception.
-The default behavior is to log the error and the context stack to the JavaScript console.!
-
-!ErrorHandler methodsFor: 'error handling'!
-
-handleError: anError
-	anError context ifNotNil: [ self logErrorContext: anError context ].
-	self logError: anError
-! !
-
-!ErrorHandler methodsFor: 'private'!
-
-log: aString
-	console log: aString
-!
-
-logContext: aContext
-	aContext home ifNotNil: [
-		self logContext: aContext home ].
-	self log: aContext asString
-!
-
-logError: anError
-	self log: anError messageText
-!
-
-logErrorContext: aContext
-	aContext ifNotNil: [
-		aContext home ifNotNil: [
-			self logContext: aContext home ]]
-! !
-
-ErrorHandler class instanceVariableNames: 'current'!
-
-!ErrorHandler class methodsFor: 'accessing'!
-
-current
-	^ current
-!
-
-setCurrent: anHandler
-	current := anHandler
-! !
-
-!ErrorHandler class methodsFor: 'initialization'!
-
-register
-	ErrorHandler setCurrent: self new
-! !
-

+ 172 - 48
st/Kernel-Infrastructure.st

@@ -1,30 +1,45 @@
 Smalltalk createPackage: 'Kernel-Infrastructure'!
-Object subclass: #InspectorHandler
+Object subclass: #ConsoleErrorHandler
 	instanceVariableNames: ''
 	package: 'Kernel-Infrastructure'!
-!InspectorHandler commentStamp!
-I am responsible for inspecting object.
+!ConsoleErrorHandler commentStamp!
+I am manage Smalltalk errors, displaying the stack in the console.!
 
-My class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.
+!ConsoleErrorHandler methodsFor: 'error handling'!
 
-The default inspector object is the transcript.!
+handleError: anError
+	anError context ifNotNil: [ self logErrorContext: anError context ].
+	self logError: anError
+! !
+
+!ConsoleErrorHandler methodsFor: 'private'!
 
-InspectorHandler class instanceVariableNames: 'inspector'!
+log: aString
+	console log: aString
+!
+
+logContext: aContext
+	aContext home ifNotNil: [
+		self logContext: aContext home ].
+	self log: aContext asString
+!
 
-!InspectorHandler class methodsFor: 'accessing'!
+logError: anError
+	self log: anError messageText
+!
 
-inspector
-	^ inspector ifNil: [ inspector := Transcript ]
+logErrorContext: aContext
+	aContext ifNotNil: [
+		aContext home ifNotNil: [
+			self logContext: aContext home ]]
 ! !
 
-!InspectorHandler class methodsFor: 'registration'!
+ConsoleErrorHandler class instanceVariableNames: 'current'!
 
-inspect: anObject
-	^ self inspector inspect: anObject
-!
+!ConsoleErrorHandler class methodsFor: 'initialization'!
 
-register: anInspector
-	inspector := anInspector
+initialize
+	ErrorHandler registerIfNone: self new
 ! !
 
 Object subclass: #InterfacingObject
@@ -140,7 +155,7 @@ eval: aString on: aReceiver
 !
 
 inspect: anObject
-	InspectorHandler inspector inspect: anObject
+	Inspector inspect: anObject
 !
 
 moveClass: aClass toPackage: aPackageName
@@ -170,18 +185,6 @@ moveMethod: aMethod toProtocol: aProtocol
 	aMethod protocol: aProtocol
 !
 
-registerErrorHandler: anErrorHandler
-	ErrorHandler setCurrent: anErrorHandler
-!
-
-registerInspector: anInspector
-	InspectorHandler register: anInspector
-!
-
-registerProgressHandler: aProgressHandler
-	ProgressHandler setCurrent: aProgressHandler
-!
-
 removeClass: aClass
 	Smalltalk removeClass: aClass
 !
@@ -248,6 +251,24 @@ evaluate: aBlock on: anErrorClass do: exceptionBlock
  			ifFalse: [ exception signal ] ]
 ! !
 
+!Environment methodsFor: 'services'!
+
+registerErrorHandler: anErrorHandler
+	ErrorHandler register: anErrorHandler
+!
+
+registerInspector: anInspector
+	Inspector register: anInspector
+!
+
+registerProgressHandler: aProgressHandler
+	ProgressHandler register: aProgressHandler
+!
+
+registerTranscript: aTranscript
+	Transcript register: aTranscript
+! !
+
 ProtoObject subclass: #JSObjectProxy
 	instanceVariableNames: 'jsObject'
 	package: 'Kernel-Infrastructure'!
@@ -413,6 +434,26 @@ on: aJSObject
 		yourself
 ! !
 
+Object subclass: #NullProgressHandler
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!NullProgressHandler commentStamp!
+I am the default progress handler. I do not display any progress, and simply iterate over the collection.!
+
+!NullProgressHandler methodsFor: 'progress handling'!
+
+do: aBlock on: aCollection displaying: aString
+	aCollection do: aBlock
+! !
+
+NullProgressHandler class instanceVariableNames: 'current'!
+
+!NullProgressHandler class methodsFor: 'initialization'!
+
+initialize
+	ProgressHandler registerIfNone: self new
+! !
+
 Object subclass: #Organizer
 	instanceVariableNames: ''
 	package: 'Kernel-Infrastructure'!
@@ -718,43 +759,124 @@ initialize
 	]
 ! !
 
-Object subclass: #ProgressHandler
+Object subclass: #Service
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Service commentStamp!
+I implement the basic behavior for class registration to a service.
+
+See the `Transcript` class for a concrete service.
+
+## API
+
+Use class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.!
+
+Service class instanceVariableNames: 'current'!
+
+!Service class methodsFor: 'accessing'!
+
+current
+	^ current
+! !
+
+!Service class methodsFor: 'instance creation'!
+
+new
+	self shouldNotImplement
+! !
+
+!Service class methodsFor: 'registration'!
+
+register: anObject
+	current := anObject
+!
+
+registerIfNone: anObject
+	self current ifNil: [ self register: anObject ]
+! !
+
+Service subclass: #ErrorHandler
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!ErrorHandler commentStamp!
+I am the service used to handle Smalltalk errors.
+See `boot.js` `handleError()` function.
+
+Registered service instances must implement `#handleError:` to perform an action on the thrown exception.!
+
+!ErrorHandler class methodsFor: 'error handling'!
+
+handleError: anError
+	self current handleError: anError
+! !
+
+Service subclass: #Inspector
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Inspector commentStamp!
+I am the service responsible for inspecting objects.
+
+The default inspector object is the transcript.!
+
+!Inspector class methodsFor: 'inspecting'!
+
+inspect: anObject
+	^ self current inspect: anObject
+! !
+
+Service subclass: #ProgressHandler
 	instanceVariableNames: ''
 	package: 'Kernel-Infrastructure'!
 !ProgressHandler commentStamp!
 I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.
 
-Subclasses of can register themselves as the current handler with
-`ProgressHandler class >> register`.
+Registered instances must implement `#do:on:displaying:`.
 
-The default behavior is to simply iterate over the collection.!
+The default behavior is to simply iterate over the collection, using `NullProgressHandler`.!
 
-!ProgressHandler methodsFor: 'progress handling'!
+!ProgressHandler class methodsFor: 'progress handling'!
 
 do: aBlock on: aCollection displaying: aString
-	aCollection do: aBlock
+	self current do: aBlock on: aCollection displaying: aString
 ! !
 
-ProgressHandler class instanceVariableNames: 'current'!
+Service subclass: #Transcript
+	instanceVariableNames: ''
+	package: 'Kernel-Infrastructure'!
+!Transcript commentStamp!
+I am a facade for Transcript actions.
+
+I delegate actions to the currently registered transcript.
+
+## API
 
-!ProgressHandler class methodsFor: 'accessing'!
+    Transcript 
+        show: 'hello world';
+        cr;
+        show: anObject.!
 
-current
-	^ current ifNil: [ current := self new ]
-!
+!Transcript class methodsFor: 'instance creation'!
 
-setCurrent: anHandler
-	current := anHandler
+open
+	self current open
 ! !
 
-!ProgressHandler class methodsFor: 'initialization'!
+!Transcript class methodsFor: 'printing'!
 
-initialize
-	self register
+clear
+	self current clear
+!
+
+cr
+	self current show: String cr
+!
+
+inspect: anObject
+	self show: anObject
 !
 
-register
-	ProgressHandler setCurrent: self new
+show: anObject
+	self current show: anObject
 ! !
 
 Object subclass: #SmalltalkImage
@@ -1033,8 +1155,10 @@ new
 !SequenceableCollection methodsFor: '*Kernel-Infrastructure'!
 
 do: aBlock displayingProgress: aString
-	ProgressHandler current
-		do: aBlock on: self displaying: aString
+	ProgressHandler 
+		do: aBlock 
+		on: self 
+		displaying: aString
 ! !
 
 !String methodsFor: '*Kernel-Infrastructure'!

+ 1 - 1
st/Kernel-Objects.st

@@ -76,7 +76,7 @@ initialize
 !ProtoObject methodsFor: 'inspecting'!
 
 inspect
-	InspectorHandler inspect: self
+	Inspector inspect: self
 !
 
 inspectOn: anInspector

+ 1 - 54
st/Kernel-Transcript.st

@@ -30,59 +30,6 @@ show: anObject
 !ConsoleTranscript class methodsFor: 'initialization'!
 
 initialize
-	Transcript register: self new
-! !
-
-Object subclass: #Transcript
-	instanceVariableNames: ''
-	package: 'Kernel-Transcript'!
-!Transcript commentStamp!
-I am a facade for Transcript actions.
-
-I delegate actions to the currently registered transcript.
-
-## API
-
-    Transcript 
-        show: 'hello world';
-        cr;
-        show: anObject.!
-
-Transcript class instanceVariableNames: 'current'!
-
-!Transcript class methodsFor: 'instance creation'!
-
-current
-	^ current
-!
-
-new
-	self shouldNotImplement
-!
-
-open
-	self current open
-!
-
-register: aTranscript
-	current := aTranscript
-! !
-
-!Transcript class methodsFor: 'printing'!
-
-clear
-	self current clear
-!
-
-cr
-	self current show: String cr
-!
-
-inspect: anObject
-	self show: anObject
-!
-
-show: anObject
-	self current show: anObject
+	Transcript registerIfNone: self new
 ! !
 

+ 1 - 1
support/boot.js

@@ -933,7 +933,7 @@ function RuntimeBrik(brikz, st) {
 		if (!error.smalltalkError) {
 			error = wrappedError(error);
 		}
-		st.ErrorHandler._current()._handleError_(error);
+		st.ErrorHandler._handleError_(error);
 		// Throw the exception anyway, as we want to stop
 		// the execution to avoid infinite loops
 		// Update: do not throw the exception. It's really annoying.