123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- smalltalk.addPackage('Helios-Environments', {});
- smalltalk.addClass('HLEnvironment', smalltalk.Object, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode, aReceiver) {
- var self = this;
- var $1;
- $1 = smalltalk.send(self, "_subclassResponsibility", []);
- return $1;
- }
- }),
- smalltalk.HLEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self, "_subclassResponsibility", []);
- return $1;
- }
- }),
- smalltalk.HLEnvironment);
- smalltalk.addClass('HLLocalEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode, aReceiver) {
- var self = this;
- var $1, $2;
- var $early = {};
- try {
- var compiler;
- compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
- 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];}]);
- $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, []]);
- return $2;
- } catch (e) {
- if (e === $early) {
- return e[0];
- }
- throw e;
- }
- }
- }),
- smalltalk.HLLocalEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_packages", []);
- return $1;
- }
- }),
- smalltalk.HLLocalEnvironment);
- smalltalk.addClass('HLRemoteEnvironment', smalltalk.HLEnvironment, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_eval_on_",
- smalltalk.method({
- selector: "eval:on:",
- fn: function (someCode, aReceiver) {
- var self = this;
- smalltalk.send(self, "_notYetImplemented", []);
- return self;
- }
- }),
- smalltalk.HLRemoteEnvironment);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- fn: function () {
- var self = this;
- return self;
- }
- }),
- smalltalk.HLRemoteEnvironment);
- smalltalk.addClass('HLRemoteObject', smalltalk.Object, [], 'Helios-Environments');
- smalltalk.addMethod(
- "_doesNotUnderstand_",
- smalltalk.method({
- selector: "doesNotUnderstand:",
- fn: function (aMessage) {
- var self = this;
- return self;
- }
- }),
- smalltalk.HLRemoteObject);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- fn: function (anInspector) {
- var self = this;
- return self;
- }
- }),
- smalltalk.HLRemoteObject);
- smalltalk.addMethod(
- "_printString",
- smalltalk.method({
- selector: "printString",
- fn: function () {
- var self = this;
- return "this is a remote object";
- }
- }),
- smalltalk.HLRemoteObject);
|