I have a growing workspace with multiple Ext applications, and it feels like we should move some common components to the 'workspace/common/src' directory so they can be reused.
I have made an attempt at doing this with one View and its Controller. I've got it working statically but it won't compile, and I am not feeling good about it. Even with the viewing the app without compiling I have couple of console errors. So, I'm approaching this wrong, any advice would be most appreciated!
My workspace sencha.cfg includes
So, in an experimental repo I moved
I redefined that file from
I did a similar process with the view.
My app.js, having an array of controllers, this one included, didn't like this.
So, I put a stub controller back in the app with original definition, but extending the new common controller.
I found references in bootstrap.js for both the view and controller definitions and manually modified them. I also modified the Viewport.js requires to include the new view. I think that's the extent of it.
I'm getting 2 console errors, one for each file: 'Uncaught SyntaxError: Unexpected Token >'
There errors are a result of ext-all-dev.js trying to load the files at paths that don't exist, akin to:
I'm not sure why that's happening, but it alerts me that I must be doing this wrong. What is the correct way? Please feel free to ask for more info if I haven't provided enough.
Lastly, when I try to compile, I get this error:
"failed to find meta class definition for name AppName.view.HeaderView"
Which is bizarre to me, because I no longer have this defined anywhere. I changed it to ProductName.view.HeaderView and changed all references in the workspace. The only thing I can think of is that the ProductName.controller.HeaderController lists ['HeaderView'] without specifying namespace and so maybe the controller subclass of that is trying to resolve it to AppName.view. I'm not sure.
Thank you kindly!