1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Scotland
    Posts
    111
    Vote Rating
    2
    delp is on a distinguished road

      0  

    Default Adding custom JS item to a panel (or any widget)

    Adding custom JS item to a panel (or any widget)


    What is the best method to add a custom component (which has been pulled in using the resources in Architect).
    You can't drag and drop it like you can with the visual items that are listed in the toolbox.

    Perhaps there is a way to add your own items to the toolbox? (I am refering to the IFrame from the ext examples folder)

    At the moment I'm listening for the added event and once the panel is added I'm then adding the iFrame.

    Code:
    var me = this;
    
    
    me.add({
            itemId: 'iFramePage',
            id: 'iFramePage',
            items: [{
                    xtype: 'uxiframe',
                    id: 'iframeItem',
                    src : 'http://www.mysite.com/',
                    height: '100%',
                    width: '100%'
                }
            ]
        });
    Is this an acceptable method to use for adding items?
    What is the lifecycle of the components?
    Is there a prefered event to add items during there creation?

  2. #2
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Scotland
    Posts
    111
    Vote Rating
    2
    delp is on a distinguished road

      0  

    Default


    This is just me learning as I go...
    I think it it now seems to be fairly obvious - unless you're new.
    It would seem like the good place to add it would be in the initiComponent function. If working in Architect then you will need to generate an override to do this.

  3. #3
    Sencha - Architect Dev Team
    Join Date
    Jul 2012
    Posts
    272
    Vote Rating
    26
    honestbleeps will become famous soon enough honestbleeps will become famous soon enough

      0  

    Default


    We've actually added exactly that feature for Architect 3.0 with User Extensions. You'll be able to write your own custom code and set it up to be dragged out from the toolbox just like you're suggesting! Architect 3.0 isn't out of beta yet, but it's not too far off (sorry, I can't give a specific date).

    In the meantime, what you can do is follow the model of our Kiva example application. You'll see that some special code was written for the Kiva app that is a custom proxy, and then a regular proxy is dragged out and given the classAlias "kiva" so that it makes use of that custom code by being aliased to it.

    The example is linked here:

    https://github.com/SenchaArchitect/Kiva
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  4. #4
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Scotland
    Posts
    111
    Vote Rating
    2
    delp is on a distinguished road

      0  

    Default


    Cool, thanks.

Thread Participants: 1

Tags for this Thread

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