Kernel-Transcript.deploy.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. messageSends: []}),
  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. messageSends: []}),
  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. messageSends: []}),
  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. messageSends: []}),
  39. smalltalk.ConsoleTranscript);
  40. smalltalk.addMethod(
  41. "_initialize",
  42. smalltalk.method({
  43. selector: "initialize",
  44. fn: function (){
  45. var self=this;
  46. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  47. return smalltalk.withContext(function($ctx1) { _st($Transcript())._register_(_st(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, ['textarea'], 'Kernel-Transcript');
  52. smalltalk.Transcript.klass.iVarNames = ['current'];
  53. smalltalk.addMethod(
  54. "_clear",
  55. smalltalk.method({
  56. selector: "clear",
  57. fn: function (){
  58. var self=this;
  59. return smalltalk.withContext(function($ctx1) { _st(_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. "_cr",
  65. smalltalk.method({
  66. selector: "cr",
  67. fn: function (){
  68. var self=this;
  69. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  70. return smalltalk.withContext(function($ctx1) { _st(_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. "_current",
  76. smalltalk.method({
  77. selector: "current",
  78. fn: function (){
  79. var self=this;
  80. return smalltalk.withContext(function($ctx1) { 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. "_new",
  88. smalltalk.method({
  89. selector: "new",
  90. fn: function (){
  91. var self=this;
  92. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  93. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.Transcript.klass)})},
  94. messageSends: ["shouldNotImplement"]}),
  95. smalltalk.Transcript.klass);
  96. smalltalk.addMethod(
  97. "_open",
  98. smalltalk.method({
  99. selector: "open",
  100. fn: function (){
  101. var self=this;
  102. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._open();
  103. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Transcript.klass)})},
  104. messageSends: ["open", "current"]}),
  105. smalltalk.Transcript.klass);
  106. smalltalk.addMethod(
  107. "_register_",
  108. smalltalk.method({
  109. selector: "register:",
  110. fn: function (aTranscript){
  111. var self=this;
  112. return smalltalk.withContext(function($ctx1) { self["@current"]=aTranscript;
  113. return self}, function($ctx1) {$ctx1.fill(self,"register:",{aTranscript:aTranscript},smalltalk.Transcript.klass)})},
  114. messageSends: []}),
  115. smalltalk.Transcript.klass);
  116. smalltalk.addMethod(
  117. "_show_",
  118. smalltalk.method({
  119. selector: "show:",
  120. fn: function (anObject){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) { _st(_st(self)._current())._show_(anObject);
  123. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.Transcript.klass)})},
  124. messageSends: ["show:", "current"]}),
  125. smalltalk.Transcript.klass);