1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    351
    Vote Rating
    4
    gkatz is on a distinguished road

      0  

    Default custom components and MVC in ST2

    custom components and MVC in ST2


    where do custom components go in the MVC structure?
    thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,582
    Vote Rating
    433
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    351
    Vote Rating
    4
    gkatz is on a distinguished road

      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 - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,582
    Vote Rating
    433
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      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 @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    351
    Vote Rating
    4
    gkatz is on a distinguished road

      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
    165
    Vote Rating
    9
    themightychris will become famous soon enough

      0  

    Default


    I'm on it =] Aiming to release next week

  7. #7
    Sencha User
    Join Date
    Nov 2010
    Posts
    351
    Vote Rating
    4
    gkatz is on a distinguished road

      0  

    Default


    yeah chris!
    I think I have asked this before.
    would looooove to see the ability to zoom beyond the original image size. I might be mistaken but I think the ST1 version had that limitation
    anyways guys thanks for helping and sharing

  8. #8
    Sencha - Training Team mrsunshine's Avatar
    Join Date
    Sep 2008
    Location
    Germany - Darmstadt
    Posts
    682
    Vote Rating
    10
    mrsunshine will become famous soon enough

      0  

    Default


    @gkatz may the image zoom example helps you http://www.sencha.com/forum/showthre...rollable-Image to implement your own solution, i faced the same problem

  9. #9
    Sencha User
    Join Date
    Nov 2010
    Posts
    351
    Vote Rating
    4
    gkatz is on a distinguished road

      0  

    Default


    Hi;
    Today, I still think the docs lack the explanation for component developers on how package/submit custom components and how components users should incorporate those components. looking at the components people submit there is no coherent structure/naming convention that unifies all components. this makes reduces readability of the component.
    I think the docs should address this issue to make things easier both on developers and component users... I guess the guidelines would be simple to provide and I see a big benefit here.
    thanks for your time.

Tags for this Thread