Kernel-Transcript.deploy.js 4.8 KB

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