When I call store.load() I get 'no records found' pretty much the empty text verbiage although I am loading the list with 1 element. This is with todays build. When I traced through the code I see that this:
var me = this,
records = operation.getRecords(), resultSet = operation.getResultSet(), successful = operation.wasSuccessful();
which is the beginning of the 'onProxyLoad' method. Tracing through the code, 'records' is null because first of all I don't see a .getRecords() method in class 'Operation' in the documentation. I am expecting something like:
records = operation.getResultSet().getRecords();
based on the documentation and how I am loading the records in my read method. If I change the onProxyLoad to this, it works! Bottom line, no matter what operation.getRecords() is null which means that there are no items in the list which results in displaying the empty text. In B2 there was an issue with trying to load a 'null' array (which is not what I am doing although this is what it thinks I am doing) so it would throw the 'isModel is null' error (see the thread from the link I pasted on top).
Another way to fix it for now it to load the list of items twice in my read method:
records : items,
total : items.length,
success : true,
loaded : true
but again I don't see 'operation.setRecords()' in the Sencha Touch 2 API Docs. Nevertheless this works although it seems superfluous. Is this a bug?
We fixed this inconvenience and updated the Operation.getRecords() method to return the records from the resultSet if they are not defined on the operation itself. It will be part of the next release (which will be out very soon). We also added docs for the setRecords and getRecords methods on the Operation class. Thanks for the debugging and the report.