Results 1 to 2 of 2

Thread: Extjs 6.5 Modern Package Split, way for Instantiate a Class based on Platform Tags

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2015
    Posts
    26
    Answers
    1

    Question Extjs 6.5 Modern Package Split, way for Instantiate a Class based on Platform Tags

    I'm trying to split an enterprise app package i came up with the below approach. I have few queries i need to clarify before jumping in to code splitting operation. I'm using MVVM pattern will there be any maintenance or complexity issues occur when splitting a packages.

    1) Loading a component package on demand is necessary or over engineered ?
    2) How the App controller and view controllers will behave when loaded dynamically?
    3) Is it safe to create a class based on below approach ?
    4) Package Splitting is only for loading a view alone or can be used for loading even a package?

    Code:
    /*** Extends from Ext File field
    */
    Ext.define('Myapp.ios.FileField', {
        extend: 'Ext.field.File'
    });
    
    
    /**
    * Custom Class for tablet case
    */
    Ext.define('Myapp.android.FileField', {
        extend: 'Ext.Container',
        config:{
            label:'',
            height:50
        }
    });
    
    
    /** 
    * A Wrapper class
    * 
    */
    Ext.define('Myapp.FileField', {
        xtype:'customfile',
        constructor: function (args) {
            if (Ext.platformTags.ios)
                return Ext.create('Myapp.ios.FileField', args);
            else
                return Ext.create('Myapp.android.FileField', args);
        }
    });
    
    
    var fileField = Ext.create({
        xtype:'customfile',
        label:'Browse File'
        bind:{
            value:'{vm.file}'
        }    
    
    });


  2. #2
    Sencha - Forum Administrator
    Join Date
    Sep 2017
    Posts
    1,006
    Answers
    5

    Default

    Thank you so much for your post. I apologize for the delay. I have shared this with the support staff to look into at their earliest convenience. Your patience is greatly appreciated! We do suggest using the support portal when you need assistance with a capability of a Sencha product, you have identified a situation where a products behavior is inconsistent with the product documentation and might indicate a software bug, or when the communication between you and Sencha needs to be private.

    Thanks again,

    Michele



Similar Threads

  1. Replies: 10
    Last Post: 25 Mar 2019, 5:57 AM
  2. how to instantiate custom class from within defined class
    By mobilab in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 5 Mar 2013, 3:09 AM
  3. Replies: 0
    Last Post: 22 Aug 2011, 4:19 AM
  4. How to define and instantiate a new class
    By Luca D'Antona in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 1 Sep 2010, 4:46 AM

Tags for this Thread

Posting Permissions

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