2
0

Kernel-Transcript.js 5.7 KB

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