Browse Source

Transcript and inpsector enhancements

Nicolas Petton 11 years ago
parent
commit
33ae8991e3

+ 9 - 1
css/helios.css

@@ -198,7 +198,7 @@ i {
 }
 
 
-.tool_container {
+.tool_container, .transcript {
     position: absolute;
     top: 23px;
     bottom: 0;
@@ -206,6 +206,14 @@ i {
     right: 0;
 }
 
+.transcript textarea {
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    padding: 0;
+    border: 0;
+}
+
 .tool_container .panes {
     position: relative;
     height: 100%;

+ 1 - 1
helios.html

@@ -14,7 +14,7 @@
   </head> 
   <body> 
     
-    <script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Exceptions', 'Helios-Commands-Core','Helios-Commands-Tools', 'Helios-Commands-Browser', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Workspace', 'Helios-Inspector', 'Helios-References', 'Helios-Announcements']}) </script>
+    <script type='text/javascript'> loadAmber({packages: ['Spaces', 'Helios-Core', 'Helios-Exceptions', 'Helios-Commands-Core','Helios-Commands-Tools', 'Helios-Commands-Browser', 'Helios-Layout','Helios-KeyBindings', 'Helios-Browser', 'Helios-Workspace', 'Helios-Transcript', 'Helios-Inspector', 'Helios-References', 'Helios-Announcements']}) </script>
     <link rel="stylesheet" type="text/css" href='css/helios.css' />
     
     <div id="helper">Loading Helios...</div>

+ 0 - 38
js/Helios-Core.deploy.js

@@ -3187,41 +3187,3 @@ messageSends: []}),
 smalltalk.HLSUnit.klass);
 
 
-smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "canBeOpenAsTab",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
-messageSends: []}),
-smalltalk.HLTranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "tabLabel",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Transcript";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
-messageSends: []}),
-smalltalk.HLTranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "tabPriority",
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=(600);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
-messageSends: []}),
-smalltalk.HLTranscript.klass);
-
-

+ 0 - 53
js/Helios-Core.js

@@ -4146,56 +4146,3 @@ referencedClasses: []
 smalltalk.HLSUnit.klass);
 
 
-smalltalk.addClass('HLTranscript', smalltalk.HLWidget, [], 'Helios-Core');
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "canBeOpenAsTab",
-category: 'testing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return true;
-}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
-args: [],
-source: "canBeOpenAsTab\x0a\x09^ true",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLTranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "tabLabel",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-return "Transcript";
-}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
-args: [],
-source: "tabLabel\x0a\x09^ 'Transcript'",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLTranscript.klass);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "tabPriority",
-category: 'accessing',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=(600);
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
-args: [],
-source: "tabPriority\x0a\x09^ 600",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.HLTranscript.klass);
-
-

+ 17 - 1
js/Helios-Inspector.deploy.js

@@ -407,11 +407,27 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
 return smalltalk.withContext(function($ctx1) { 
 smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
+_st($InspectorHandler())._register_(self);
 _st(self)._watchChanges();
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
-messageSends: ["initialize", "watchChanges"]}),
+messageSends: ["initialize", "register:", "watchChanges"]}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(self)._new();
+_st($1)._inspect_(anObject);
+$2=_st($1)._open();
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
+messageSends: ["inspect:", "new", "open"]}),
 smalltalk.HLInspector.klass);
 
 smalltalk.addMethod(

+ 23 - 2
js/Helios-Inspector.js

@@ -553,13 +553,34 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
 return smalltalk.withContext(function($ctx1) { 
 smalltalk.HLWidget.klass.fn.prototype._initialize.apply(_st(self), []);
+_st($InspectorHandler())._register_(self);
 _st(self)._watchChanges();
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLInspector.klass)})},
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09self watchChanges",
-messageSends: ["initialize", "watchChanges"],
+source: "initialize\x0a\x09super initialize.\x0a\x09InspectorHandler register: self.\x0a\x09self watchChanges",
+messageSends: ["initialize", "register:", "watchChanges"],
+referencedClasses: ["InspectorHandler"]
+}),
+smalltalk.HLInspector.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'actions',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(self)._new();
+_st($1)._inspect_(anObject);
+$2=_st($1)._open();
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open",
+messageSends: ["inspect:", "new", "open"],
 referencedClasses: []
 }),
 smalltalk.HLInspector.klass);

+ 204 - 0
js/Helios-Transcript.deploy.js

@@ -0,0 +1,204 @@
+smalltalk.addPackage('Helios-Transcript');
+smalltalk.addClass('HLTranscript', smalltalk.HLWidget, ['textarea'], 'Helios-Transcript');
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clear",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self["@textarea"])._asJQuery())._text_("");
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.HLTranscript)})},
+messageSends: ["text:", "asJQuery"]}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLTranscript)})},
+messageSends: ["initialize", "register"]}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+fn: function (){
+var self=this;
+function $HLTranscriptHandler(){return smalltalk.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($HLTranscriptHandler())._register_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLTranscript)})},
+messageSends: ["register:"]}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderOn:",
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(html)._div();
+_st($1)._class_("transcript");
+$2=_st($1)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+self["@textarea"]=_st(html)._textarea();
+return self["@textarea"];
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTranscript)})},
+messageSends: ["class:", "div", "with:", "textarea"]}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self["@textarea"])._asJQuery())._append_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{aString:aString},smalltalk.HLTranscript)})},
+messageSends: ["append:", "asJQuery"]}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+fn: function (){
+var self=this;
+function $HLTranscriptHandler(){return smalltalk.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
+_st($HLTranscriptHandler())._unregister_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLTranscript)})},
+messageSends: ["unregister", "unregister:"]}),
+smalltalk.HLTranscript);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "canBeOpenAsTab",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
+messageSends: []}),
+smalltalk.HLTranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tabLabel",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Transcript";
+}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
+messageSends: []}),
+smalltalk.HLTranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tabPriority",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return (1);
+}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
+messageSends: []}),
+smalltalk.HLTranscript.klass);
+
+
+smalltalk.addClass('HLTranscriptHandler', smalltalk.Object, [], 'Helios-Transcript');
+
+smalltalk.HLTranscriptHandler.klass.iVarNames = ['transcripts'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clear",
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._transcripts())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._clear();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.HLTranscriptHandler.klass)})},
+messageSends: ["do:", "clear", "transcripts"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+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)})},
+messageSends: ["register:"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+fn: function (aTranscript){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._transcripts())._add_(aTranscript);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript},smalltalk.HLTranscriptHandler.klass)})},
+messageSends: ["add:", "transcripts"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show:",
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._transcripts())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._show_(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{aString:aString},smalltalk.HLTranscriptHandler.klass)})},
+messageSends: ["do:", "show:", "transcripts"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "transcripts",
+fn: function (){
+var self=this;
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@transcripts"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@transcripts"]=_st($OrderedCollection())._new();
+$1=self["@transcripts"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"transcripts",{},smalltalk.HLTranscriptHandler.klass)})},
+messageSends: ["ifNil:", "new"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister:",
+fn: function (aTranscript){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._transcripts())._remove_(aTranscript);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"unregister:",{aTranscript:aTranscript},smalltalk.HLTranscriptHandler.klass)})},
+messageSends: ["remove:", "transcripts"]}),
+smalltalk.HLTranscriptHandler.klass);
+
+

+ 281 - 0
js/Helios-Transcript.js

