Trapped-Demo.deploy.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. smalltalk.addPackage('Trapped-Demo', {});
  2. smalltalk.addClass('App', smalltalk.TrappedFly, [], 'Trapped-Demo');
  3. smalltalk.addMethod(
  4. "_initialize",
  5. smalltalk.method({
  6. selector: "initialize",
  7. fn: function (){
  8. var self=this;
  9. smalltalk.send(self,"_payload_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("items","__minus_gt",[["hello", "world"]])])]);
  10. return self}
  11. }),
  12. smalltalk.App);
  13. smalltalk.addClass('AppView', smalltalk.Widget, [], 'Trapped-Demo');
  14. smalltalk.addMethod(
  15. "_renderOn_",
  16. smalltalk.method({
  17. selector: "renderOn:",
  18. fn: function (html){
  19. var self=this;
  20. smalltalk.send(html,"_h2_",["To-Do List"]);
  21. smalltalk.send(smalltalk.send(html,"_p",[]),"_trapShow_",[["items"]]);
  22. return self}
  23. }),
  24. smalltalk.AppView);
  25. smalltalk.addClass('Name', smalltalk.TrappedFly, [], 'Trapped-Demo');
  26. smalltalk.addMethod(
  27. "_initialize",
  28. smalltalk.method({
  29. selector: "initialize",
  30. fn: function (){
  31. var self=this;
  32. smalltalk.send(self,"_payload_",["To-Do List"]);
  33. return self}
  34. }),
  35. smalltalk.Name);
  36. smalltalk.addClass('NameView', smalltalk.Widget, [], 'Trapped-Demo');
  37. smalltalk.addMethod(
  38. "_renderOn_",
  39. smalltalk.method({
  40. selector: "renderOn:",
  41. fn: function (html){
  42. var self=this;
  43. smalltalk.send(smalltalk.send(html,"_root",[]),"_trapShow_",[[]]);
  44. return self}
  45. }),
  46. smalltalk.NameView);