2
0

Additional-Examples.js 984 B

123456789101112131415161718192021
  1. smalltalk.addPackage('Additional-Examples', {});
  2. smalltalk.addClass('ClassInitializationExample', smalltalk.Object, [], 'Additional-Examples');
  3. smalltalk.ClassInitializationExample.comment=unescape('This%20class%20will%20pop%20up%20an%20alert%20when%20it%20is%20loaded%20into%20Amber.')
  4. smalltalk.addMethod(
  5. unescape('_initialize'),
  6. smalltalk.method({
  7. selector: unescape('initialize'),
  8. category: 'initialization',
  9. fn: function (){
  10. var self=this;
  11. smalltalk.send((typeof window == 'undefined' ? nil : window), "_alert_", [smalltalk.send(smalltalk.send("Hello from inside the ", "__comma", [smalltalk.send(self, "_printString", [])]), "__comma", [" initialize method."])]);
  12. return self;},
  13. args: [],
  14. source: unescape('initialize%0A%09window%20alert%3A%20%27Hello%20from%20inside%20the%20%27%2C%20self%20printString%20%2C%20%27%20initialize%20method.%27'),
  15. messageSends: ["alert:", unescape("%2C"), "printString"],
  16. referencedClasses: []
  17. }),
  18. smalltalk.ClassInitializationExample.klass);