Results 1 to 4 of 4

Thread: Autoloading and objects. (autoloading objects into namespaces)

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    11
    Vote Rating
    1
      0  

    Default Autoloading and objects. (autoloading objects into namespaces)

    Here's the broken-down scenario, I've got a URL class in Ext. I wish to create a number of URL objects.
    Right now, I'm just trying to figure out the best method for structuring everything and ideally supporting autoloading. The major issue I'm seeing is autoloading is for loading [object] classes and not the final objects into namespaces.

    I could easily create a bunch of JSON objects and load manually, but I feel there must be a better way.
    Does anyone have any suggestions or examples for handling and structuring [static] objects?

    Even some various MVC patterns may be of some help, I understand the ExtJS MVC but that is not what I am looking for with this current project.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Vote Rating
    1272
      0  

    Default

    ComponentLoader has a load event just like a Store that you could put the response onto a namespace. Or you have a callback function you can pass to ComponentLoader.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User a_arias's Avatar
    Join Date
    Aug 2011
    Location
    Florida
    Posts
    28
    Vote Rating
    0
      0  

    Default also trying to use autoload in mvc pattern

    I am trying to do something similar. I want to make a navigation widget that provides links with hash style hrefs (/resource/#!/widget). I would like to click on a link and load the corresponding widget (similar to how tabs work). I have created a view class that defines a container and it's items. I've tried using autoCreateViewport, autoRender, and autoShow in my views but the page just loads blank.

    forum thread here

    I'm confused as to how the the ComponentLoader can be used in an MVC application like the example here.

    If you download and run the example code everything seems to load without a loader configuration.

    Any additional thoughts or discussion on this would be much appreciated.

  4. #4
    Sencha User a_arias's Avatar
    Join Date
    Aug 2011
    Location
    Florida
    Posts
    28
    Vote Rating
    0
      0  

    Lightbulb I fixed my problem. Maybe my example code will help you.

    I'm not sure it's useful to you but I'm sharing it here just in case you need it.

    Forum thread here

Tags for this Thread

Posting Permissions

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