1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    stephensaw is on a distinguished road

      0  

    Default Updating properties object

    Updating properties object


    Hi,

    I'm currently learning to create my plugin, and I've came across a question, let's say my plugin code:

    PHP Code:
    Ext.define('Ext.plugin.MyPlugin', {   
            
    extend'Ext.Component',    
            
    xtype'plugin-myplugin',
            
    config: {
                
    speed12,
                
    animationType: {
                    
    direction'left',
                    
    type'flip'
                
    }
            },
            
    init: function() { },
            
    someFunction: function() { }
    }); 
    I understand that in the functions, I can access the 'speed' properties by using this.getSpeed(), or setter as in this.setSpeed(123), but how to I update the direction for the animationType property?

    I've try to do this.setAnimationType({direction: 'right'}) , then when I do this.getAnimationType(), it return me only the object with direction: 'right'. If I do Ext.apply(this.getAnimationType(), {direction: 'right'}), it will return me Ext.Object.classify.objectClass with the following properties (using console.log to observe in Google Chrome's developer tools)

    PHP Code:
    direction'right',
        
    __proto__Object
           direction
    'left'
           
    type'flip'
           
    __proto__Object 
    May I know what is the proper way of updating the value for the properties object?

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,801
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    try

    Code:
    this.getAnimationType().direction = 'right';
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

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