14 Feb 2012 3:05 PM #1
How to integrate your own controllers
I have some legacy code that I want to be able to integrate as a Controller. I want to be able to add it to the Application in the "controllers:" stanza. I have it in the application filesystem under app/controller/MyFile.js, and if I add it to the application "controllers:"stanza then it gets initialized and I can access it with this.getApplication().getController('MyApp.controller.MyFile') for example.
I cannot edit the Application file, and so I am having to do this by hand after every save to the filesytsem before I run the App. I would rather you let me edit that file and get myself in a ditch if I want to than to make me edit the file in the filesystem after every iteration.
Same difficulty with the <application>.html file, I am having to edit that file every time to add the legacy Controller file. I would love to be able to just set that once and not have it over-ridden each time I save from Designer. Please add a little flexibility - maybe it can be default read-only, but you provide a way to override this. Otherwise the workarounds are too painful and time consuming (i.e. editing the files after each save of Designer).
14 Feb 2012 5:32 PM #2
It's a pain I experienced first hand while working on Designer too, we get it. Over time, all of that will get implemented, there's much to do but we're not ignoring the problem.
I know it's not much to go on, but I hope this reassures you we're on the ball.--
14 Feb 2012 6:55 PM #3
As Luca said we are aware of these issues and working on it. My current recommendation would be to duplicate designer.js and designer.html into index.js and index.html. We will not touch any new files that you add. These files change so infrequently that you will just have to synchronize them with the changes you want when it happens.Aaron Conran