HelloApp.st 625 B

123456789101112131415161718192021222324252627282930
  1. Smalltalk createPackage: 'HelloApp'!
  2. Object subclass: #HelloApp
  3. instanceVariableNames: ''
  4. package: 'HelloApp'!
  5. !HelloApp methodsFor: 'action'!
  6. doAmberWith
  7. | tag |
  8. tag := (HTMLCanvas onJQuery: '#output-list' asJQuery) root.
  9. tag with: [ :html | html li with: 'Amber Web #with: added me!!' ]
  10. !
  11. doJQueryAppend
  12. '#output-list' asJQuery append: '<li>jQuery append added me!!</li>'
  13. ! !
  14. !HelloApp methodsFor: 'starting'!
  15. augmentPage
  16. '#amber-with' asJQuery click: [ self doAmberWith ].
  17. '#jquery-append' asJQuery click: [ self doJQueryAppend ]
  18. ! !
  19. !HelloApp class methodsFor: 'starting'!
  20. start
  21. self new augmentPage
  22. ! !