PIcker wheel soft landing

Its great to see the new features being added, and some fixes to the widget api, however, is there an eta on fixing the picker wheel soft landing bug?

This is the only thing that is stopping me moving from .644 and benefiting from many new features that customers would love and to be honest I would prefer to see this fixed before adding new features to the widget library e.g. horizontal scrolling

good job so far though!

[import]uid: 103163 topic_id: 20011 reply_id: 320011[/import]

Hi,

Are you talking about it not locking on one?

if so, i have a work around of sorts, using the fact that you can specify a start index.

basically it watches where it is every cycle and removes and replaces it every x cycles.

works better on device with touch than mouse.

my picker only has one column, but i guess you could apply the same theory to each.
i included my picker generation just in case i missed something-like the fact that i pass the position to the function(tabpos)

  
-----------------------------------------------------  
--create picker function  
-----------------------------------------------------  
local columnData = {}  
local function refpicker(tabpos)  
 local index = tabpos  
 widget.setTheme( "enqapp.theme\_ios" )  
  
 -- create table to hold all column data  
 --local columnData = {}  
   
 -- create column  
 columnData[1] = { "AD - Academic Department", "AS - Academic Support", "BMG - BioMed Grid",  
 "CD - Collections Development", "CS - Customer Support", "CORP - Corporate Support", "DA - Digital Access",  
 "DILT", "DS - Data Services", "EMT - Extended Management Team", "Enq - Enquiries Support", "Env - Environment",  
 "Fac - Facilities","HR - Human Resources","ITS - IT Services","LG -Learning Grid","MRC -Modern Records Centre",  
 "Proc - Procurement","RD - Research Exchange","TG - Teaching Grid","WRAP","Other" }  
 columnData[1].alignment = "left"  
 columnData[1].width = 430  
 columnData[1].startIndex = index  
   
 -- create the actual picker widget with column data  
 picker = widget.newPickerWheel{  
 id="myPicker",  
 font="Helvetica-Bold",  
 width = 420,  
 glassWidth = 450,  
 totalWidth = 550,  
 left = centre-275,  
 top=328,  
 columns=columnData  
 }   
end--end of picker function  
-----------------------------------------------------  
  
--------------------------------------------------------  
--picker fix  
--------------------------------------------------------  
local p = 1  
local offset = 30  
function testerss(event)  
 if p == offset then  
 local selectedRows = picker:getValues()  
 for f = 1,#columnData[1] do  
 if selectedRows[1].value == columnData[1][f] then  
 --print("actual value ",columnData[1][f])  
 picker:removeSelf()  
 picker = nil  
 refpicker(f)  
 --print("memcheck ",system.getInfo("textureMemoryUsed")/1000000)  
 end  
 end  
 offset = offset+30  
 end  
 if p == 300 then p = 0;offset = 30 end  
 p = p + 1  
 end  
  
Runtime:addEventListener( "enterFrame", testerss )  
--------------------------------------------------------  
--end of picker fix  
--------------------------------------------------------  
  

Rob [import]uid: 2131 topic_id: 20011 reply_id: 78042[/import]

Thanks Rob
I will have a look at this code later on. [import]uid: 103163 topic_id: 20011 reply_id: 78043[/import]

Hello,

does anyone of you have it working together with the storyboard API?

Jürgen [import]uid: 19590 topic_id: 20011 reply_id: 78787[/import]

@Rob: Thanks for sharing your code!

@jpenne: You should be able to apply Rob’s logic just fine in conjunction with the pickerWheel code used in the WidgetDemo in:

/SampleCode/Interface/WidgetDemo

Be sure you’re using the latest daily build, and you’ll see how the widgets play very nicely with storyboard now. [import]uid: 52430 topic_id: 20011 reply_id: 78823[/import]