Results 1 to 2 of 2

Thread: LoadEvent getSource bad generic parameters in return type

    You found a bug! We've classified it as EXTGWT-3764 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1

    Default LoadEvent getSource bad generic parameters in return type

    The getSource() method has a return type of Loader<M, C>
    This should actually be Loader<C, M>

    Sample (pseudo)code:

    PagingLoader<PagingLoadConfigBean, PagingLoadResult<Integer>> loader = new PagingLoader<...>(...);
    loader.addLoadHandler(new LoadHandler<PagingLoadConfigBean, PagingLoadResult<Integer>>() {
        public void onLoad(LoadEvent<PagingLoadConfigBean, PagingLoadResult<Integer>> event) {
            PagingLoader<PagingLoadConfigBean, PagingLoadResult<Integer>> theLoader = (PagingLoader<PagingLoadConfigBean, PagingLoadResult<Integer>>) event.getSource(); // will be an error, since event exposes a Loader<PagingLoadResult<Integer>, PagingLoadConfigBean>

  2. #2
    Sencha User
    Join Date
    Feb 2009


    Thanks for the report! Not sure how that slipped by us, but I'll get right on fixing it. In the meantime as I am sure you are aware, you can simply cast to raw then to the correct type.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts