From c755752879980e9e21b36e2d5e21d7d664b83ca1 Mon Sep 17 00:00:00 2001 From: James Roseborough Date: Thu, 2 Jan 2014 06:23:08 +0000 Subject: [PATCH] Update swingapp example to expect os.time to be in seconds. --- examples/lua/swingapp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/lua/swingapp.lua b/examples/lua/swingapp.lua index 2e1b6f0f..03669446 100644 --- a/examples/lua/swingapp.lua +++ b/examples/lua/swingapp.lua @@ -32,7 +32,7 @@ tick = luajava.createProxy("java.lang.Runnable", { run = function() swingUtilities:invokeLater(tick) if os.time()< tnext then return thread:sleep(1) end - tnext = math.max(os.time(),tnext+1000/60) + tnext = math.max(os.time(),tnext+1/60) pcall(animate) pcall(render) label:repaint(0,0,0,640,480) @@ -95,7 +95,7 @@ label:addMouseListener(luajava.createProxy("java.awt.event.MouseListener", { })) label:addMouseMotionListener(luajava.createProxy("java.awt.event.MouseMotionListener", { mouseDragged = function(e) - --print('mouseDragged', e:getX(), e:getY(), e) + --pri:wnt('mouseDragged', e:getX(), e:getY(), e) x2,y2 = e:getX(),e:getY() end, -- mouseMoved= function(e) end,