1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    258
    Vote Rating
    9
    worthlutz is on a distinguished road

      0  

    Default Can I extend saved components???

    Can I extend saved components???


    Can I extend saved components in Architect?

    Say I create a new component and add some configs and methods. I then save this component to the toolbox.

    How can I use this component in the project by using it as a base component and extending it into more new components?

    I'd like to drag it to the inspector and have it create a new object extending my original one.

    Is this possible? Or am I barking up the wrong tree?

    Worth

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

      0  

    Default


    Unfortunately this is not yet possible in Architect. You are also unable to extend top-level components in the inspector, which is essentially the same thing. We do have plans to fully support deep extension of project classes in a near future release, though it won't be in the upcoming 2.2.
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

  3. #3
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    258
    Vote Rating
    9
    worthlutz is on a distinguished road

      0  

    Default


    If I cannot extend components yet, is there a way where I could add an item to view by xtype in Architect?

    I'll define the components manually and then add them as a resource.

    It would be nice to have a item in the toolbox like "generic item" or "xType" component or whatever it should be called.

    Upon dragging this item from the toolbox to a existing component in the project inspector they would be added to the items array like this:
    Code:
    {
        xtype: 'mycustomwhatever'
    }
    This item could not be a top level item and would only be added to components with an items array.

    "xtype" could be the only required config.

    All the rest of the config items would be custom as Architect does not know what is in that item.
    But I do!

    Worth

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

      0  

    Default


    As it turns out, we're introducing something very much like that in the upcoming 2.2 release. When you add a child component, you can specify a 'createAlias' which essentially overrides the xtype in its config object in the generated code. A screenshot:

    Screen Shot 2013-01-07 at 2.37.25 PM.png
    Jason Johnston
    @lojjic
    Sencha Architect Development Team

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

      0  

    Default


    GREAT!

    This is something I've needed.

    Any time soon?

    Worth

  6. #6
    Sencha User
    Join Date
    Nov 2012
    Posts
    188
    Vote Rating
    16
    Gil Gordon will become famous soon enough

      0  

    Default createAlias is now in Architect 2.2

    createAlias is now in Architect 2.2


    createAlias is now in Architect 2.2

  7. #7
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    258
    Vote Rating
    9
    worthlutz is on a distinguished road

      0  

    Default


    And it works good!

    NOTE: If you have a top level item in the inspector, createAlias does not show up. Child items will have this config property.

    For example, drag a toolbar to the view area. No createAlias property.
    Then drag a button to the toolbar. This button will have a createAlias property and you can use a component save in a file somewhere and pointed to by the loader path.

    Worth

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar