2
0

Kernel-Transcript.deploy.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. smalltalk.addPackage('Kernel-Transcript');
  2. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  3. smalltalk.addMethod(
  4. smalltalk.method({
  5. selector: "clear",
  6. fn: function (){
  7. var self=this;
  8. return smalltalk.withContext(function($ctx1) {
  9. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.ConsoleTranscript)})},
  10. messageSends: []}),
  11. smalltalk.ConsoleTranscript);
  12. smalltalk.addMethod(
  13. smalltalk.method({
  14. selector: "cr",
  15. fn: function (){
  16. var self=this;
  17. return smalltalk.withContext(function($ctx1) {
  18. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.ConsoleTranscript)})},
  19. messageSends: []}),
  20. smalltalk.ConsoleTranscript);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "open",
  24. fn: function (){
  25. var self=this;
  26. return smalltalk.withContext(function($ctx1) {
  27. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.ConsoleTranscript)})},
  28. messageSends: []}),
  29. smalltalk.ConsoleTranscript);
  30. smalltalk.addMethod(
  31. smalltalk.method({
  32. selector: "show:",
  33. fn: function (anObject){
  34. var self=this;
  35. return smalltalk.withContext(function($ctx1) {
  36. console.log(String(_st(anObject)._asString()));
  37. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.ConsoleTranscript)})},
  38. messageSends: []}),
  39. smalltalk.ConsoleTranscript);
  40. smalltalk.addMethod(
  41. smalltalk.method({
  42. selector: "initialize",
  43. fn: function (){
  44. var self=this;
  45. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  46. return smalltalk.withContext(function($ctx1) {
  47. _st($Transcript())._register_(self._new());
  48. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ConsoleTranscript.klass)})},
  49. messageSends: ["register:", "new"]}),
  50. smalltalk.ConsoleTranscript.klass);
  51. smalltalk.addClass('Transcript', smalltalk.Object, [], 'Kernel-Transcript');
  52. smalltalk.Transcript.klass.iVarNames = ['current'];
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "clear",
  56. fn: function (){
  57. var self=this;
  58. return smalltalk.withContext(function($ctx1) {
  59. _st(self._current())._clear();
  60. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.Transcript.klass)})},
  61. messageSends: ["clear", "current"]}),
  62. smalltalk.Transcript.klass);
  63. smalltalk.addMethod(
  64. smalltalk.method({
  65. selector: "cr",
  66. fn: function (){
  67. var self=this;
  68. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  69. return smalltalk.withContext(function($ctx1) {
  70. _st(self._current())._show_(_st($String())._cr());
  71. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.Transcript.klass)})},
  72. messageSends: ["show:", "cr", "current"]}),
  73. smalltalk.Transcript.klass);
  74. smalltalk.addMethod(
  75. smalltalk.method({
  76. selector: "current",
  77. fn: function (){
  78. var self=this;
  79. return smalltalk.withContext(function($ctx1) {
  80. var $1;
  81. $1=self["@current"];
  82. return $1;
  83. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Transcript.klass)})},
  84. messageSends: []}),
  85. smalltalk.Transcript.klass);
  86. smalltalk.addMethod(
  87. smalltalk.method({
  88. selector: "inspect:",
  89. fn: function (anObject){
  90. var self=this;
  91. return smalltalk.withContext(function($ctx1) {
  92. self._show_(anObject);
  93. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Transcript.klass)})},
  94. messageSends: ["show:"]}),
  95. smalltalk.Transcript.klass);
  96. smalltalk.addMethod(
  97. smalltalk.method({
  98. selector: "new",
  99. fn: function (){
  100. var self=this;
  101. return smalltalk.withContext(function($ctx1) {
  102. self._shouldNotImplement();
  103. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.Transcript.klass)})},
  104. messageSends: ["shouldNotImplement"]}),
  105. smalltalk.Transcript.klass);
  106. smalltalk.addMethod(
  107. smalltalk.method({
  108. selector: "open",
  109. fn: function (){
  110. var self=this;
  111. return smalltalk.withContext(function($ctx1) {
  112. _st(self._current())._open();
  113. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Transcript.klass)})},
  114. messageSends: ["open", "current"]}),
  115. smalltalk.Transcript.klass);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "register:",
  119. fn: function (aTranscript){
  120. var self=this;
  121. return smalltalk.withContext(function($ctx1) {
  122. self["@current"]=aTranscript;
  123. return self}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript},smalltalk.Transcript.klass)})},
  124. messageSends: []}),
  125. smalltalk.Transcript.klass);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "show:",
  129. fn: function (anObject){
  130. var self=this;
  131. return smalltalk.withContext(function($ctx1) {
  132. _st(self._current())._show_(anObject);
  133. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.Transcript.klass)})},
  134. messageSends: ["show:", "current"]}),
  135. smalltalk.Transcript.klass);