Mercurial > MadButterfly
diff nodejs/testcase.js @ 676:f264b50c469c
Bind subject of mouse_event to JS object of coord
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Fri, 06 Aug 2010 13:33:47 +0800 |
parents | c9f8c7e6f57e |
children | 799c852b9065 |
line wrap: on
line diff
--- a/nodejs/testcase.js Fri Aug 06 00:56:26 2010 +0800 +++ b/nodejs/testcase.js Fri Aug 06 13:33:47 2010 +0800 @@ -51,3 +51,10 @@ mb_rt.redraw_changed(); }, 20); setTimeout(function() { sys.puts("timeout"); }, 1000); + +sys.puts(root.subject); +var observer; +/* Mouse button pressed */ +observer = root.subject.add_event_observer(4, function() { + sys.puts("mouse"); + });