1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    46
    Vote Rating
    0
    4CastRisk is on a distinguished road

      0  

    Default MVC App - defining non-MVC components with loader

    MVC App - defining non-MVC components with loader


    Hi there,

    I've started using the MVC structure for my application (fantastic btw!)

    I was wondering, with this structure I have a custom proxy and store type to work with DNode (a RPC abstraction on top of Nodejs + SocketIO).

    The proxy alias is defined as 'proxy.dnode' and sits in my app/data folder, as it's defined type is QM.data.DNodeProxy, however I cannot get this to load despite adding it as a require to my application.

    What is the best way to implement features like this that aren't quite MVC components?

  2. #2
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,649
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    use the right namespace. The namespace is used to resolve the path, so your file get loaded.

    So using QM.data.DNodeProxy you only have to place the DNodeProxy.js in your data folder to get loaded.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    46
    Vote Rating
    0
    4CastRisk is on a distinguished road

      0  

    Default


    That's what I tried, however when I tried to invoke it by setting my proxy type to 'dnode' I get:

    Cannot create an instance of unrecognized alias: proxy.dnode

    The top of my define looks like this:

    Code:
    Ext.define 'QM.data.DNodeProxy',
        extend: 'Ext.data.ServerProxy'
        alias: 'proxy.dnode'
        requires: ['Ext.util.MixedCollection']
    and I invoke it like this:

    Code:
    Ext.define 'QM.model.Base',
        extend: 'Ext.data.Model'
        
        idProperty: '_id'
        proxy:
            type: 'dnode'
            api: ....
    If I hard code the script tag to the file in my html file though, it does work fine.

  4. #4
    Sencha User steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,649
    Vote Rating
    6
    steffenk has a spectacular aura about steffenk has a spectacular aura about steffenk has a spectacular aura about

      0  

    Default


    try to add the require in your model definition, this should force the proxy to be loaded before use.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

Similar Threads

  1. Ext.Loader - Loading custom built components
    By EloB in forum Ext 2.x: User Extensions and Plugins
    Replies: 1
    Last Post: 12 May 2011, 6:02 AM
  2. How defining own UI Components
    By djdixon in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 24 Nov 2010, 10:07 PM
  3. Simple progress bar loader for ExtJs components
    By violinista in forum Community Discussion
    Replies: 17
    Last Post: 10 Jun 2010, 3:05 AM

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar