2
0

Kernel-Transcript.deploy.js 2.9 KB

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