widget.newPickerWheel

This is a continuation of the discussion from the API page. http://developer.anscamobile.com/reference/index/widgetnewpickerwheel#comment-98104 [import]uid: 7559 topic_id: 24282 reply_id: 324282[/import]

Is there a way to get smaller rows ?
Every time I try to change parameters, il goes wrong.

Does someone have build another picker like function ?

Frédéric
[import]uid: 5578 topic_id: 24282 reply_id: 98517[/import]

I can not insert into a group a picker

it says : attempt to index global ‘myPickerCountry’ (a nil value)

[lua] local columnData = {}

– colonne 01
columnData[1] = {“France”, “Deutchland”, “Italia”, “Spaña”, “United Kingdom”, “Ubu Land”}
columnData[1].alignment = “center”

– creation du picker
picker = widget.newPickerWheel{
id=“myPickerCountry”,
height = 222,
font=“Helvetica-Bold”,
fontSize=18,
top=ui_topfw.height + ui_ann1fw.height,
columns=columnData
}

screenGroup:insert(myPickerCountry.view)[/lua]

Also, how to pass values from one scene to another ? [import]uid: 5578 topic_id: 24282 reply_id: 98536[/import]

On Retina Display,
Some items are replaced by a black square.
[import]uid: 5578 topic_id: 24282 reply_id: 98538[/import]

If you are using build 721 or newer, you no longer use the “.view” when inserting into a group. Use:

screenGroup:insert(myPickerCountry)

The new iPad Retina device may show black rectangles in place of text if you are using the latest daily builds (with the updated display.newText) and you are calling text functions that also upscale for retina displays. [import]uid: 7559 topic_id: 24282 reply_id: 98556[/import]

ok, thanks.

But what about these black rectangles ?
Will they disappear until the end of april ? :wink:

Frédéric

[import]uid: 5578 topic_id: 24282 reply_id: 98600[/import]

You need to file a bug report with a sample project that demonstrates the problem. [import]uid: 7559 topic_id: 24282 reply_id: 98670[/import]

Greetings,

I’m new to Corona. Is it possible to apply images to the PickerWheel rather than text?

Thanks [import]uid: 134429 topic_id: 24282 reply_id: 103341[/import]

Is there someway to insert an icon and text as a row instead of just text? [import]uid: 6317 topic_id: 24282 reply_id: 108325[/import]

Is there a working example of the picker wheel widget? When I copy and paste it in a new project it is broken, Data shows up with out any picker wheel.
[import]uid: 39480 topic_id: 24282 reply_id: 110729[/import]

Did this get answered? I see the same issue. The data is in a big whit box, but no picker wheel.

** Never mind. You need to copy the theme file and widget directory to your root. ** [import]uid: 52361 topic_id: 24282 reply_id: 112966[/import]

Any update on Android skin?

It looks really bad to have iOS skin on an Android device for the date picker. [import]uid: 48484 topic_id: 24282 reply_id: 118977[/import]

getValues does not return values when the display object has been scaled or moved according to:

http://developer.coronalabs.com/reference/index/widgetnewpickerwheel

I have found that if you hold the original position values inside the picker, you can quickly change the scale / position back to it’s original value, grab the value, then re-position the picker wheel.

[lua] --Create some data
local columnData = {)
columnData[1] = {“A”,“B”,“C”,“D”}
columnData[1].alignment = “center”

—Create our wheel
local sheetWheel = widget.newPickerWheel{
top = 80,
columns = columnData
}

–Save original x,y coordinates in the object itself
sheetWheel.savedX = sheetWheel.x
sheetWheel.savedY = sheetWheel.y

–scale and move:
sheetWheel.xScale = .25
sheetWheel.yScale = .20
sheetWheel.x = 345
sheetWheel.y= 60

–Change scale and position back to default values
sheetWheel.xScale = 1.0
sheetWheel.yScale = 1.0
sheetWheel.x= sheetWheel.savedX
sheetWheel.y= sheetWheel.savedY

–Grab our values (one value per picker wheel)
local selectedRows = sheetWheel:getValues(sheetWheel)

for i=1,#selectedRows do
print( selectedRows[i].value, selectedRows[i].index )
end

–change scale /Position back to where you want it
sheetWheel.xScale = .25
sheetWheel.yScale = .20

sheetWheel.x = 345
sheetWheel.y= 60[/lua] [import]uid: 135765 topic_id: 24282 reply_id: 119486[/import]

Hmm, looks like the Mac simulator is a little better than the pc. I am using the picker to help scale / rotate level elements in-game, its just for development, so as long as it works on my mac …

:slight_smile:
[import]uid: 135765 topic_id: 24282 reply_id: 119493[/import]

Is there a way to change the size of the pickerwheel? I am using two of them on one screen and it seems to big to me? [import]uid: 69302 topic_id: 24282 reply_id: 123134[/import]

@R.DELIA

I just started using pickerWheel and I think I am having the same issue as yours. If I use the code from the sample it seems to work fine but I needed to reduce the size of the picker using xScale and xScale (outside the picker def) and it seems that the value return is always the next one down (or even 2 values down? I am going to try your suggestion above (saving values) but I was hoping the picker was smart emough to return the correct index/value even if resize. Are any of the parameters useful to maybe address this problem of resize or is it a know bug that we need to leave with?

Thanks again for the potential solution. By the way. I am using the standard build prior to the one just release.

Mo

Edit: just a quick precision. My getValues always returns a value just not the correct one (one or two below the selected value from the list) [import]uid: 100814 topic_id: 24282 reply_id: 123500[/import]

@LairdGames,

What build of Corona are you using? [import]uid: 84637 topic_id: 24282 reply_id: 123544[/import]

Build 840. By the way would pickerWheel works on build 704 (previous public before 840)?

Thanks a lot Danny.

Mo

Ps: I was plaisantly surprise that I could see the pickerWheel on the simulator! The problem I am having shows up both PC/Mac sim and on the device (iphone4) [import]uid: 100814 topic_id: 24282 reply_id: 123558[/import]

Hey LairdGames,

Does this issue occur on the latest public release (v894)?

Also the soft-landing feature for the picker wheel is present in the latest public build, incase you want that :slight_smile:

If it does, can you please send us in a bug report? http://www.coronalabs.com/products/corona-sdk/rules-for-issue-submission/

If you can do that, I will investigate this asap. I am working on a bunch of widget bugs. [import]uid: 84637 topic_id: 24282 reply_id: 123586[/import]

Is there a way to change the size of the pickerwheel? I am using two of them on one screen and it seems to big to me? [import]uid: 69302 topic_id: 24282 reply_id: 123134[/import]