Temporary replacement for missing Picker control?

Has anyone come up with a solution for the missing Picker control in iOS builds? I’m currently considering using a Table and making it as tall as the section title and one row, but that feels too kludgy.

BTW - is there a feature request for the Picker and Data Picker controls?

That has been discussed in beta, but amazingly enough there is no feature request in Feedback. You should definitely make one.

I vaguely remember discussions about declares. Yeah. That was about Date Picker in Beta https://forum.xojo.com/16643-datepicker-in-ios

I looked at the picker and as a workaround, I would try using a table, and fading out the text color up and down. It would not have the wheel effect of text seen in perspective distortion, but it could be close enough. That said, using iOSCellData, one could paint the text that way, or compress it.

If I have time, I will try doing it.

Unless one of our declare guru can come up with the native picker, of course :slight_smile:

Done:

<https://xojo.com/issue/37247>

That bit of work from @jim mckay has just introduced me to some new points of frustration - no more “rnd”, ValueforKey has disappeared from the Dictionary class, and odd errors when assigning width values to controls via code.

Jim, if you’re around, have you tested that project in 14r3 release?

I’m still running on Mediterranean time, or I’d have shut this all off hours ago :frowning:
– in fact, I believe it’s time for a bit of Destiny!

I don’t see valueforkey in the old language reference. You should be able to use “lookup” method of the new dictionary class.

There is RandomInt as part of the math namespace.

I believe that direct height and width of controls are supposed to be read only now. Due to auto-layout, you would have to apply iOSLayoutConstraint settings to your control.

They changed some of the Dictionary APIs. They now more accurately mimic the current framework.

So Xojo.Core…Dictionary.Value(key) is how you get the value. Xojo.Core.Dictionary.Lookup(key) is how you do a lookup. Just like the old framework.

WOW… while in my opinion a UITABLEVIEW is one of the more difficult controls to deal with in ObjC/Swift, a Picker is less complex, and a DatePicker is even simpler, yet these are not implemented yet? I also noticed that ProgressWheel is implemented only as SMALL, and didn’t even bother to extend it to be in color (trivial to do by the way)… Haven’t explored all of it yet, but now am wondering what else is missing? or not fully implemented

Actually, Norman says that Pickers have some tricky elements to them.

There’s a LOT of items that are not yet implemented. We have a basic set of controls so far. They have promised to add more with each release. I think the point was to get it out sooner with fewer controls rather than later with everything. Not a bad approach because a lot of apps can be built with the control set available.

I agree. We can now start to get used to the new way of doing things regarding iOS as the target, and controls will be added / improved gradually.

Much better than just having vapourware, with everyone guessing. It will probably take a while (for me at least), to get used to this new way of working anyway.

YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:

UIPicker download

Thanks Paul. I’ll compare the two versions to see what changed in release.

We both know a ProgressWheel is relatively easy to create. I have done so during the beta stage. But indeed it is strange that when the native control allows bigger size, the Xojo implementation be so limited.

[quote=150836:@Paul Lefebvre]YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:

UIPicker download[/quote]

It rocks ! Thank you Paul :slight_smile:

[quote=150836:@Paul Lefebvre]YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:

UIPicker download[/quote]

Is there a way to create a library of these somewhere? I know some other folks had worked on declare based controls as well. Until Xojo comes out with “real” controls, these are what we are left with. It would just be nice to have one place where we can go to post and download controls like this… Do the forums allow for this?

It would be nice to start a MaciOSLib fork. :slight_smile:

[quote=150836:@Paul Lefebvre]YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:

UIPicker download[/quote]
This is great.

Can this be done for other kinds of missing controls?

[quote=151466:@Andres Montoya]This is great.

Can this be done for other kinds of missing controls?[/quote]
Certainly. Did you have any in mind?

[quote=151466:@Andres Montoya]@Paul Lefebvre YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:
UIPicker download [/quote]

How can you set the UIPicker to a certain row/column? Could not find a GET and SET property.
Preferably animated (so you can see the UIPicker scrolling to the value you want.

Use the SelectedRow method. Everything is 0 indexed.

[quote=150997:@Michel Bujardet]@Paul Lefebvre YMMV, but I updated Jim McKay’s Picker example to work in 2014r3:
UIPicker download
It rocks ! Thank you Paul :)[/quote]

But doesn’t build (gives compile error). Only works in the simulator.