is there any up-to-date documentation on how to customise this anywhere, please?
These widgets seem to be a bit of a mess. Is anyone actually working on these?
-
No up-to-date docs on how to customise the onOff switch, i.e, custom images.
-
pickerWheel has plenty of bugs and/or missing functionality
e.g. can’t set the index of a column after instantiating wheel
columnData[1].startIndex = 7
doesn’t work
Have also tried:
timeWheel._view._columns[1]:scrollToIndex(5)
but this treats Index as an offset, so increases it by 5, not setting it at 5.
If there is an answer to these faults, can somebody from Ansca please tell me where in the docs they are??
Ignoring forum posts is not a good solution.
‘getValues’ function for pickerWheel returns nothing, when you only move the second column.
in new tableView
setting the height of the rows makes no difference.
am using the:
list:insertRow{
height = 100,
etc
ok, ignore the docs, to change the height of a row, use rowHeight=100
not height=100
would still like a working pickerWheel and customised onOffSwitch, anyone?
Hey admin20, you have a lot of things going on there.
First things first, what version of Corona are you currently using? PickerWheels are working fine, take a look at SampleCode/Interface/WidgetDemo tab3.lua to see an example of the pickerWheel in action.
Thanks for the answer Danny!
Am using the latest Corona build. The pickerWheel works to a degree, but cannot reliably set the index of a column, see post 3 above. What is the correct command for this, as the docs aren’t clear.
thanks
Latest build has also broken reverse geocoding for Android (mapAddressHandler). Was working fine last week.
Not a fun day!!
If you look at the sample code I mentioned above it clearly shows how you must set up your pickerWheel columns. Play around with the widget demo, you will see that startIndex does indeed start at the correct index.
You can modify startIndex in the sample to see this also.
The main point is how you structure your columnData table, I advise you stick with the format we use in the widget demo.
thanks Danny, but I’m not a newb
We need to be able to set and change the index of columns after the pickerWheel has been set up. startIndex doesn’t affect the pickerWheel after it has already been set. Maybe the original post wasn’t clear enough.
timeWheel._view._columns[1]:scrollToIndex(5)
does affect the wheel, but treats index as an offset, so increases it by 5, not setting it at 5.
We need to set each column index based on later events.
Just to be clear, I never implied you were a newb
Right so I missed the part when you said “after creation” sorry about that.
I just tested your idea using the widget demo as a testbed and it worked as expected on build 1076, are you definitely on that version of corona?
Thanks
Edit: After seeing what you are trying to achieve here I have realised the pickerWheel also needs a scrollToIndex function to prevent using that unsupported line of code you posted. Will have this rolled out in one of the next few daily builds.
great - thanks for your answer.
yes, need either a scrollToIndex or setIndex (after) creation. If you have the setIndex working in a later event, could you post the code?
Any pointers on how we get the latest onOffSwitch to work with our own graphics (see first post)?
I tested using the same code which you provided. Just to confirm again, you are using build 1076 correct?
Regarding the on/off switch theming/skinning, I am in the process of writing a theming guide along with showing the images we use internally so you have a better idea on what is expected of a custom theme.
yes 1076, and an earlier one in parallel.
what did the code do for you?
On 1076 I opened the widget demo, (tab 3.lua) and changed the start index of the first column to 1, then used your code to scroll it to the 5th index. It worked as expected. Are you not seeing that?
yes, but then try to change to another index after that.
subsequent scrollTo calls don’t work as expected.
a second scrollToIndex(5), lands it at 10, then 15, and so on.
just tried that, still works fine. Stays on row 5.
Are you 100% sure you are testing this on daily / public build 1076? The issue you are talking about was fixed a week or more ago.
Yes, 1076 now. Seems to work ok initially, but need some further testing.
If I create a pickerWheel, use scrollToIndex for both of the two columns, then do ‘:getValues()’, the getValues only returns an index if you have manually changed it (by touch).
If you only change column 1, then getValues doesn’t return column 2, and visa versa.
Would be more useful, if getValues returned all the values.
ok, double tested.
set up a pickerWheel, with an initial
‘timeWheel._view._columns[1]:scrollToIndex(2)’
works fine.
If you repeat this line immediately after this, it also works fine.
Problem is when you have later event, e.g.
set up a button that runs the same line:
timeWheel._view._columns[1]:scrollToIndex(2)
Each time, you click the button, the pickerWheel advances by 2, and will never go back to index 2.
:scrollToIndex has appeared in latest build for pickerWheel. What is the format for this?
pickerWheel:scrollToIndex(2) fails as does pickerWheel:scrollToIndex(1,2) - we need to identify the column and index.
The old undocumented way timeWheel._view._columns[1]:scrollToIndex(5) also fails now.