Widget 2.0 newStepper NO decrementing

HI all,

I’m using the newStepper widget on build 2013.1095.

The event phase of the widget I’ve created is still increment or maxLimit !!

Anyone has some ideas on how to fix or workaround?

What is wrong with this code…perhaps I’m missing something?

Please help!

[lua]

– Not DECREMENTING newStepper widget 2

local widget = require “widget”

local function onStepPress( event )

        local t = event.target

        print("newStepper Phase is: ", event.phase)

        t.myLab.text = event.value

end       

local function createSteppers(numStep)

        local stepGroup = display.newGroup()

        local label, stepper

        local xShift = 100

        local yShift = 200

        for i=1,numStep do      

                label = display.newText( “0”, 0, 0, native.systemFont, 58 )

                label:setReferencePoint( display.CenterReferencePoint )

                label:setTextColor(250, 0, 0)

                label.x = xShift

                label.y = yShift

                stepGroup:insert(label)

        – Create a stepper

                stepper = widget.newStepper

                {

                   id = i,

                  initialValue = 0,

                  labelSize = 42, 

                  minimumValue = -12,

                  maximumValue = 12,

                 onPress = onStepPress,

                }

                stepper.myLab = label

                stepper:setReferencePoint( display.CenterReferencePoint )

                stepper.x = label.x

                stepper.y = yShift + 45

                stepGroup:insert(stepper)

                xShift = xShift + 150

        end

        return stepGroup

end

local group = display.newGroup()

local lotOfSteppers = createSteppers(4)

        lotOfSteppers:setReferencePoint( display.CenterReferencePoint )

        lotOfSteppers.x = display.contentWidth/2

        lotOfSteppers.y = display.contentHeight/2 

        

group:insert(lotOfSteppers)

–END

[/lua]

Any suggestion are appreciated

Thanks in advance

Ale

Anyway… at the end we have rewrote a new Stepper using 2 newButton from widget library and adding an handler function to manage increment and decrement.

It does work now :slight_smile:

It sad to say that NO ONE word from Corona people about this and a lot of other open points affecting the widget 2.0 library that are not fixed at this time.

Redone stuff already done is a no sense and wasting time, as to reinvent the wheel any time due unfixed silly bugs.

I’m a very big fan of Corona SDK and Corona staff and I hope this will be fixed asap.

Let me know if some one need I can post the workaround code here.

Ale

Hi @ale,

There are several improvements being made to Widgets 2.0 as I write this, and more each day. Several of the reported bugs (and some that I’ve personally tested) are in fact a simple code error or a conversion error from 1.0.

For those that are genuine bugs, they’re being fixed in order of priority. This one in particular appears to be one of those, and I just tested and confirmed it. Thus, I’ll make sure it gets on the list for investigation and a fix a.s.a.p.

Thanks,

Brent

Brent,

the questions is how could W2 even pass your QA tests. We are spending XX of hours of this and its causing a LOT of frustration. 

Frank

Hi Frank,

This is actually a “regression” bug. Stepper worked fine when W2 was released, because I wrote the tutorial on Stepper, tested it, and it functioned exactly as it’s supposed to. I don’t know exactly how/when this issue slipped in, but I’ll make sure it gets resolved in a daily build upcoming very soon, as in next week at the latest.

Brent

I opened two tickets regarding this

Case 23372  

Case 23373 - is the more severe one, as no workaround !!!

This above behaviour shows when

a. you change the reference point. WA : set rp to CenterRp

b. you nest widget deeply in displayGroups. WA : n.a.

best

frank

Thanks Frank, I’ll check into both of these tomorrow. :slight_smile:

Brent, thanks. Please make sure you prioritize Case 23373. Thanks

Hello @ale and Frank,

I investigated all of these issues, and the common factor is that adjusting the reference points of Steppers (off the center point) is not supported. This applies to adjusting the reference points of groups that Steppers are contained in too (i.e. setting a group’s reference point to center, versus the normal top-left). Essentially, the touch location of the Steppers are based on the coordinates of the press in content space versus the position of the stepper. If you shift around the reference points of the Steppers and/or the groups off their “normal”, it tweaks the input coordinates given to the Stepper, which explains (@ale) why it appeared that the decrementing isn’t working.

So, long story short: we are likely going to fix Stepper to not be based on reference points, but it won’t happen overnight. This has been added to the “to do” list, but it will likely happen after some of the higher priority tasks are implemented for W2.0.

Best regards,

Brent

Brent,
 
thanks for your feedback.
 
I don’t completely agree with this. On top of the reference point issues, case 23373 is not using a single call to setReference point. This example states that deeply nesting (more than 1 group deep) is causing the issues.

Did you see this ?
Thanks
Frank

Brent, any comment on this ? Can you reproduce 23373 and confirm that deeply nesting also causes this issue ?

thanks
Frank

Hi Frank,

I’ll check into this tomorrow. I can’t recall the entire sample you submitted at this moment, but if you did any kind of manipulation of any group or nested group that contains the Stepper (x or y shift or scaling) then this is likely the issue. I’ll check out the code again tomorrow.

Take care,

Brent

Hey Frank, 

I have fixed both of these bugs and the fixes should be available to you shortly via daily builds.

Thanks

Thanks Danny. I will test and confirm once available.

Danny, preliminary tests show that the widget itself works. However, a new bug was introduced that makes the widgets react very slowly. I reported the bug : Case 23427. 

Frank

Danny,

the bug went away after uninstalling CL, installing the latest public build and then installing 1106.

Best
Frank

Hello Brent, Danny and Frank,

thanks for yours investigations and fixing. 

I have just download the daily 1108 and the steppers are working well…Thanks!!

I have an app that has a large use of widgets library, and seem that a lot of things are fixed now.  

I did not think that steppers are using coordinates in order to perform incr/decr… but make sense! :slight_smile:

Unfortunately other bugs are still open, I have a component in my app that use a newPickerWhell with a columColor that is not yet fixed.

http://forums.coronalabs.com/topic/33313-widget-20-newpickerwheel-columncolor-not-working-in-daily-build-1074/

Thanks anyway!

Ale

Anyway… at the end we have rewrote a new Stepper using 2 newButton from widget library and adding an handler function to manage increment and decrement.

It does work now :slight_smile:

It sad to say that NO ONE word from Corona people about this and a lot of other open points affecting the widget 2.0 library that are not fixed at this time.

Redone stuff already done is a no sense and wasting time, as to reinvent the wheel any time due unfixed silly bugs.

I’m a very big fan of Corona SDK and Corona staff and I hope this will be fixed asap.

Let me know if some one need I can post the workaround code here.

Ale

Hi @ale,

There are several improvements being made to Widgets 2.0 as I write this, and more each day. Several of the reported bugs (and some that I’ve personally tested) are in fact a simple code error or a conversion error from 1.0.

For those that are genuine bugs, they’re being fixed in order of priority. This one in particular appears to be one of those, and I just tested and confirmed it. Thus, I’ll make sure it gets on the list for investigation and a fix a.s.a.p.

Thanks,

Brent

Brent,

the questions is how could W2 even pass your QA tests. We are spending XX of hours of this and its causing a LOT of frustration. 

Frank