Helios-Environments.deploy.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. smalltalk.addPackage('Helios-Environments', {});
  2. smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
  3. smalltalk.addMethod(
  4. "_eval_on_",
  5. smalltalk.method({
  6. selector: "eval:on:",
  7. fn: function (someCode, aReceiver) {
  8. var self = this;
  9. var $1;
  10. $1 = smalltalk.send(self, "_subclassResponsibility", []);
  11. return $1;
  12. }
  13. }),
  14. smalltalk.HLEnvironment);
  15. smalltalk.addMethod(
  16. "_packages",
  17. smalltalk.method({
  18. selector: "packages",
  19. fn: function () {
  20. var self = this;
  21. var $1;
  22. $1 = smalltalk.send(self, "_subclassResponsibility", []);
  23. return $1;
  24. }
  25. }),
  26. smalltalk.HLEnvironment);
  27. smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  28. smalltalk.addMethod(
  29. "_eval_on_",
  30. smalltalk.method({
  31. selector: "eval:on:",
  32. fn: function (someCode, aReceiver) {
  33. var self = this;
  34. var $1, $2;
  35. var $early = {};
  36. try {
  37. var compiler;
  38. compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
  39. smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [someCode]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
  40. $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [someCode]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [aReceiver, []]);
  41. return $2;
  42. } catch (e) {
  43. if (e === $early) {
  44. return e[0];
  45. }
  46. throw e;
  47. }
  48. }
  49. }),
  50. smalltalk.HLLocalEnvironment);
  51. smalltalk.addMethod(
  52. "_packages",
  53. smalltalk.method({
  54. selector: "packages",
  55. fn: function () {
  56. var self = this;
  57. var $1;
  58. $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packages", []);
  59. return $1;
  60. }
  61. }),
  62. smalltalk.HLLocalEnvironment);
  63. smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
  64. smalltalk.addMethod(
  65. "_eval_on_",
  66. smalltalk.method({
  67. selector: "eval:on:",
  68. fn: function (someCode, aReceiver) {
  69. var self = this;
  70. smalltalk.send(self, "_notYetImplemented", []);
  71. return self;
  72. }
  73. }),
  74. smalltalk.HLRemoteEnvironment);
  75. smalltalk.addMethod(
  76. "_packages",
  77. smalltalk.method({
  78. selector: "packages",
  79. fn: function () {
  80. var self = this;
  81. return self;
  82. }
  83. }),
  84. smalltalk.HLRemoteEnvironment);
  85. smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
  86. smalltalk.addMethod(
  87. "_doesNotUnderstand_",
  88. smalltalk.method({
  89. selector: "doesNotUnderstand:",
  90. fn: function (aMessage) {
  91. var self = this;
  92. return self;
  93. }
  94. }),
  95. smalltalk.HLRemoteObject);
  96. smalltalk.addMethod(
  97. "_inspectOn_",
  98. smalltalk.method({
  99. selector: "inspectOn:",
  100. fn: function (anInspector) {
  101. var self = this;
  102. return self;
  103. }
  104. }),
  105. smalltalk.HLRemoteObject);
  106. smalltalk.addMethod(
  107. "_printString",
  108. smalltalk.method({
  109. selector: "printString",
  110. fn: function () {
  111. var self = this;
  112. return "this is a remote object";
  113. }
  114. }),
  115. smalltalk.HLRemoteObject);