-
6 Jan 2013 5:52 PM #1
Using mixins in Architect?
Using mixins in Architect?
I am trying to use some mixin classes in Architect and am confused. Maybe I'm going about it the wrong way.
I found the "class" in the toolbox and created a class with some methods to use as a mixin.
Then in the view where I wanted to use the mixins, I put the class name:
This did not work as the mixins could not be found.Code:mixins: 'MyMixins'
I had to use:
It would seem that a mixins directory would be an appropriate place for these classes and then they could be found automatically. Or something like that.Code:mixins: 'app/view/MyMixins'
In any case, how would I create a mixin and define it using architect?
Thanks,
Worth
-
7 Jan 2013 11:57 AM #2
Mixins must reference the fully qualified class name of the mixin class.
mixins: ['MyApp.view.MyMixin']Jason Johnston
@lojjic
Sencha Architect Development Team
-
7 Jan 2013 1:15 PM #3
It is not helpful that "MyApp" is required here. If I have a component saved in the toolbox and want to use it again in another app I have to edit it to change the mixin line.
I'd like to just drag the mixin class to the Project Inspector and the class which uses it and go on. Having to edit all these saved classes just to change the appName seems a waste of time and place where mistakes will also waste time trying to find them.
I hope that a easier solution is invented.
Worth
-
7 Jan 2013 1:19 PM #4
Agreed, this can definitely be made better.
Jason Johnston
@lojjic
Sencha Architect Development Team


Reply With Quote