Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default [CLOSED] [beta3] Generics for AppEvent missing in View and Controller

    [CLOSED] [beta3] Generics for AppEvent missing in View and Controller


    Hi,

    am I wrong or shouldn't the class AppEvent be typized with inherited classes of Object in the definitions of:

    protected void View.fireEvent(AppEvent event)
    public abstract void Controller.handleEvent(AppEvent event)

    Otherwise, it would not be possible to use typization in overridden methods of inherited classes of View and Controller.

    Can you pls. confirm?

    Thanks,

    Joachim

  2. #2
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default Similiar in class Validator

    Similiar in class Validator


    I think the same holds true for Validator.validate(final Field field, final String value), where Field should support generics in the class Validator.

  3. #3
    Ext User
    Join Date
    May 2008
    Posts
    20
    Vote Rating
    0
    Orion- is on a distinguished road

      0  

    Default Similar problem for StoreSorter

    Similar problem for StoreSorter


    Code:
    StoreSorter.compare(Store store, ...
    should probably read
    Code:
    StoreSorter.compare(Store<M> store, ...

  4. #4
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    First, these issues are not bugs. This post belongs in Open Discussion.

    am I wrong or shouldn't the class AppEvent be typized with inherited classes of Object in the definitions of:

    protected void View.fireEvent(AppEvent event)
    public abstract void Controller.handleEvent(AppEvent event)
    No, you can define your data type in your listener. It does not matter that the event was created without specifying a type.
    I think the same holds true for Validator.validate(final Field field, final String value), where Field should support generics in the class Validator.
    No, the validator validates the raw string value, not the typed value.

    StoreSorter.compare(Store store, ...
    should probably read StoreSorter.compare(Store<M> store, ...
    Yes, I have made the change.

  5. #5
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    Darell,

    sure, we can continue the thread in Open Discussion. Let's use http://extjs.com/forum/showthread.ph...337#post173337 for that.

    Frankly, I am not sure I understood your remark on AppEvent. Could you please elaborate on this?

    I understand that I can override handleEvent for a non-typized AppEvent argument and then just cast it into a class. However, this would not be the ideal way IMHO and also gives a warning I would like to avoid if possible.

    Thanks,
    Joachim

  6. #6
    Sencha - GXT Dev Team darrellmeyer's Avatar
    Join Date
    May 2007
    Location
    Washington, DC
    Posts
    2,242
    Vote Rating
    2
    darrellmeyer is on a distinguished road

      0  

    Default


    I think the same holds true for Validator.validate(final Field field, final String value), where Field should support generics in the class Validator.
    I have changed Validator to use generics:

    Code:
    public interface Validator<Data, F extends Field<Data>> {
    
      /**
       * Validates the fields value.
       * 
       * @param field the field
       * @param value the value to validate
       * @return <code>null</code> if validation passes, otherwise the error
       *         message
       */
      public String validate(F field, String value);
    
    }
    Frankly, I am not sure I understood your remark on AppEvent. Could you please elaborate on this?
    I am not sure I understand what you are asking. handleEvent needs to work with multiple events and data types. It does not make sense to have to pass the data type in the class declaration. Are you suggesting:

    public abstract class View<Data> {
    protected abstract void handleEvent(AppEvent<Data> event);
    }

  7. #7
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Arrow Go to the open discussion

    Go to the open discussion


    I suggest using wildcard for View and Controller handleEvent method. See http://extjs.com/forum/showthread.php?p=173337

  8. #8
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    Darell,

    thanks for your reply. No, I was not suggesting the code you provided, but rather wildcards as zaccret proposed, i.e.:

    public abstract class View {
    protected abstract void handleEvent(AppEvent<?> event);
    }

  9. #9
    Ext User
    Join Date
    Apr 2008
    Posts
    376
    Vote Rating
    0
    zaccret is on a distinguished road

      0  

    Default


    It has been fixed in Controller class in beta5 but not in View class.

  10. #10
    Ext User
    Join Date
    May 2008
    Posts
    97
    Vote Rating
    0
    jraue is on a distinguished road

      0  

    Default


    I agree, a fix for View as well would be great. Thanks!