The takeFocus method is not working for me since updating to the latest daily build. Is anyone else running in to this issue?
Error:
“attempt to call method ‘takeFocus’ (a nil value)”
Code Snippet:
[code]
elseif event.phase == “moved” then – Check if you moved your finger while touching
local dx = math.abs( event.x - event.xStart ) – Get the x-transition of the touch-input
local dy = math.abs( event.y - event.yStart ) – Get the y-transition of the touch-input
if dx > 5 or dy > 5 then
scrollView:takeFocus( event ) – If the x- or y-transition is more than 5 put the focus to your scrollview
end
[/code] [import]uid: 64619 topic_id: 36432 reply_id: 336432[/import]
I think Danny from Corona is on this like a fat kid on cake. There are a few threads going on about this topic. I use the exact same thing in my game in the app store, so I’m in need of a quick fix as well. I found this in the comments section for the widgets 2.0 blog. I don’t know who wrote it, so sorry if I step on any toes.
I think Danny from Corona is on this like a fat kid on cake. There are a few threads going on about this topic. I use the exact same thing in my game in the app store, so I’m in need of a quick fix as well. I found this in the comments section for the widgets 2.0 blog. I don’t know who wrote it, so sorry if I step on any toes.
I think Danny from Corona is on this like a fat kid on cake. There are a few threads going on about this topic. I use the exact same thing in my game in the app store, so I’m in need of a quick fix as well. I found this in the comments section for the widgets 2.0 blog. I don’t know who wrote it, so sorry if I step on any toes.
I think Danny from Corona is on this like a fat kid on cake. There are a few threads going on about this topic. I use the exact same thing in my game in the app store, so I’m in need of a quick fix as well. I found this in the comments section for the widgets 2.0 blog. I don’t know who wrote it, so sorry if I step on any toes.
I tried sXc’s method, instead of using takeFocus which is currently not available for widget 2.0. Upon event.phase == "moved, i set focus to nil, then force my scrollview widget ( “scroller” in my case ) and instruct it to take control and do it’s thing. Hope that helps.