Closed GoogleCodeExporter closed 9 years ago
For the moment if the lastPage() is invoked, and if the use must test if
!it.hasPrevious... not use the it.previous() but it.current()
See the new example of the class :)
TODO : refactoring the example with external class
Original comment by ekamel...@gmail.com
on 7 May 2009 at 4:31
Not a bug but a fix when use the iterator, see the example :
http://code.google.com/p/maashaack/source/browse/trunk/AS3/examples/maashaack/sy
stem/data/iterators/examples/PageByPageIteratorExample.as?spec=svn692&r=692
{{{
public function prev():void
{
var prev:* ;
if ( !it.hasPrevious())
{
prev = it.previous() ;
}
else
{
it.lastPage() ;
prev = it.current() ;
}
trace( "> prev:" + prev + " currentPage:" + it.currentPage() + " current:" +
eden.serialize(it.current()) ) ;
}
}}}
Original comment by ekamel...@gmail.com
on 8 May 2009 at 12:24
oops... problem in the up example :)
{{{
public function prev():void
{
var prev:* ;
if ( it.hasPrevious())
{
prev = it.previous() ;
}
else
{
it.lastPage() ;
prev = it.current() ;
}
trace( "> prev:" + prev + " currentPage:" + it.currentPage() + " current:" +
eden.serialize(it.current()) ) ;
}
}}}
remove the ! in the condition
Original comment by ekamel...@gmail.com
on 8 May 2009 at 12:26
Original issue reported on code.google.com by
ekamel...@gmail.com
on 7 May 2009 at 4:25