-
6 Mar 2012 8:20 AM #1
custom components and MVC in ST2
custom components and MVC in ST2
where do custom components go in the MVC structure?
thanks
-
6 Mar 2012 8:50 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
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:
So now the Ext.ux namespace points to the assets/ux/ folder.Code:Ext.Loader.setPath({ 'Ext.ux' : 'assets/ux/' });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.
-
12 Mar 2012 8:20 AM #3
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...
-
12 Mar 2012 8:34 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
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.
-
12 Mar 2012 11:56 AM #5
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...
-
12 Mar 2012 7:12 PM #6
I'm on it =] Aiming to release next week
-
13 Mar 2012 12:34 AM #7
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
-
14 Mar 2012 4:22 PM #8
@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
trainings / workshops / consulting: Sencha Touch / Ext JS
Profile on SenchaDevs
www: http://www.nils-dehl.de
twitter: nilsdehl
meetup: Sencha Touch / Ext JS Meetup Frankfurt
videos: http://vimeo.com/album/1621422
conference photos: http://www.flickr.com/photos/nils-dehl/
-
21 Jun 2012 3:24 AM #9
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.


Reply With Quote