jgostylo
16 Aug 2011, 7:43 PM
I am having a lot of issues with my app and it all seems to revolve around doComponentLayout not behaving how I expect it to. I wanted to list out the issues I am having so that hopefully people can direct me to work arounds or tell me what I am doing wrong.
mapButton.update(place);
mapButtonContainer.show({type: 'slide', direction: 'up'});
Ext.getCmp('idMapsearchcard').doComponentLayout();
mapButton.update(place);
In this example I am updating the XTemplate I am using to populate the button content. I show the button container which means that I call a doComponentLayout because I believe it requires a recalculate. I am calling the update for the XTemplate again because I depend on the data member of the button and after doComponentLayout is called the data member is gone for some inexplicable reason.
mapButtonContainer.hide();
this.mapPanel.doComponentLayout();
In this example I am hiding the mapButtonContainer and then calling doComponentLayout on its parent panel. The button and container no longer render but the space they occupied are still empty instead of being filled by the rest of the container contents.
I am also having a lot of issues with doComponentLayout causing my map to disappear altogether.
I have noticed that manually resizing my browser (when I am viewing my app in a browser) will often get the issues to correct themselves. Is there a call in Sencha Touch that I can use to force a redraw of the screen or barring that is there a way that I can trick the app to believe it is getting resized so that it will in turn force a redraw? This obviously would not fix my button's data object issue. I am not sure it is a valid Sencha Touch bug because I have not been able to produce a reliable small reproducible.
mapButton.update(place);
mapButtonContainer.show({type: 'slide', direction: 'up'});
Ext.getCmp('idMapsearchcard').doComponentLayout();
mapButton.update(place);
In this example I am updating the XTemplate I am using to populate the button content. I show the button container which means that I call a doComponentLayout because I believe it requires a recalculate. I am calling the update for the XTemplate again because I depend on the data member of the button and after doComponentLayout is called the data member is gone for some inexplicable reason.
mapButtonContainer.hide();
this.mapPanel.doComponentLayout();
In this example I am hiding the mapButtonContainer and then calling doComponentLayout on its parent panel. The button and container no longer render but the space they occupied are still empty instead of being filled by the rest of the container contents.
I am also having a lot of issues with doComponentLayout causing my map to disappear altogether.
I have noticed that manually resizing my browser (when I am viewing my app in a browser) will often get the issues to correct themselves. Is there a call in Sencha Touch that I can use to force a redraw of the screen or barring that is there a way that I can trick the app to believe it is getting resized so that it will in turn force a redraw? This obviously would not fix my button's data object issue. I am not sure it is a valid Sencha Touch bug because I have not been able to produce a reliable small reproducible.