|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Missing penMove events?Hi,
I'm running Plua 2.0b10 on a LifeDrive (OS5) and I'm seeing some weird behaviour with gui.event(). On a given pen stroke, I will suddenly stop receiving penMove events until a penUp event is received. Sometimes this results in no penMove events at all; just a penDown on one side of the screen and a penUp on another. It's not that the events are intermittant; once they've stopped, I don't get any more for that stroke. I've written a little drawing program which illustrates the problem: -- pentest.lua while ev ~= appStop do ev, x, y = gui.event() if ev == penDown then screen.moveto(x,y) while ev ~= penUp do ev, x, y = gui.event() if ev == penMove then screen.lineto(x,y) end end end end If you make many small strokes on the screen, you should immediately see the problem. I've instrumented this code to keep a list of all received events and to display it list after you quit, and I can confirm that there are no other events received between the penDown and penUp. (Unrelatedly, I also get penUp events without penDown events when tapping on the menu. Weirdly, tapping on the menu bar results in a negative y coordinate and a very incorrect x coordinate, but the coordinates for tapping on menu items appear to be correct.) Thanks, Jeremy |
|
|
Re: Missing penMove events?Thank you for writing to me
I am a brazilian ( poor english ) but let me see You want to draw a line into PenDown and PenUp so your code would be ev = nil -- certifie the initial value while ev ~= appStop do ev, x, y = gui.event() if ev == penDown then -- if you ident your code screen.moveto( x,y) -- is more easy to understand while 1 do -- alter this ev, x, y = gui.event() if ev == penUp then -- and this screen.lineto( x,y) end --if penUp end --while penUp end --if penDown end -- while appStop I not try it, but I think is this Please Let te more I am trying to draw a button with bmp in plua 2 ou plua 1 and I dont get it ( the resource works only if build in a PC ??) Vinicius Esteves Palm Tungsten W ( OS 4.1) --- Jeremy Penner <jeremy@...> escreveu: > Hi, > I'm running Plua 2.0b10 on a LifeDrive (OS5) and I'm > seeing some > weird behaviour with gui.event(). On a given pen > stroke, I will > suddenly stop receiving penMove events until a penUp > event is > received. Sometimes this results in no penMove > events at all; just a > penDown on one side of the screen and a penUp on > another. It's not > that the events are intermittant; once they've > stopped, I don't get > any more for that stroke. I've written a little > drawing program > which illustrates the problem: > > -- pentest.lua > while ev ~= appStop do > ev, x, y = gui.event() > if ev == penDown then > screen.moveto(x,y) > while ev ~= penUp do > ev, x, y = gui.event() > if ev == penMove then > screen.lineto(x,y) > end > end > end > end > > If you make many small strokes on the screen, you > should immediately > see the problem. > > I've instrumented this code to keep a list of all > received events and > to display it list after you quit, and I can confirm > that there are > no other events received between the penDown and > penUp. > > (Unrelatedly, I also get penUp events without > penDown events when > tapping on the menu. Weirdly, tapping on the menu > bar results in a > negative y coordinate and a very incorrect x > coordinate, but the > coordinates for tapping on menu items appear to be > correct.) > > Thanks, > Jeremy > > Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento! http://br.mail.yahoo.com/ |
| Free embeddable forum powered by Nabble | Forum Help |