1. #1
    Sencha User
    Join Date
    Nov 2012
    Location
    Mauritius
    Posts
    43
    Vote Rating
    3
    Shabneez is on a distinguished road

      0  

    Default Ext.define and Ext.create

    Ext.define and Ext.create


    Hello,

    I understand that Ext.create will create an object of the class, however in sencha architect i find only Ext.define. Could someone please tell me why we don't have Ext.create? Thanks

  2. #2
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    393
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      1  

    Default I think...

    I think...


    If I remember from when I tested it last (and please correct me if I'm wrong) you can only use Ext.Create in Architect in functions of the class....e.g. the init function, painted etc. You can also use it as an override if you override that class

  3. #3
    Sencha - Architect Dev Team jjohnston's Avatar
    Join Date
    Sep 2010
    Posts
    516
    Vote Rating
    17
    jjohnston will become famous soon enough jjohnston will become famous soon enough

      1  

    Default


    Digeridoopoo's reply is correct. Architect is all about defining a set of classes and configurations. It's possible that within your own custom event handlers or controller logic you'll need to instantiate those classes, but it's up to you to write that logic.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Location
    Mauritius
    Posts
    43
    Vote Rating
    3
    Shabneez is on a distinguished road

      0  

    Default


    Hello,

    Thanks for the replies. Actually that part I understood..what I was asking is that, when we are defining anything, it is just there, right? No instance of the object is created yet..then how are we able to see it?

  5. #5
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    272
    Vote Rating
    10
    worthlutz is on a distinguished road

      0  

    Default


    Quote Originally Posted by Shabneez View Post
    ..then how are we able to see it?
    Think about it this way...

    You drag a panel to the project inspector, name it "MyPanel", add useralias "mypanel" and define all the configs. You now have a class and can use this top level object by dragging it into another container or panel or viewport and then choose link. This creates the instantiated object in the containing object.

    The link will use the user alias as xtype in the items array of the container.
    Code:
     items: [
        {
            xtype: "mypanel",
            height: 100,
            width:  200,
            ... more configs...
        }
    This is the instantiated object you will see. You can change some configs in the link to override the ones in the class you created.

    Generally the first panel you drag becomes the initial view.

    I hope this quick explaination makes sense.

    Worth

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi