123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <!doctype html>
- <html>
- <head>
- <title>Trapped - Counter example</title>
- <style>
- [data-trap] {
- display: none
- }
- button {
- font-family: monospace;
- }
- </style>
- <script src="../bower_components/amber/support/amber.js"></script>
- <script type='text/javascript' src='../bower_components/amber/support/requirejs/require.min.js'></script>
- <script type="text/javascript">
- var blackboard;
- require.config({
- paths: {
- 'gh_herby_trapped': '../js',
- 'gh_herby_trapped_counter': 'js',
- 'gh_herby_trapped_counter/_source': 'st'
- }
- });
- require(
- ["amber/devel",
- "gh_herby_trapped/Trapped-Processors", "gh_herby_trapped_counter/Trapped-Counter" ],
- function (smalltalk) {
- smalltalk.defaultAmdNamespace = 'gh_herby_trapped_todo';
- smalltalk.initialize();
- $(function () {
- smalltalk.Browser._openOn_(smalltalk.App);
- blackboard = smalltalk.App._new();
- smalltalk.Trapped._start_([blackboard]);
- });
- }
- );
- </script>
- </head>
- <body>
- <h2 data-trap="App #value"></h2>
- <button data-trap="App: (signal increment) whenClicked">++</button>
- <button data-trap="App: (signal decrement) whenClicked">--</button>
- </body>
- </html>
|