BostonMerlin
11 Mar 2012, 5:16 AM
I'm trying to monitor when the viewports orientation is changed (landscape / portrait) but i'm not seeing any way to do this from within the Designer. I'm told to bind to orientation change of the viewport, so i do the following:
Create new Sencha Touch 2 project using Sencha Designer build 311
Add a container view
Add a controller
Add a controller action
In the controller action, I can set controlQuery to 'viewport' but there is no targetType of 'Ext.Viewport' and there is no 'orientation' type value to select from in the name drop down list.
Also told to try binding again the 'resize' event of a control but nothing i've done seems to work at all.
I can easily bind against the 'tap' events of buttons and they all work using the method above, except where i substitute viewport for button and monitor the 'tap' event.
Either this is a bug or i'm missing something.
Thanks
John
Create new Sencha Touch 2 project using Sencha Designer build 311
Add a container view
Add a controller
Add a controller action
In the controller action, I can set controlQuery to 'viewport' but there is no targetType of 'Ext.Viewport' and there is no 'orientation' type value to select from in the name drop down list.
Also told to try binding again the 'resize' event of a control but nothing i've done seems to work at all.
I can easily bind against the 'tap' events of buttons and they all work using the method above, except where i substitute viewport for button and monitor the 'tap' event.
Either this is a bug or i'm missing something.
Thanks
John