Kernel-Transcript.deploy.js 4.0 KB

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