Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default setAutoMaximize not working in ST2

    setAutoMaximize not working in ST2


    Hi,
    When doing:
    Code:
    Ext.Viewport.setAutoMaximize(true)
    I will get af error:
    sencha-touch-all-debug.js:77485 TypeError: 'undefined' is not a function (evaluating 'fn.call(scope)')

    This works:
    Code:
    (Ext.Viewport.getAutoMaximize()

  2. #2
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    543
    Vote Rating
    19
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Seems like your code paste was incomplete. But, is there a reason you're trying to set this config with manual code, rather than with the Viewport config within the app?

    Select Application node --> find "Viewport Config" in the config pane --> click "+" then select the Viewport node and you can configure autoMaximize there.

    Doing it this way allows ST2 to apply the autoMaximize config at the proper time in the application lifecycle.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    Quote Originally Posted by jjohnston View Post
    Seems like your code paste was incomplete. But, is there a reason you're trying to set this config with manual code, rather than with the Viewport config within the app?
    Correct.

    Select Application node --> find "Viewport Config" in the config pane --> click "+" then select the Viewport node and you can configure autoMaximize there.
    I normally do that.
    The "problem" is that I get some errors because of autoMaximize:true when calling window.location.relead() or window.location = "index.html". From a button in the application.

    So I thought I could set it manually to get by the exception. Must it be set from the start of the application?

  4. #4
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    543
    Vote Rating
    19
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      0  

    Default


    Ah interesting. I think the Sencha Touch team would be interested to hear about the issue you're having with the recommended approach; it might indicate a bug in ST2, or they may be aware of it and have a recommended way of getting around it. Since this isn't Architect-specific you'd have a much better chance of getting useful answers by posting in the ST2 forums.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  5. #5
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    Hi,
    I really need to override this property like here:
    http://www.sencha.com/forum/showthre...Maximize-false

    Because I want it to be true on iOS and not Android because it breaks the application.
    But I can create a override in Architect, so how do I do this?

  6. #6
    Touch Premium Member hotdp's Avatar
    Join Date
    Nov 2010
    Location
    Denmark
    Posts
    603
    Vote Rating
    14
    hotdp will become famous soon enough

      0  

    Default


    My temp fix is to set it in init viewport

Thread Participants: 1