1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Location
    Brisbane
    Posts
    244
    Vote Rating
    3
    SuperRoo is on a distinguished road

      0  

    Default getting data from picker

    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
    20
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      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
    244
    Vote Rating
    3
    SuperRoo is on a distinguished road

      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.

Thread Participants: 1