jeudi 29 janvier 2015

Phantom init function

I was tidying up some controllers in a project today - I created a couple of new ones and moved some functions between controllers (just by drag+drop) and something seems to have seriously messed up my project.

I now seem to have "phantom" init functions in each of the controllers that I cannot edit and cannot delete.


What I've been doing up till now is adding the init function via the designer and using code like this to listen for events from controllers. This has been working fine



Code:



init: function(application) {
this.control({
"somePanel": {
someEvent: this.someFunction
}
});}

Now I have the situation where in the project inspector there is no longer an init function but if I view the code for the whole controller I can still see the code that used to be there. If I add the init function back in it does not have any code in it and any code I add just goes before the phantom code

I've tried looking at the actual files generated by architect. The init code isn't in the metadata file but it is in the generated "someController.js" file. If I delete it from there it just gets recreated next time I save.


I'm at a total loss what to do, short of redoing all my controllers again. I've tried reinstalling Architect and upgrading to Architect 3.2 to see if that sorted it but it hasn't


Has anyone seen this before and if so how did you fix it?


Edit: I should add I'm using Architect 3.0 and ExtJS 4.2






Phantom init function

Aucun commentaire:

Enregistrer un commentaire