Results 1 to 3 of 3

Thread: How migrate Ext to Sencha

  1. #1
    Sencha User liliam.romero's Avatar
    Join Date
    Oct 2014
    Posts
    13
    Vote Rating
    0
      0  

    Default Answered: How migrate Ext to Sencha

    hello!!!




    I have a project in Ext, I need to know how to migrate this code to sencha tocuh 2.3.
    here's an example of the code
    Code:
    Ext.onReady(function() {
    var botones_pagina = Ext.widget({
    xtype: 'form',
    layout: 'form',
    id: 'botones_pagina',
    renderTo: Ext.getBody(),
    bodyPadding: '5 5 0',
    border:false,
    width: '100%',
    items: [],
    buttons: []
    })
    };
    Appreciate your help!!!!

  2. The API between Ext JS and Sencha Touch have some differences. There are too many to easily say what they are here, you will need to check the API doc for what you can do with Sencha Touch.

    For this small code, you can do:

    Code:
    Ext.Viewport.add({
        xtype : 'formpanel',
        items : []
    });
    In Touch, there is no form layout (this isn't required in Ext JS either), you don't use renderTo, there is no bodyPadding or border and there is no buttons config. For bodyPadding, you can add the cls config to the formpanel and then use CSS to target the element to add padding, there is a padding config that you can use but that will likely affect any docked toolbars. For the buttons config, you can add a docked toolbar in the items array:

    Code:
    items : [
        {
            xtype : 'toolbar',
            docked : 'bottom',
            items : [
                {
                    text : 'Foo'
                }
            ]
        }
    ]

  3. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,050
    Answers
    3976
    Vote Rating
    1381
      0  

    Default

    The API between Ext JS and Sencha Touch have some differences. There are too many to easily say what they are here, you will need to check the API doc for what you can do with Sencha Touch.

    For this small code, you can do:

    Code:
    Ext.Viewport.add({
        xtype : 'formpanel',
        items : []
    });
    In Touch, there is no form layout (this isn't required in Ext JS either), you don't use renderTo, there is no bodyPadding or border and there is no buttons config. For bodyPadding, you can add the cls config to the formpanel and then use CSS to target the element to add padding, there is a padding config that you can use but that will likely affect any docked toolbars. For the buttons config, you can add a docked toolbar in the items array:

    Code:
    items : [
        {
            xtype : 'toolbar',
            docked : 'bottom',
            items : [
                {
                    text : 'Foo'
                }
            ]
        }
    ]
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  4. #3
    Sencha User liliam.romero's Avatar
    Join Date
    Oct 2014
    Posts
    13
    Vote Rating
    0
      0  

    Default

    thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •