1. #1
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default Answered: getActiveItem().update(data) works on browser but not on iPhone Simulator

    Answered: getActiveItem().update(data) works on browser but not on iPhone Simulator


    Hello everyone,
    I looked everywhere and tried everything I couldn't find a solution.
    I have a TabPanel with Components as tabs. I am trying to update tab content with a JSONP request when opened.
    I used the following code to update the content :
    Code:
    tabs.getActiveItem().update(data);
    (tabs it the name of my TabPanel)

    It worked fine on Safari, but doesn't on the iPhone Simulator. The data is well received, but the component doesn't update. Can you guys give me a hand please ?

    Thanks in advance.

  2. Here is the workaround I found.
    I place a listener on the tab I want to update when opened :
    Code:
    listeners: {
            show: function(){
               Ext.ControllerManager.get('MyController').updateFunctionInController();
            }
        },
    In my controller, the function gets the data through a JSONP request and then call a refresh function in the view, passing the data and the object id to update.
    In the view, you have this method :
    Code:
     refresh: function(data,id) {
            this.getComponent(id).update(data);
        },
    You obviously need to add IDs to your objects to be updated.

    If anyone needs help with this, don't hesitate to contact me.

  3. #2
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    Here is the workaround I found.
    I place a listener on the tab I want to update when opened :
    Code:
    listeners: {
            show: function(){
               Ext.ControllerManager.get('MyController').updateFunctionInController();
            }
        },
    In my controller, the function gets the data through a JSONP request and then call a refresh function in the view, passing the data and the object id to update.
    In the view, you have this method :
    Code:
     refresh: function(data,id) {
            this.getComponent(id).update(data);
        },
    You obviously need to add IDs to your objects to be updated.

    If anyone needs help with this, don't hesitate to contact me.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    21
    Vote Rating
    0
    dash74 is on a distinguished road

      0  

    Question Same problem with Blackberry simulator and real device

    Same problem with Blackberry simulator and real device


    Hi Siebmanb,

    I'm a newbye and I'm trying to write some code using Sencha Touch 2 B3.
    Your Tab is a list for me populated by a Jsonp request and like:

    notesLists = Ext.create( 'Ext.List', {
    id: 'notesList',
    flex: 1, .
    itemTpl: '<div class="list-item-title">{Surname}...........................

    My list is populated by Jsonp request:

    notesLists.updateData(data); //when the request exit with success

    I don't have a Control definition so I can't figure out how to adapt your code.
    The only way to run my code with success is to run it on Chrome browser.

    Any help is appreciated.

    David

  5. #4
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    Hello,

    Sencha Touch 2 is really different from ST1.X. I don't really know how to help you.
    What do you mean by "it only works in Chrome" ? Then where does it not work ?

    Regards,

  6. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    21
    Vote Rating
    0
    dash74 is on a distinguished road

      0  

    Default


    Hi Siebmanb,

    it's in my previous title , my code works very well in Ripple emulator and in Chrome,
    but I can't see anything (data rows) neither in a real Blackberry device or in a simulator (they are
    with built in webkit browser)
    Can you show me how to do with ST 1.X? My original code is in this versione (grabbed from Internet) but I'm translating it to the new version.

    David

  7. #6
    Sencha User siebmanb's Avatar
    Join Date
    Aug 2011
    Location
    Geneva (CH) - Grenoble (FR)
    Posts
    253
    Answers
    11
    Vote Rating
    15
    siebmanb will become famous soon enough

      0  

    Default


    Ok sorry for not reading the title.

    My code changed a lot since that post and I don't have those lines anymore. But the fact that it works in some browser/simulator and not others makes me think it is not related to the overall code but to one small specificity on the BlackBerry. And I never coded on BB so I can't really help you. Sorry...

    Good luck.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar