I am using MonocleMVC. I am creating a new class instance with the following code :
__Controller.Lists = new ListCtrl('article#lists')
(__ internally refers to Monocle)
The code inside ListCtrl works, but I can't access the variable __Controller.Lists. It says it is undefined.
However, __Controler.Sessions is defined in the following code :
__Controller.Sessions = new SessionCtrl('section#splash')
UPDATE
It seems this code prevents the class from being defined :
class ListCtrl extends Monocle.Controller
# THIS CONSTRUCTOR
constructor: ->
super
__Model.List.bind "create", @bindCreate
__Model.List.bind "change", @bindChange
__Model.List.bind "error", @bindError
__Model.List.bind "destroy", @bindDestroy
@bindChange()
UPDATE 2
Turnet out @bindChange() was the cause. Any idea why?