@@ -0,0 +1,281 @@
+smalltalk.addPackage('Helios-Transcript');
+smalltalk.addClass('HLTranscript', smalltalk.HLWidget, ['textarea'], 'Helios-Transcript');
+smalltalk.HLTranscript.comment="I am a widget responsible for displaying transcript contents.\x0a\x0a## Transcript API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.\x0a\x0a    Transcript clear.\x0a\x0aSee the `Transcript` class."
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clear",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self["@textarea"])._asJQuery())._text_("");
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.HLTranscript)})},
+args: [],
+source: "clear\x0a\x09textarea asJQuery text: ''",
+messageSends: ["text:", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: 'initialization',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._initialize.apply(_st(self), []);
+_st(self)._register();
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLTranscript)})},
+args: [],
+source: "initialize\x0a\x09super initialize.\x0a\x09self register",
+messageSends: ["initialize", "register"],
+referencedClasses: []
+}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register",
+category: 'registration',
+fn: function (){
+var self=this;
+function $HLTranscriptHandler(){return smalltalk.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($HLTranscriptHandler())._register_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"register",{},smalltalk.HLTranscript)})},
+args: [],
+source: "register\x0a\x09HLTranscriptHandler register: self",
+messageSends: ["register:"],
+referencedClasses: ["HLTranscriptHandler"]
+}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "renderOn:",
+category: 'rendering',
+fn: function (html){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+$1=_st(html)._div();
+_st($1)._class_("transcript");
+$2=_st($1)._with_((function(){
+return smalltalk.withContext(function($ctx2) {
+self["@textarea"]=_st(html)._textarea();
+return self["@textarea"];
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLTranscript)})},
+args: ["html"],
+source: "renderOn: html\x0a\x09html div\x0a\x09\x09class: 'transcript';\x0a\x09\x09with: [ textarea := html textarea ]",
+messageSends: ["class:", "div", "with:", "textarea"],
+referencedClasses: []
+}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show:",
+category: 'actions',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self["@textarea"])._asJQuery())._append_(aString);
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{aString:aString},smalltalk.HLTranscript)})},
+args: ["aString"],
+source: "show: aString\x0a\x09textarea asJQuery append: aString",
+messageSends: ["append:", "asJQuery"],
+referencedClasses: []
+}),
+smalltalk.HLTranscript);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister",
+category: 'registration',
+fn: function (){
+var self=this;
+function $HLTranscriptHandler(){return smalltalk.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
+return smalltalk.withContext(function($ctx1) { 
+smalltalk.HLWidget.fn.prototype._unregister.apply(_st(self), []);
+_st($HLTranscriptHandler())._unregister_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLTranscript)})},
+args: [],
+source: "unregister\x0a\x09super unregister.\x0a\x09HLTranscriptHandler unregister: self",
+messageSends: ["unregister", "unregister:"],
+referencedClasses: ["HLTranscriptHandler"]
+}),
+smalltalk.HLTranscript);
+
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "canBeOpenAsTab",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return true;
+}, function($ctx1) {$ctx1.fill(self,"canBeOpenAsTab",{},smalltalk.HLTranscript.klass)})},
+args: [],
+source: "canBeOpenAsTab\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLTranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tabLabel",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return "Transcript";
+}, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLTranscript.klass)})},
+args: [],
+source: "tabLabel\x0a\x09^ 'Transcript'",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLTranscript.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "tabPriority",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return (1);
+}, function($ctx1) {$ctx1.fill(self,"tabPriority",{},smalltalk.HLTranscript.klass)})},
+args: [],
+source: "tabPriority\x0a\x09^ 1",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.HLTranscript.klass);
+
+
+smalltalk.addClass('HLTranscriptHandler', smalltalk.Object, [], 'Helios-Transcript');
+smalltalk.HLTranscriptHandler.comment="I handle transcript events, dispatching them to all instances of `HLTranscript`.\x0a\x0a## API\x0a\x0aOn class initialization I am automatically registered as the current transcript."
+
+smalltalk.HLTranscriptHandler.klass.iVarNames = ['transcripts'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "clear",
+category: 'registration',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._transcripts())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._clear();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.HLTranscriptHandler.klass)})},
+args: [],
+source: "clear\x0a\x09self transcripts do: [ :each |\x0a\x09\x09each clear ]",
+messageSends: ["do:", "clear", "transcripts"],
+referencedClasses: []
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "initialize",
+category: '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);
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLTranscriptHandler.klass)})},
+args: [],
+source: "initialize\x0a\x09Transcript register: self",
+messageSends: ["register:"],
+referencedClasses: ["Transcript"]
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+category: 'registration',
+fn: function (aTranscript){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._transcripts())._add_(aTranscript);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript},smalltalk.HLTranscriptHandler.klass)})},
+args: ["aTranscript"],
+source: "register: aTranscript\x0a\x09^ self transcripts add: aTranscript",
+messageSends: ["add:", "transcripts"],
+referencedClasses: []
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "show:",
+category: 'registration',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(_st(self)._transcripts())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(each)._show_(aString);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+return self}, function($ctx1) {$ctx1.fill(self,"show:",{aString:aString},smalltalk.HLTranscriptHandler.klass)})},
+args: ["aString"],
+source: "show: aString\x0a\x09self transcripts do: [ :each |\x0a\x09\x09each show: aString ]",
+messageSends: ["do:", "show:", "transcripts"],
+referencedClasses: []
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "transcripts",
+category: 'accessing',
+fn: function (){
+var self=this;
+function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@transcripts"];
+if(($receiver = $2) == nil || $receiver == undefined){
+self["@transcripts"]=_st($OrderedCollection())._new();
+$1=self["@transcripts"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"transcripts",{},smalltalk.HLTranscriptHandler.klass)})},
+args: [],
+source: "transcripts\x0a\x09^ transcripts ifNil: [ transcripts := OrderedCollection new ]",
+messageSends: ["ifNil:", "new"],
+referencedClasses: ["OrderedCollection"]
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "unregister:",
+category: 'registration',
+fn: function (aTranscript){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._transcripts())._remove_(aTranscript);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"unregister:",{aTranscript:aTranscript},smalltalk.HLTranscriptHandler.klass)})},
+args: ["aTranscript"],
+source: "unregister: aTranscript\x0a\x09^ self transcripts remove: aTranscript",
+messageSends: ["remove:", "transcripts"],
+referencedClasses: []
+}),
+smalltalk.HLTranscriptHandler.klass);
+
+

