Moka-Controllers.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. (function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Moka-Controllers');
  3. smalltalk.addClass('MKButtonController', smalltalk.MKAspectController, [], 'Moka-Controllers');
  4. smalltalk.MKButtonController.comment="I am the default controller for `MKButtonView`.";
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "onPressed",
  8. category: 'actions',
  9. fn: function (){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. self._performAction();
  13. return self}, function($ctx1) {$ctx1.fill(self,"onPressed",{},smalltalk.MKButtonController)})},
  14. args: [],
  15. source: "onPressed\x0a\x09self performAction",
  16. messageSends: ["performAction"],
  17. referencedClasses: []
  18. }),
  19. smalltalk.MKButtonController);
  20. smalltalk.addClass('MKCheckboxController', smalltalk.MKAspectController, [], 'Moka-Controllers');
  21. smalltalk.MKCheckboxController.comment="I am the default controller for `MKCheckboxView`.";
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "onToggled:",
  25. category: 'actions',
  26. fn: function (aBoolean){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. self._performActionWith_(aBoolean);
  30. return self}, function($ctx1) {$ctx1.fill(self,"onToggled:",{aBoolean:aBoolean},smalltalk.MKCheckboxController)})},
  31. args: ["aBoolean"],
  32. source: "onToggled: aBoolean\x0a\x09self performActionWith: aBoolean",
  33. messageSends: ["performActionWith:"],
  34. referencedClasses: []
  35. }),
  36. smalltalk.MKCheckboxController);
  37. smalltalk.addClass('MKInputController', smalltalk.MKAspectController, [], 'Moka-Controllers');
  38. smalltalk.MKInputController.comment="I am the default controller for `MKInputView`.";
  39. smalltalk.addMethod(
  40. smalltalk.method({
  41. selector: "onEnterPressed:",
  42. category: 'actions',
  43. fn: function (aString){
  44. var self=this;
  45. return smalltalk.withContext(function($ctx1) {
  46. self._performAtionWith_(aString);
  47. return self}, function($ctx1) {$ctx1.fill(self,"onEnterPressed:",{aString:aString},smalltalk.MKInputController)})},
  48. args: ["aString"],
  49. source: "onEnterPressed: aString\x0a\x09self performAtionWith: aString",
  50. messageSends: ["performAtionWith:"],
  51. referencedClasses: []
  52. }),
  53. smalltalk.MKInputController);
  54. })(global_smalltalk,global_nil,global__st);