Results 1 to 6 of 6

Thread: extend Ext.data.Connection ?

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    580

    Default extend Ext.data.Connection ?

    Hi,

    Why is Ext.data.Connection defined inside a singleton?
    The beauty in ext is that you can extend stuff and now I can't.

    Thanks

  2. #2
    Sencha User husniadil's Avatar
    Join Date
    Jul 2009
    Location
    Yogyakarta, Indonesia
    Posts
    45

    Default

    what singleton do you mean?

    Ext.data.Connection is not singleton, but it's subclass Ext.Ajax is singleton...

    -Object
    --Ext.util.Observable (not singleton)
    ---Ext.data.Connection (not singleton)
    ----Ext.Ajax (singleton)

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    580

    Default

    @husniadil

    Did you look at the code?
    Connect.js
    Code:
    (function(){
      Ext.data.Connection = function(config){
    ...
      });
    })();

  4. #4
    Sencha User husniadil's Avatar
    Join Date
    Jul 2009
    Location
    Yogyakarta, Indonesia
    Posts
    45

    Default

    the file is Connection.js, not Connect.js

    why does the documentation said that it's not a singleton?

  5. #5

    Default

    I don't find the word "singleton" occurring at all, anywhere on the documentation page.

    As far as I can see, the real purpose of this object is so that you can "listen to it." It's an abstract class that defines common behaviors of all potential descendant classes. The documentation page shows in some detail the idea of listening to events thrown by its well-known descendent class, Ext.Ajax. The code that throws those events is located here in the base-class.

  6. #6
    Sencha User husniadil's Avatar
    Join Date
    Jul 2009
    Location
    Yogyakarta, Indonesia
    Posts
    45

    Default


Posting Permissions

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