+ 2 - 20
js/Helios-Workspace.deploy.js

@@ -314,27 +314,9 @@ var newInspector;
 function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
 return smalltalk.withContext(function($ctx1) { 
 _st(_st(_st(self)._model())._announcer())._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
-newInspector=_st(self)._makeInspectorOn_(_st(self)._doIt());
-_st(newInspector)._open();
+_st(_st(self)._doIt())._inspect();
 return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{newInspector:newInspector},smalltalk.HLCodeWidget)})},
-messageSends: ["announce:", "on:", "announcer", "model", "makeInspectorOn:", "doIt", "open"]}),
-smalltalk.HLCodeWidget);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "makeInspectorOn:",
-fn: function (anObject){
-var self=this;
-function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
-return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$2=_st($HLInspector())._new();
-_st($2)._inspect_(anObject);
-$3=_st($2)._yourself();
-$1=$3;
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"makeInspectorOn:",{anObject:anObject},smalltalk.HLCodeWidget)})},
-messageSends: ["inspect:", "new", "yourself"]}),
+messageSends: ["announce:", "on:", "announcer", "model", "inspect", "doIt"]}),
 smalltalk.HLCodeWidget);
 
 smalltalk.addMethod(

+ 3 - 26
js/Helios-Workspace.js

@@ -420,38 +420,15 @@ var newInspector;
 function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
 return smalltalk.withContext(function($ctx1) { 
 _st(_st(_st(self)._model())._announcer())._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
-newInspector=_st(self)._makeInspectorOn_(_st(self)._doIt());
-_st(newInspector)._open();
+_st(_st(self)._doIt())._inspect();
 return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{newInspector:newInspector},smalltalk.HLCodeWidget)})},
 args: [],
-source: "inspectIt\x0a\x09| newInspector |\x0a       \x0a\x09self model announcer announce: (HLInspectItRequested on: model).\x0a\x09newInspector := self makeInspectorOn: self doIt.\x0a\x09newInspector open",
-messageSends: ["announce:", "on:", "announcer", "model", "makeInspectorOn:", "doIt", "open"],
+source: "inspectIt\x0a\x09| newInspector |\x0a       \x0a\x09self model announcer announce: (HLInspectItRequested on: model).\x0a\x09self doIt inspect",
+messageSends: ["announce:", "on:", "announcer", "model", "inspect", "doIt"],
 referencedClasses: ["HLInspectItRequested"]
 }),
 smalltalk.HLCodeWidget);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "makeInspectorOn:",
