View Full Version : View: onAdd and onUpdate calls to prepareData

10 Apr 2007, 10:46 AM
I'm playing around with the View class and I noticed that my prepareData function was not receiving the index parameter whenever I called refreshNode().

It looks like in onAdd (line 195) and onUpdate (line 182) prepareData is called with just the data object without the index. Is this intentional? The documentation does not list the index parameter as optional so I would expect to receive it always.

16 Apr 2007, 5:32 AM
Is this not a bug? Both functions have the index so I'm confused as to why they wouldn't pass it to prepareData

16 Apr 2007, 11:29 PM
It shouldn't be documented because it isn't always passed. I have removed the docs.

Take a look at onAdd and onUpdate - the i is not the index in the store, it is the index in the modified records.