Support Topics Documentation Slack YouTube Blog

I don't understand BackendlessCollection for FLASH/AS3

(Roberto) #1

I don’t understand it.
When I do:
Backendless.Data.of( Noticias ).last( responder );
I get just 1 Noticias Object. So far so good.
But when I do:
I cant go thru all objects!!
In fact, totalObjects and lenght gives me different value…
What is the right way of going thru an BackendlessCollection object and retrieve all entries?

public function describeObject():void{ 
var responder:IResponder = new Responder(gotResult,gotError);
var query:BackendlessDataQuery = new BackendlessDataQuery();
query.whereClause = "titulo != 'PIM'";
public function gotResult(evt:ResultEvent):void{
var resultado = evt.result as BackendlessCollection;
var noti:BackendlessCollection = evt.result as BackendlessCollection;
trace(resultado.totalObjects) --> 7
trace(noti.length) --> 0

(Roberto) #2

Ok, got it XD

noti.currentPage.length --> 7


(Mark Piller) #3

“last” - returns object most recently added to table

“find” - returns a collection of objects.

do this: noti.getCurrentPage().length