Trapped-Demo.deploy.js 885 B

12345678910111213141516171819202122232425262728293031
  1. smalltalk.addPackage('Trapped-Demo', {});
  2. smalltalk.addClass('App', smalltalk.TrappedPlainModel, [], 'Trapped-Demo');
  3. smalltalk.addMethod(
  4. "_initialize",
  5. smalltalk.method({
  6. selector: "initialize",
  7. fn: function (){
  8. var self=this;
  9. smalltalk.send(self,"_initialize",[],smalltalk.TrappedPlainModel);
  10. smalltalk.send(self,"_payload_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("items","__minus_gt",[["hello", "world"]]),smalltalk.send("title","__minus_gt",["To-Do List"])])]);
  11. return self}
  12. }),
  13. smalltalk.App);
  14. smalltalk.addClass('AppView', smalltalk.Widget, [], 'Trapped-Demo');
  15. smalltalk.addMethod(
  16. "_renderOn_",
  17. smalltalk.method({
  18. selector: "renderOn:",
  19. fn: function (html){
  20. var self=this;
  21. smalltalk.send(smalltalk.send(html,"_h2",[]),"_trapShow_",[["title"]]);
  22. smalltalk.send(smalltalk.send(html,"_p",[]),"_trapShow_",[["items"]]);
  23. return self}
  24. }),
  25. smalltalk.AppView);