Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 23

Thread: PR4 - Custom folder structure for MVC no longer supported?

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1554 in Sprint 15.
  1. #11
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    87
      0  

    Default

    Makes sense why I never had this problem in custom directories. I Simply used the class names, not the FQ class names. :-\

  2. #12
    Sencha User
    Join Date
    Jan 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by edspencer View Post
    The basic rule is if the string you specify contains a period (".") we will treat it as a fully qualified class name and just load it as normal.
    Thanks, that's all that is needed.


    I assume this test case:


    Code:
    'customNS.controller.Custom'

    Also covers cases like:


    Code:
    'custom.package.CustomClass'

    (It might be best to not assume that controller must be present at all - for instance people could use package.CustomController instead of package.controller.custom).

  3. #13
    Sencha User edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    11
      0  

    Default

    Yup - you can use anything you like, it doesn't have to contain the word 'controller' anywhere in the class name. I just used that in the example because it's probably a pretty common pattern for those sharing such classes between applications.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  4. #14
    Sencha User
    Join Date
    Jan 2012
    Posts
    16
    Vote Rating
    0
      0  

    Default

    Perfect. Thank you.

  5. #15
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    5
    Vote Rating
    0
      0  

    Default

    I like the simplicity of it and also the fact that it no longer depends on Ext.loader as in PR3.

  6. #16
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
      0  

    Default

    Is there a hot fix for this, or just the test case?

  7. #17
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Vote Rating
    0
      0  

    Default

    I was following the Device Profiles guide on the ST 2.0 Docs and realized the fully qualified paths for controllers and views do not work. They just get appended to the standard path, ie: "app/controller/tablet/MyApp/controller/Main.js".

    I spent quite a few hours trying to see if I did anything wrong (since according to the guide, using fully qualified paths should work)... until I came to this thread.

    So I'm also wondering if there's anything we can do about it besides waiting for the next release.

    Cheers

  8. #18
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
      0  

    Default

    It looks as if cannot use a shorthand definition in controller when references views, they must use the fully qualified class path, correct?

  9. #19
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
      0  

    Default

    Actually, we've tried that as well, and this bug still seems to persist. Or perhaps we're setting something up incorrectly.

    We are still having this issue in beta1.


    Our setConfig is like such:
    Ext.Loader.setConfig({
    enabled: true,
    disableCaching: false,
    paths: {
    'OurApp': 'javascripts/OurApp',
    'Ext': 'touch/src'
    }
    });


    And app structure like so:
    javascripts/OurApp/controller/ClassName.js


    Where classes are created as:
    Ext.define('OurApp.controller.ClassName', {} );

    but the loader wants to load anything that was not explicitly required with Ext.require at an ./app path.

  10. #20
    Sencha User
    Join Date
    Mar 2010
    Location
    Seattle, WA
    Posts
    137
    Vote Rating
    1
      0  

    Default

    Here is what was causing our issue:

    http://www.sencha.com/forum/showthre...309#post729309

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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