Kernel-Transcript.deploy.js 4.4 KB

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