Widget 2.0 Stepper Only Incrementing

So the new widgets have totally broke my app, and I am so close to being finished. :S 

I am using the v1 tablebiew, because I am so close and version 1 was working perfectly and version 2 caused too many errors that I don’t have time to figure out.

but the v1 file released doesn’t contain the stepper in it, so I am using the version 2 stepper, but it is only incrementing.   I am creating the stepper in the tableViews onRowRender, where row is event.target.  

When I click on the minus of the stepper, the plus gets highlighted, and event.phase is always increment, and event.value only gets incremented.  Any ideas?  It just isn’t decrementing.   The only difference that I can tell between mine and the sample is that I am sticking it in a tableView.

local function onPress( event, row )             local phase = event.phase             print(phase)             print(event.value)             scoreValue = event.value                          row.value = scoreValue             text2:setText( scoreValue )         end                  -- Create a default stepper (using widget.setTheme)         local stepper = widget2.newStepper         {             left = display.contentWidth - measurements.m\_leftPadding,             top = row.height \* 0.5,             initialValue = scoreValue,             minimumValue = minValue,             maximumValue = 100,             onPress = function(event) onPress(event, row) return true end,         }         stepper.parent = row         stepper:setReferencePoint( display.CenterRightReferencePoint )         stepper.x = display.contentWidth - measurements.m\_leftPadding         stepper.y = row.height \* 0.5         stepper:setReferencePoint( display.CenterLeftReferencePoint )  

        

I figured it out.  Changing the reference point was what was making it only increment, when I set the reference point back to center after I placed everything, it worked.   Must be hit testing based on the reference point?

I figured it out.  Changing the reference point was what was making it only increment, when I set the reference point back to center after I placed everything, it worked.   Must be hit testing based on the reference point?

Hi,

I have the same strange behaviour with newStepper widget. Im using the build 1095.

I’m not using with a tableView but with a newText label.

Seem that the decrement event phase is missing when an

object is linked to the stepper in this way:

[lua]

myStepper.myLabelObj = newLabel

[/lua]

when you get the obj in the handler the

decrement phase is missed!

[lua]

local function onPress (event)

    local myLabel = event.target.myLabelObj

– After this you have no decrement!

end

[/lua]

After this you have no decrement

Have you found any workaround on this issue?

I’m afraid to use another boring way to bypass:(

Bye

Ale

Hi,

I have the same strange behaviour with newStepper widget. Im using the build 1095.

I’m not using with a tableView but with a newText label.

Seem that the decrement event phase is missing when an

object is linked to the stepper in this way:

[lua]

myStepper.myLabelObj = newLabel

[/lua]

when you get the obj in the handler the

decrement phase is missed!

[lua]

local function onPress (event)

    local myLabel = event.target.myLabelObj

– After this you have no decrement!

end

[/lua]

After this you have no decrement

Have you found any workaround on this issue?

I’m afraid to use another boring way to bypass:(

Bye

Ale