-category: 'actions',
-fn: function (anObject){
-var self=this;
-function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
-return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$2=_st($HLInspector())._new();
-_st($2)._inspect_(anObject);
-$3=_st($2)._yourself();
-$1=$3;
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"makeInspectorOn:",{anObject:anObject},smalltalk.HLCodeWidget)})},
-args: ["anObject"],
-source: "makeInspectorOn: anObject\x0a\x0a\x09^ HLInspector new \x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
-messageSends: ["inspect:", "new", "yourself"],
-referencedClasses: ["HLInspector"]
-}),
-smalltalk.HLCodeWidget);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "messageHintFor:token:",

+ 16 - 37
js/IDE.deploy.js

@@ -3999,6 +3999,22 @@ messageSends: []}),
 smalltalk.Inspector);
 
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(self)._new();
+_st($2)._inspect_(anObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
+messageSends: ["inspect:", "new", "yourself"]}),
+smalltalk.Inspector.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
@@ -5382,43 +5398,6 @@ smalltalk.Workspace);
 
 
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "inspect",
-fn: function (){
-var self=this;
-function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($Inspector())._new();
-_st($1)._inspect_(self);
-$2=_st($1)._open();
-return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
-messageSends: ["inspect:", "new", "open"]}),
-smalltalk.Object);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "inspectOn:",
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-variables=_st($Dictionary())._new();
-_st(variables)._at_put_("#self",self);
-_st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-$1=anInspector;
-_st($1)._setLabel_(_st(self)._printString());
-$2=_st($1)._setVariables_(variables);
-return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
-messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
-smalltalk.Object);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspectOn:",

+ 21 - 47
js/IDE.js

@@ -5009,6 +5009,27 @@ referencedClasses: []
 smalltalk.Inspector);
 
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'instance creation',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$3,$1;
+$2=_st(self)._new();
+_st($2)._inspect_(anObject);
+$3=_st($2)._yourself();
+$1=$3;
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
+messageSends: ["inspect:", "new", "yourself"],
+referencedClasses: []
+}),
+smalltalk.Inspector.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
@@ -6772,53 +6793,6 @@ smalltalk.Workspace);
 
 
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "inspect",
-category: '*IDE',
-fn: function (){
-var self=this;
-function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st($Inspector())._new();
-_st($1)._inspect_(self);
-$2=_st($1)._open();
-return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
-args: [],
-source: "inspect\x0a\x09Inspector new\x0a\x09\x09inspect: self;\x0a\x09\x09open",
-messageSends: ["inspect:", "new", "open"],
-referencedClasses: ["Inspector"]
-}),
-smalltalk.Object);
-
-smalltalk.addMethod(
-smalltalk.method({
-selector: "inspectOn:",
-category: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-variables=_st($Dictionary())._new();
-_st(variables)._at_put_("#self",self);
-_st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
-return smalltalk.withContext(function($ctx2) {
-return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
-$1=anInspector;
-_st($1)._setLabel_(_st(self)._printString());
-$2=_st($1)._setVariables_(variables);
-return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
-referencedClasses: ["Dictionary"]
-}),
-smalltalk.Object);
-
 smalltalk.addMethod(
 smalltalk.method({
 selector: "inspectOn:",

+ 86 - 1
js/Kernel-Objects.deploy.js

@@ -329,6 +329,40 @@ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Object)
 messageSends: []}),
 smalltalk.Object);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect",
+fn: function (){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($InspectorHandler())._inspect_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
+messageSends: ["inspect:"]}),
+smalltalk.Object);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectOn:",
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+variables=_st($Dictionary())._new();
+_st(variables)._at_put_("#self",self);
+_st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$1=anInspector;
+_st($1)._setLabel_(_st(self)._printString());
+$2=_st($1)._setVariables_(variables);
+return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
+messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
+smalltalk.Object);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "instVarAt:",
@@ -1719,7 +1753,7 @@ $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
 return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
-}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.HLEnvironment)})},
+}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
 messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"]}),
 smalltalk.Environment);
 
