Another pickerWheel question - rollover effect not working (for me)

Hello all,

I’m still having trouble on doing a basic implementation of the date pickerWheel.

The “roll over effect” of the date, month, or year sometimes works and sometimes doesn’t work for me properly.

That is, when I place the pickerWheel in between Jan and Feb. it sometimes rolls over to the prev. month (Jan) or the next month (Feb) or

    it just stays in the middle.

The problem is when it stays in the middle. 

[sharedmedia=core:attachments:1036]

After I click the button (to get the values from the pickerWheel)  which calls the function 

   values = pickerWheel:getValues()                  -- Update the status box text         statusText.text = "Column 1: " .. values[1].value .. "\nColumn 2: " .. values[2].value .. "\nColumn 3: " .. values[3].value  

And when I go to see the value, I get 

Runtime error

: attempt to index field ‘?’ (a nil value)

stack traceback:

        [C]: ?

        …: in function  '_onRelease’

        ?: in function '?'

        ?: in

Here is the complete code

local widget = require( "widget" ) local storyboard = require( "storyboard" ) local scene = storyboard.newScene() local values local pickerWheel local columnData local days = {} local years = {} -- Our scene function scene:createScene( event )     local group = self.view          -- Display a background     local background = display.newImage( "some\_screen\_background.png", true )     group:insert( background )          -- Status text box     local statusBox = display.newRect( 50, 60, 210, 80 )     statusBox:setFillColor( 0, 0, 0 )     statusBox.alpha = 0.4     group:insert( statusBox )          -- Status text     local statusText = display.newText( "Press the values button to show the current values.", 80, 350, 200, 0, native.systemFont, 18 )     statusText.x = statusBox.x     statusText.y = statusBox.y - ( statusBox.contentHeight \* 0.5 ) + ( statusText.contentHeight \* 0.5 )     group:insert( statusText )          ---------------------------------------------------------------------------------------------     -- widget.newPickerWheel()     ---------------------------------------------------------------------------------------------               for i = 1, 31 do         days[i] = i     end          for i = 1, 44 do         years[i] = 1969 + i     end          -- Set up the Picker Wheel's columns     columnData =      {          {              align = "right",             width = 150,             startIndex = 5,             labels =              {                 "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"              },         },                  {             align = "left",             width = 60,             startIndex = 18,             labels = days,         },                  {             align = "center",             width = 80,             startIndex = 10,             labels = years,         },     }              -- Create a new Picker Wheel     pickerWheel = widget.newPickerWheel     {         top = 210,         font = native.systemFontBold,         columns = columnData,     }     group:insert( pickerWheel )                    local function showValues( event )         -- Retrieve the current values from the picker         values = pickerWheel:getValues()                  -- Update the status box text         statusText.text = "Column 1: " .. values[1].value .. "\nColumn 2: " .. values[2].value .. "\nColumn 3: " .. values[3].value                  -- Update the status box text position         statusText.x = statusBox.x         statusText.y = statusBox.y - ( statusBox.contentHeight \* 0.5 ) + ( statusText.contentHeight \* 0.5 )                  pickerWheel.isVisible = false                  return true     end               local getValuesButton = widget.newButton     {         left = 10,         top = 150,         width = 298,         height = 56,         id = "getValues",         label = "Values",         onRelease = showValues,     }     group:insert( getValuesButton )               local function showWheel( event )         -- show the wheel again         pickerWheel.isVisible = true                  return true     end               local getWheelButton = widget.newButton     {         left = 310,         top = 150,         width = 298,         height = 56,         id = "getValues",         label = "Show Wheels",         onRelease = showWheel,     }     group:insert( getWheelButton )          end scene:addEventListener( "createScene" ) return scene  

Could it be the config.lua file?

  application =    {       content =       {          width = 640,          height = 960,          scale = "letterBox",          xAlign = "center",          yAlign = "center",          imageSuffix =          {             ["@2x"] = 1.5,             ["@4x"] = 3.0,          },       },    }  

This is a known bug.  Engineering is working on it.

Rob

Has this been solved? or this bug is still there? 

Im having the same issue

I was messing around with it earlier this week and it seems to be snapping and not landing in between, but my attempts were pretty limited.

Rob

Rob im experiencing another “weird” behavior with the picker wheel. When you scroll, the picker wheel keeps rolling untill its stops and immediatly after it stops it scrolls back to the same value from where it began or some other value next to it. This is happening in the simulator AND in an android device (HP 7’ tablet). ¿Any ideas?

The forums say you are a starter account, so those fixes have not been rolled out to the public build yet.  We are working on getting these out to the Starter and Basic accounts sooner than later.

Rob

Thank you Rob :smiley:

This is a known bug.  Engineering is working on it.

Rob

Has this been solved? or this bug is still there? 

Im having the same issue

I was messing around with it earlier this week and it seems to be snapping and not landing in between, but my attempts were pretty limited.

Rob

Rob im experiencing another “weird” behavior with the picker wheel. When you scroll, the picker wheel keeps rolling untill its stops and immediatly after it stops it scrolls back to the same value from where it began or some other value next to it. This is happening in the simulator AND in an android device (HP 7’ tablet). ¿Any ideas?

The forums say you are a starter account, so those fixes have not been rolled out to the public build yet.  We are working on getting these out to the Starter and Basic accounts sooner than later.

Rob

Thank you Rob :smiley:

Has this been solved yet? I’m in public Version 2013.2100 (2013.12.7) and still nothing :s

Never mind… Today i finally solved this issue… the thing was that I was inserting the pickerwheel into the Localgroup and that seams to mess with it.  

Has this been solved yet? I’m in public Version 2013.2100 (2013.12.7) and still nothing :s

Never mind… Today i finally solved this issue… the thing was that I was inserting the pickerwheel into the Localgroup and that seams to mess with it.