Trapped-Demo.deploy.js 813 B

123456789101112131415161718192021222324252627282930313233343536
  1. smalltalk.addPackage('Trapped-Demo', {});
  2. smalltalk.addClass('App', smalltalk.TrappedFly, [], 'Trapped-Demo');
  3. smalltalk.addClass('AppView', smalltalk.Widget, [], 'Trapped-Demo');
  4. smalltalk.addMethod(
  5. "_renderOn_",
  6. smalltalk.method({
  7. selector: "renderOn:",
  8. fn: function (html){
  9. var self=this;
  10. smalltalk.send(html,"_h2_",["To-Do List"]);
  11. smalltalk.send(smalltalk.send(html,"_p",[]),"_trapShow_",[["items"]]);
  12. return self}
  13. }),
  14. smalltalk.AppView);
  15. smalltalk.addClass('Name', smalltalk.TrappedFly, [], 'Trapped-Demo');
  16. smalltalk.addClass('NameView', smalltalk.Widget, [], 'Trapped-Demo');
  17. smalltalk.addMethod(
  18. "_renderOn_",
  19. smalltalk.method({
  20. selector: "renderOn:",
  21. fn: function (html){
  22. var self=this;
  23. smalltalk.send(smalltalk.send(html,"_root",[]),"_trapShow_",[[]]);
  24. return self}
  25. }),
  26. smalltalk.NameView);