View Full Version : [FIXED] PR2 breaks model.save()

15 Nov 2011, 3:25 AM
The code that used to work on PR1:

var rec = this.getBarcodeItemsStore().getAt(recordNo);
scope: this,

now breaks with
"Uncaught TypeError: Cannot use 'in' operator to search for 'listeners' in true"

Trace it down to this bit of code:

superMethod = (method = this.callParent.caller) && (method.$previous ||
((method = method.$owner ? method : method.caller) &&

where method.$owner.superclass[method.$name] returns a different constructor (method.$name) than PR1. Somehow the right constructor it should return is in fact method.$owner.superclass['cunstructor'].$previous, but this is the point where I gave up

15 Nov 2011, 7:41 AM
I had to change the source and just add:

if (config && typeof config === 'object') {
if ('listeners' in config ) {

where it breaks, surely not the best thing, changing the source code, but it the best I could come up with

Jamie Avins
15 Nov 2011, 8:31 AM
Thank you for the report.

Jamie Avins
15 Nov 2011, 9:57 AM
Your fix is ok for now, we've fixed this for the next release.