PDA

View Full Version : chain of function calls. Why error?



fenuk
15 Nov 2010, 2:40 PM
a small piece of code from my function:



var p = new oGrid.getStore().recordType(oForm.getForm().getFieldValues());
oGrid.getStore().add(p);
when run - we have error, but if i small change example:



store = oGrid.getStore()
var p = new store.recordType(oForm.getForm().getFieldValues());
oGrid.getStore().add(p);
all ok :)

who can explain to me why so?

laurentParis
16 Nov 2010, 2:09 AM
what is oGrid ?