Why was the onDrag parameter for widget.newButton removed.
It was pretty handy…
And it basically does the same as (event.phase == “moved”) of onEvent, so no additional work for you guys no?
Why was the onDrag parameter for widget.newButton removed.
It was pretty handy…
And it basically does the same as (event.phase == “moved”) of onEvent, so no additional work for you guys no?
Can you explain the benefits of this as opposed to just using onEvent?
Thanks
Well… the code looks neater this way :D
I mean,
onPress = onPress, onRelease = onRelease, onDrag = onMoved,
is way more neat than
onEvent = function(event) if event.phase == "press" then onPress(event) end elseif event.phase == "moved" then onMoved(event) end elseif event.phase == "release" then onRelease(event) end end
don’t you think?
Plus, I thought it was a bit weird that you guys deprecated only onDrag, and not onPress and onRelease…
Thats the reason I asked…
Can you explain the benefits of this as opposed to just using onEvent?
Thanks
Well… the code looks neater this way :D
I mean,
onPress = onPress, onRelease = onRelease, onDrag = onMoved,
is way more neat than
onEvent = function(event) if event.phase == "press" then onPress(event) end elseif event.phase == "moved" then onMoved(event) end elseif event.phase == "release" then onRelease(event) end end
don’t you think?
Plus, I thought it was a bit weird that you guys deprecated only onDrag, and not onPress and onRelease…
Thats the reason I asked…