@@ -1905,6 +1939,57 @@ smalltalk.Environment);
 
 
 
+smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
+
+smalltalk.InspectorHandler.klass.iVarNames = ['inspector'];
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_st(self)._inspector())._inspect_(anObject);
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.InspectorHandler.klass)})},
+messageSends: ["inspect:", "inspector"]}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspector",
+fn: function (){
+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 == undefined){
+self["@inspector"]=$Transcript();
+$1=self["@inspector"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
+messageSends: ["ifNil:"]}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+self["@inspector"]=anInspector;
+$1=self["@inspector"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
+messageSends: []}),
+smalltalk.InspectorHandler.klass);
+
+
 smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
 smalltalk.addMethod(
 smalltalk.method({

+ 113 - 2
js/Kernel-Objects.js

@@ -455,6 +455,50 @@ referencedClasses: []
 }),
 smalltalk.Object);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect",
+category: 'inspecting',
+fn: function (){
+var self=this;
+function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
+return smalltalk.withContext(function($ctx1) { 
+_st($InspectorHandler())._inspect_(self);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)})},
+args: [],
+source: "inspect\x0a\x09InspectorHandler inspect: self",
+messageSends: ["inspect:"],
+referencedClasses: ["InspectorHandler"]
+}),
+smalltalk.Object);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspectOn:",
+category: 'inspecting',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+variables=_st($Dictionary())._new();
+_st(variables)._at_put_("#self",self);
+_st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
+return smalltalk.withContext(function($ctx2) {
+return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
+$1=anInspector;
+_st($1)._setLabel_(_st(self)._printString());
+$2=_st($1)._setVariables_(variables);
+return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
+referencedClasses: ["Dictionary"]
+}),
+smalltalk.Object);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "instVarAt:",
@@ -2384,9 +2428,9 @@ $2=_st(compiler)._evaluateExpression_on_(aString,aReceiver);
 return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
-}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.HLEnvironment)})},
+}, function($ctx1) {$ctx1.fill(self,"eval:on:",{aString:aString,aReceiver:aReceiver,compiler:compiler},smalltalk.Environment)})},
 args: ["aString", "aReceiver"],
-source: "eval: aString on: aReceiver\x0a\x09| compiler  |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ window alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: aReceiver",
+source: "eval: aString on: aReceiver\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ window alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: aReceiver",
 messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "evaluateExpression:on:"],
 referencedClasses: ["Compiler", "Error"]
 }),
@@ -2629,6 +2673,73 @@ smalltalk.Environment);
 
 
 
+smalltalk.addClass('InspectorHandler', smalltalk.Object, [], 'Kernel-Objects');
+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.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'registration',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(_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"],
+referencedClasses: []
+}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspector",
+category: 'accessing',
+fn: function (){
+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 == undefined){
+self["@inspector"]=$Transcript();
+$1=self["@inspector"];
+} else {
+$1=$2;
+};
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
+args: [],
+source: "inspector\x0a\x09^ inspector ifNil: [ inspector := Transcript ]",
+messageSends: ["ifNil:"],
+referencedClasses: ["Transcript"]
+}),
+smalltalk.InspectorHandler.klass);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "register:",
+category: 'registration',
+fn: function (anInspector){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+self["@inspector"]=anInspector;
+$1=self["@inspector"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"register:",{anInspector:anInspector},smalltalk.InspectorHandler.klass)})},
+args: ["anInspector"],
+source: "register: anInspector\x0a\x09^ inspector := anInspector",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.InspectorHandler.klass);
+
+
 smalltalk.addClass('JSObjectProxy', smalltalk.Object, ['jsObject'], 'Kernel-Objects');
 smalltalk.JSObjectProxy.comment="I handle sending messages to JavaScript objects, making  JavaScript object accessing from Amber fully transparent.\x0aMy instances make intensive use of `#doesNotUnderstand:`.\x0a\x0aMy instances are automatically created by Amber whenever a message is sent to a JavaScript object.\x0a\x0a## Usage examples\x0a\x0aJSObjectProxy objects are instanciated by Amber when a Smalltalk message is sent to a JavaScript object.\x0a\x0a\x09window alert: 'hello world'.\x0a\x09window inspect.\x0a\x09(window jQuery: 'body') append: 'hello world'\x0a\x0aAmber messages sends are converted to JavaScript function calls or object property access _(in this order)_. If n one of them match, a `MessageNotUnderstood` error will be thrown.\x0a\x0a## Message conversion rules\x0a\x0a- `someUser name` becomes `someUser.name`\x0a- `someUser name: 'John'` becomes `someUser name = \x22John\x22`\x0a- `console log: 'hello world'` becomes `console.log('hello world')`\x0a- `(window jQuery: 'foo') css: 'background' color: 'red'` becomes `window.jQuery('foo').css('background', 'red')`\x0a\x0a__Note:__ For keyword-based messages, only the first keyword is kept: `window foo: 1 bar: 2` is equivalent to `window foo: 1 baz: 2`."
 smalltalk.addMethod(

+ 11 - 0
js/Kernel-Transcript.deploy.js

@@ -94,6 +94,17 @@ return $1;
 messageSends: []}),
 smalltalk.Transcript.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self)._show_(anObject);
