Results 1 to 3 of 3

Thread: getting data from picker

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    246
    Vote Rating
    4
      0  

    Default getting data from picker

    Hi,
    I have an event on the "done" button that is supposed to get the values from the picker...all I get are nulls.
    Code:
    alert("Return: " + JSON.stringify(this.getValues()));
    Any ideas

  2. #2
    Sencha User jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    567
    Vote Rating
    21
      0  

    Default

    I'm not sure that this is your problem, but perhaps try using the 'change' event of the picker, rather than an event on the Done button? It's likely that the Done button's event handler runs before the values are committed.

    Also see the "Picker" tutorial at http://docs.sencha.com/architect/2-0...lays-section-3 which does something similar.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    246
    Vote Rating
    4
      0  

    Default

    thanks for this...found the problem.

    when I instantiate the picker I put it in an controller variable (this.picker).
    Then I just use this.picker.getValues() on the done button-tap event...works great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •