Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Picker Example Code

Apologies in advance - I know this has already been asked, but I'm having trouble following the flow of questions/answers/responses in this "forum" … and the ticket(s) in lighthouse aren't really very clear either.

Android 1.6 API, Titanium Dev 1.2.1, Titanium SDK 1.4

I can't make picker's work - period.

The 1.4 Kitchensink does not incorporate the sample picker modules. I've tried putting them into a blank app, and they bomb.

I guess I'm asking 1) do pickers work for Android in 1.4?, If yes, are there working samples someplace that I can examine?

(I read in a post here that in KS you can go to "Controls" –> "Pickers" … in 1.4, that's not an option)

Thanks in advance for your help :)

— asked November 29th 2010 by Richard Brents
  • android
  • picker
0 Comments

2 Answers

  • Accepted Answer

    Richard

    If a KS example is disabled for android, simply comment out the relevant parts of the main_windows/*.js file. For example, to enable the picker menu, comment out lines 15, 16 and 22 of main_windows/controls.js. Of course, some examples may crash the app, but those are the functions that are not yet supported.

    Regarding pickers, they work for me on the latest continuous build of 1.4.X and 1.5.X. See this video of it running in 1.4.X (ignore the tab problem - this is caused by 1.4 not supporting JSS, unlike 1.5).

    — answered November 30th 2010 by Paul Dowsett
    permalink
    3 Comments
    • I didn't want to modify the KS code, so I put the modules in a seperate app. However, I commented out those KS lines as you suggested … and all pickers fail in KS 1.4.0.

      Which version of the SDK is the app in that video running?

      As for continuous builds, I've been holding off on upgrading because I've been waiting for somebody to say that version x.x.x is stable. Is there a stable version > 1.4.0?

      — commented November 30th 2010 by Richard Brents
    • Okay, so I bit the bullet and installed 1.4.3. The pickers do work as you said. (Even though I think I've decided to switch to a webview and use dropdown boxes instead)

      Thanks for your help :)

      — commented November 30th 2010 by Richard Brents
    • You're welcome! :)

      — commented November 30th 2010 by Paul Dowsett
  • I don't believe they are. I ended up faking it out by using an options dialog. I haven't tried with the 1.5 series nightly builds.

    — answered November 29th 2010 by Tim Poulsen
    permalink
    1 Comment
    • Thanks. I guess I hadn't thought about an options dialog … kinda changes my strategy a bit to go that route, but I appreciate the input :)

      — commented November 30th 2010 by Richard Brents
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.