+return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Transcript.klass)})},
+messageSends: ["show:"]}),
+smalltalk.Transcript.klass);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "new",

+ 16 - 0
js/Kernel-Transcript.js

@@ -134,6 +134,22 @@ referencedClasses: []
 }),
 smalltalk.Transcript.klass);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "inspect:",
+category: 'printing',
+fn: function (anObject){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(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",

+ 0 - 20
st/Helios-Core.st

@@ -1424,23 +1424,3 @@ canBeOpenAsTab
 	^ true
 ! !
 
-HLWidget subclass: #HLTranscript
-	instanceVariableNames: ''
-	package: 'Helios-Core'!
-
-!HLTranscript class methodsFor: 'accessing'!
-
-tabLabel
-	^ 'Transcript'
-!
-
-tabPriority
-	^ 600
-! !
-
-!HLTranscript class methodsFor: 'testing'!
-
-canBeOpenAsTab
-	^ true
-! !
-

+ 9 - 0
st/Helios-Inspector.st

@@ -178,10 +178,19 @@ tabPriority
 	^ 10
 ! !
 
+!HLInspector class methodsFor: 'actions'!
+
+inspect: anObject
+	self new
+		inspect: anObject;
+		open
+! !
+
 !HLInspector class methodsFor: 'initialization'!
 
 initialize
 	super initialize.
+	InspectorHandler register: self.
 	self watchChanges
 !
 

+ 114 - 0
st/Helios-Transcript.st

@@ -0,0 +1,114 @@
+Smalltalk current createPackage: 'Helios-Transcript'!
+HLWidget subclass: #HLTranscript
+	instanceVariableNames: 'textarea'
+	package: 'Helios-Transcript'!
+!HLTranscript commentStamp!
+I am a widget responsible for displaying transcript contents.
+
+## Transcript API
+
+    Transcript 
+        show: 'hello world';
+        cr;
+        show: anObject.
+
+    Transcript clear.
+
+See the `Transcript` class.!
+
+!HLTranscript methodsFor: 'actions'!
+
+clear
+	textarea asJQuery text: ''
+!
+
+show: aString
+	textarea asJQuery append: aString
+! !
+
+!HLTranscript methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+	self register
+! !
+
+!HLTranscript methodsFor: 'registration'!
+
+register
+	HLTranscriptHandler register: self
+!
+
+unregister
+	super unregister.
+	HLTranscriptHandler unregister: self
+! !
+
+!HLTranscript methodsFor: 'rendering'!
+
+renderOn: html
+	html div
+		class: 'transcript';
+		with: [ textarea := html textarea ]
+! !
+
+!HLTranscript class methodsFor: 'accessing'!
+
+tabLabel
+	^ 'Transcript'
+!
+
+tabPriority
+	^ 1
+! !
+
+!HLTranscript class methodsFor: 'testing'!
+
+canBeOpenAsTab
+	^ true
+! !
+
+Object subclass: #HLTranscriptHandler
+	instanceVariableNames: ''
+	package: 'Helios-Transcript'!
+!HLTranscriptHandler commentStamp!
+I handle transcript events, dispatching them to all instances of `HLTranscript`.
+
+## API
+
+On class initialization I am automatically registered as the current transcript.!
+
+HLTranscriptHandler class instanceVariableNames: 'transcripts'!
+
+!HLTranscriptHandler class methodsFor: 'accessing'!
+
+transcripts
+	^ transcripts ifNil: [ transcripts := OrderedCollection new ]
+! !
+
+!HLTranscriptHandler class methodsFor: 'initialization'!
+
+initialize
+	Transcript register: self
+! !
+
+!HLTranscriptHandler class methodsFor: 'registration'!
+
+clear
+	self transcripts do: [ :each |
+		each clear ]
+!
+
+register: aTranscript
+	^ self transcripts add: aTranscript
+!
+
+show: aString
+	self transcripts do: [ :each |
+		each show: aString ]
+!
+
+unregister: aTranscript
+	^ self transcripts remove: aTranscript
+! !
+

+ 1 - 9
st/Helios-Workspace.st

@@ -145,15 +145,7 @@ inspectIt
 	| newInspector |
        
 	self model announcer announce: (HLInspectItRequested on: model).
-	newInspector := self makeInspectorOn: self doIt.
-	newInspector open
-!
-
-makeInspectorOn: anObject
-
-	^ HLInspector new 
-		inspect: anObject;
-		yourself
+	self doIt inspect
 !
 
 print: aString

+ 6 - 19
st/IDE.st

@@ -1726,6 +1726,12 @@ updateVariablesList
 
 !Inspector class methodsFor: 'instance creation'!
 
+inspect: anObject
+	^self new
+		inspect: anObject;
+		yourself
+!
+
 on: anObject
 	^self new
 		inspect: anObject;
@@ -2288,25 +2294,6 @@ renderButtonsOn: html
 	onClick: [self clearWorkspace]
 ! !
 
-!Object methodsFor: '*IDE'!
-
-inspect
-	Inspector new
-		inspect: self;
-		open
-!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	self class allInstanceVariableNames do: [:each |
-		variables at: each put: (self instVarAt: each)].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
 !Collection methodsFor: '*IDE'!
 
 inspectOn: anInspector

+ 45 - 0
st/Kernel-Objects.st

@@ -215,6 +215,23 @@ try: aBlock catch: anotherBlock
 initialize
 ! !
 
+!Object methodsFor: 'inspecting'!
+
+inspect
+	InspectorHandler inspect: self
+!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	self class allInstanceVariableNames do: [:each |
+		variables at: each put: (self instVarAt: each)].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
 !Object methodsFor: 'message handling'!
 
 basicPerform: aString
@@ -829,6 +846,34 @@ compileMethod: sourceCode for: class protocol: protocol
 		category: protocol
 ! !
 
+Object subclass: #InspectorHandler
+	instanceVariableNames: ''
+	package: 'Kernel-Objects'!
+!InspectorHandler commentStamp!
+I am responsible for inspecting object.
+
+My class-side `inspector` inst var holds the current inspector I'm delegating object inspection to.
+
+The default inspector object is the transcript.!
+
+InspectorHandler class instanceVariableNames: 'inspector'!
+
+!InspectorHandler class methodsFor: 'accessing'!
+
+inspector
+	^ inspector ifNil: [ inspector := Transcript ]
+! !
+
+!InspectorHandler class methodsFor: 'registration'!
+
+inspect: anObject
+	^ self inspector inspect: anObject
+!
+
+register: anInspector
+	^ inspector := anInspector
+! !
+
 Object subclass: #JSObjectProxy
 	instanceVariableNames: 'jsObject'
 	package: 'Kernel-Objects'!

+ 4 - 0
st/Kernel-Transcript.st

@@ -62,6 +62,10 @@ cr
 	self current show: String cr
 !
 
+inspect: anObject
+	self show: anObject
+!
+
 show: anObject
 	self current show: anObject
 ! !