PDA

View Full Version : Models to fire an event



tt88
17 Oct 2013, 11:47 PM
Hi

I'm not sure if I have the right approach, but I require some heavy view lifting (not a simple data-bind) when my model is updated. So I have tried to fire an event when this model updates.
I get the error:
Uncaught TypeError: Object #<Object> has no method 'fireEvent'

I tried to add the observable mixin to my model class, but I still get the error above


...
extend: 'Ext.data.Model',
mixins: ['Ext.mixin.Observable'],
...


Does anyone have any ideas around this?

Thanks
-tt88

fmoseley
22 Oct 2013, 8:49 PM
Really hard to tell from the info you provided. But I would place a debugger statement before the call to fireEvent and verify in the console that the object you are calling it on is the correct one.