Hybrid View

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    3
    Vote Rating
    0
    SuperTron is on a distinguished road

      0  

    Question Toggle.setValue() and NestedList.Add() Problems

    Toggle.setValue() and NestedList.Add() Problems


    Hey there,

    I am trying to make an app which takes some info from a server using JSON and changes a nested list and a slider based on it. However, I can't seem to be able to set toggle values, or add things to a nested list in the callback function of the Json request. Here is some of the code I am using to do this:

    Here is how I am trying to set the sliders:
    Code:
                       
    Ext.getCmp('shareLocationToggle').setValue(Number(1));
    and here is how I am trying to add to the Floating nested list:
    Code:
    var temp = Ext.getCmp('NestedListID').add(
                         {
                            text: 'someText',
                            handler: showCenteredOverlay
                       
                         });
    However, when I try to set the value of the toggle it completely stops the callback function and the app freezes, and if I try to do an add to the nested list the callback finishes, but the add does not happen. Does anyone have any ideas as to what I'm doing wrong? Any help would be greatly appreciated. Thanks beforehand!

    Cheers,
    Lukas

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,645
    Vote Rating
    583
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    It's a little bit vague to offer any suggestions, have you tried running it in the debugger? Does it throw any errors?

    Try and post some code we can run locally.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Similar Threads

  1. add new items to nestedlist
    By Alexander.K in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 7 Sep 2010, 6:17 PM
  2. Is it possible to use a NestedList in a formPanel?
    By profunctional in forum Sencha Touch 1.x: Discussion
    Replies: 5
    Last Post: 14 Jul 2010, 8:26 AM
  3. LovCombo in EditorGridPanel setValue problems
    By cedlabal in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 21 May 2010, 8:13 AM
  4. Problems with add->remove->add component in Window
    By col in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 28 Jan 2010, 7:30 AM
  5. Feature Suggestion: Add a bool to setValue() to dirty the field/form or not
    By zhegwood in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 24 Mar 2009, 8:07 AM

Thread Participants: 1