Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-1907 in a recent build.
  1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    14
    Vote Rating
    0
    hermann.rangamana is on a distinguished road

      0  

    Default Component should implements HasEnabled ?

    Component should implements HasEnabled ?


    Hello,

    I think Component class would benefit for implementing HasEnabled interface (there'd be no API change, since Component already has setEnabled(boolean)/isEnabled). The benefit is that when i use the enabled/disabled feature on a view of my MVP, i would declare HasEnabled in my view, and just return the component in the view implementation. For now, i need to wrap the component in a anonymous inner class of type HasEnabled and forward the call to setEnabled/isEnabled into the component's setEnabled/isEnabled.
    As an example :
    My view
    Code:
    public interface View 
    {
        HasEnabled myOkButton();
        
        interface Presenter 
        {
        }
    }
    For the view implementation, i need to do the following
    Code:
    public class ViewImpl implements View
    {
        private TextButton okButton;
        
        @Override
        public HasEnabled myOkButton()
        {
            return new HasEnabled()
            {
                @Override
                public void setEnabled(boolean enabled)
                {
                    okButton.setEnabled(enabled);
                }
                
                @Override
                public boolean isEnabled()
                {
                    return okButton.isEnabled();
                }
            };
        }
    }
    If Component implemented HasEnabled interface, my view implementation would be like the following, which is much much clearer ...
    Code:
    public class ViewImpl implements View
    {
        private TextButton okButton;
        
        @Override
        public HasEnabled myOkButton()
        {
            return okButton;
        }
    }
    Thanks

    Hermann

  2. #2
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    Thanks for the report. I've filed an API review ticket and will update this thread with any decision or changes we make. Like you said, Component already implements these methods, so this change seems to make sense at first glance.

  3. #3
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    I've had a chance to review this and have committed the change to SVN as r2619.

  4. #4
    Sencha User WesleyMoy's Avatar
    Join Date
    Oct 2009
    Location
    Redwood City, California
    Posts
    402
    Vote Rating
    2
    WesleyMoy is on a distinguished road

      0  

    Default


    The fix for this shortcoming has been included in the public release of Sencha GXT 3.0.0. You should be able to observe this change in our source. Although we're confident that this issue has been resolved, please reply here (or start a new bug thread linking to this one) if you have any issues with this change.

Thread Participants: 1

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