Results 1 to 9 of 9

Thread: custom components and MVC in ST2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    439
    Vote Rating
    7
      0  

    Default custom components and MVC in ST2

    where do custom components go in the MVC structure?
    thanks

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

    Default

    It depends on the namespace you have. Say you are using my Ext.ux.touch.grid extension. I put them in the assets/ux folder

    /
    --app/
    --assets/
    ----ux/
    ------touch/
    --------grid/
    ----------View.js
    --app.js
    --index.html

    And I then set a path:

    Code:
    Ext.Loader.setPath({
        'Ext.ux' : 'assets/ux/'
    });
    So now the Ext.ux namespace points to the assets/ux/ folder.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    439
    Vote Rating
    7
      0  

    Default

    thanks
    how does the css of a custom component fits here?
    for example;
    in your Ux.ImageLoader component there is an accompanied by a css file.
    how does this css file loaded? should I explicitly load it in the index.html?
    thanks
    BTW : is this component go to go? seem like its working...

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

    Default

    Yes, the CSS file will need it's own <link> tag in your index.html although if you are using SASS you could put the style in a scss file and it will compile together.

    I just developed it last night when I was working on Chapter 8 of Sencha Touch in Action. It works and works great. I do have another idea to make it better and will maybe get to it tonight but may decide not to do it tonight but another day.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

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

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    439
    Vote Rating
    7
      0  

    Default

    nice...
    I think Jarvus needs something like this for the PinchZoom carousel component he has.
    his ST1 component uses something like this and I think he is just about to port it to ST2...

  6. #6
    Sencha Premium Member
    Join Date
    Apr 2008
    Posts
    356
    Vote Rating
    85
      0  

    Default

    I'm on it =] Aiming to release next week
    Chief Architect @ Jarv.us Innovations
    Co-captain @ Code for Philly

    Jarvus builds and optimizes top-quality Sencha Touch and ExtJS apps for open-source projects and clients of all sizes.

    Don't waste time with bugs that have already been found and fixed by the community, compile our tried and tested hotfixes packages into all your projects: https://github.com/JarvusInnovations/sencha-hotfixes

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
  •