I have a base Controller in folder [app]/main/create_parent/create_parent.js
defined as
$.Controller('Impress.Main.CreateParent',
I have have several child controllers extending CreateParent e.g [app]/contact/create/create.js
defined as
Impress.Main.CreateParent('Impress.Contact.Create',
This all works well(mostly) uncomprressed , randomly I get errors saying that it can't find the base controller.... Once compressed and packaged, I consistently get the error saying that the base controller is not defined.
This is obvioulsy due to a steal load order issue. In my main [app name].js I have:
steal('jquery')
.then('./resources/jquery-ui', './resources/image_uploader')
.then('jquery/controller/subscribe')
.then(
'impress/main/create_parent','impress/main/list_parent')
.then(
'./impress.css', // application CSS file
'./models/models.js', // steals all your models
'impress/contact/create',
...
So I have "stolen" the base eate parent first "then" the rest of the controllers... So it seems I have done it correctly? Even when I steal the basec controller in my contact/create/create.js file first, it still complains.
So again, this all works fine on most loads when uncompressed all though randomly I do get the error, but once compressed it is consistent. I am clearly misunderstanding steal's functionality as I thought that the "then" syntax was to define load order?
Thanks Hans