1
0

Kernel-Transcript.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. smalltalk.addPackage('Kernel-Transcript', {});
  2. smalltalk.addClass('ConsoleTranscript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  3. smalltalk.addMethod(
  4. "_clear",
  5. smalltalk.method({
  6. selector: "clear",
  7. category: 'printing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.ConsoleTranscript)})},
  11. args: [],
  12. source: "clear\x0a\x09\x22no op\x22",
  13. messageSends: [],
  14. referencedClasses: []
  15. }),
  16. smalltalk.ConsoleTranscript);
  17. smalltalk.addMethod(
  18. "_cr",
  19. smalltalk.method({
  20. selector: "cr",
  21. category: 'printing',
  22. fn: function (){
  23. var self=this;
  24. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.ConsoleTranscript)})},
  25. args: [],
  26. source: "cr\x0a\x09\x22no op\x22",
  27. messageSends: [],
  28. referencedClasses: []
  29. }),
  30. smalltalk.ConsoleTranscript);
  31. smalltalk.addMethod(
  32. "_open",
  33. smalltalk.method({
  34. selector: "open",
  35. category: 'actions',
  36. fn: function (){
  37. var self=this;
  38. return smalltalk.withContext(function($ctx1) { return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.ConsoleTranscript)})},
  39. args: [],
  40. source: "open",
  41. messageSends: [],
  42. referencedClasses: []
  43. }),
  44. smalltalk.ConsoleTranscript);
  45. smalltalk.addMethod(
  46. "_show_",
  47. smalltalk.method({
  48. selector: "show:",
  49. category: 'printing',
  50. fn: function (anObject){
  51. var self=this;
  52. return smalltalk.withContext(function($ctx1) { console.log(String(string._asString()));
  53. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject}, smalltalk.ConsoleTranscript)})},
  54. args: ["anObject"],
  55. source: "show: anObject\x0a\x09<console.log(String(string._asString()))>",
  56. messageSends: [],
  57. referencedClasses: []
  58. }),
  59. smalltalk.ConsoleTranscript);
  60. smalltalk.addMethod(
  61. "_initialize",
  62. smalltalk.method({
  63. selector: "initialize",
  64. category: 'initialization',
  65. fn: function (){
  66. var self=this;
  67. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Transcript || Transcript))._register_(_st(self)._new());
  68. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ConsoleTranscript.klass)})},
  69. args: [],
  70. source: "initialize\x0a\x09Transcript register: self new",
  71. messageSends: ["register:", "new"],
  72. referencedClasses: ["Transcript"]
  73. }),
  74. smalltalk.ConsoleTranscript.klass);
  75. smalltalk.addClass('Transcript', smalltalk.Object, ['textarea'], 'Kernel-Transcript');
  76. smalltalk.Transcript.klass.iVarNames = ['current'];
  77. smalltalk.addMethod(
  78. "_clear",
  79. smalltalk.method({
  80. selector: "clear",
  81. category: 'printing',
  82. fn: function (){
  83. var self=this;
  84. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._clear();
  85. return self}, function($ctx1) {$ctx1.fill(self,"clear",{}, smalltalk.Transcript.klass)})},
  86. args: [],
  87. source: "clear\x0a self current clear",
  88. messageSends: ["clear", "current"],
  89. referencedClasses: []
  90. }),
  91. smalltalk.Transcript.klass);
  92. smalltalk.addMethod(
  93. "_cr",
  94. smalltalk.method({
  95. selector: "cr",
  96. category: 'printing',
  97. fn: function (){
  98. var self=this;
  99. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._show_(_st((smalltalk.String || String))._cr());
  100. return self}, function($ctx1) {$ctx1.fill(self,"cr",{}, smalltalk.Transcript.klass)})},
  101. args: [],
  102. source: "cr\x0a self current show: String cr",
  103. messageSends: ["show:", "cr", "current"],
  104. referencedClasses: ["String"]
  105. }),
  106. smalltalk.Transcript.klass);
  107. smalltalk.addMethod(
  108. "_current",
  109. smalltalk.method({
  110. selector: "current",
  111. category: 'instance creation',
  112. fn: function (){
  113. var self=this;
  114. return smalltalk.withContext(function($ctx1) { var $1;
  115. $1=self["@current"];
  116. return $1;
  117. }, function($ctx1) {$ctx1.fill(self,"current",{}, smalltalk.Transcript.klass)})},
  118. args: [],
  119. source: "current\x0a ^current",
  120. messageSends: [],
  121. referencedClasses: []
  122. }),
  123. smalltalk.Transcript.klass);
  124. smalltalk.addMethod(
  125. "_new",
  126. smalltalk.method({
  127. selector: "new",
  128. category: 'instance creation',
  129. fn: function (){
  130. var self=this;
  131. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  132. return self}, function($ctx1) {$ctx1.fill(self,"new",{}, smalltalk.Transcript.klass)})},
  133. args: [],
  134. source: "new\x0a self shouldNotImplement",
  135. messageSends: ["shouldNotImplement"],
  136. referencedClasses: []
  137. }),
  138. smalltalk.Transcript.klass);
  139. smalltalk.addMethod(
  140. "_open",
  141. smalltalk.method({
  142. selector: "open",
  143. category: 'instance creation',
  144. fn: function (){
  145. var self=this;
  146. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._open();
  147. return self}, function($ctx1) {$ctx1.fill(self,"open",{}, smalltalk.Transcript.klass)})},
  148. args: [],
  149. source: "open\x0a self current open",
  150. messageSends: ["open", "current"],
  151. referencedClasses: []
  152. }),
  153. smalltalk.Transcript.klass);
  154. smalltalk.addMethod(
  155. "_register_",
  156. smalltalk.method({
  157. selector: "register:",
  158. category: 'instance creation',
  159. fn: function (aTranscript){
  160. var self=this;
  161. return smalltalk.withContext(function($ctx1) { self["@current"]=aTranscript;
  162. return self}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript}, smalltalk.Transcript.klass)})},
  163. args: ["aTranscript"],
  164. source: "register: aTranscript\x0a\x09current := aTranscript",
  165. messageSends: [],
  166. referencedClasses: []
  167. }),
  168. smalltalk.Transcript.klass);
  169. smalltalk.addMethod(
  170. "_show_",
  171. smalltalk.method({
  172. selector: "show:",
  173. category: 'printing',
  174. fn: function (anObject){
  175. var self=this;
  176. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._show_(anObject);
  177. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject}, smalltalk.Transcript.klass)})},
  178. args: ["anObject"],
  179. source: "show: anObject\x0a self current show: anObject",
  180. messageSends: ["show:", "current"],
  181. referencedClasses: []
  182. }),
  183. smalltalk.Transcript.klass);