Lasso9 and shown_last

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso9 and shown_last

Steven McIntosh
USING LASSO 9.2.7 on Mac:
I think there may be a bug with shown_last, either that or it’s been too many years since I’ve used it.

Example table has 18 records.

search table with -maxrecords=15 and -skiprecords=0
shown_count=15
shown_first=1
shown_last=15

search table with -maxrecords=15 and -skiprecords=15
shown_count=3
shown_first=16
shown_last=30

In the 2nd example, shouldn’t the shown_last value be 18? Or is that not the purpose of shown_last?

-Steve
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso9 and shown_last

Brad Lindsay
Apologies for hitting reply on the wrong thread: here's my response in
the right thread and a possible fix.


I'd say it's a bug based on the description here:
http://www.lassosoft.com/lassoDocs/languageReference/obj/shown_last

I suggest you file a bug:
http://www.lassosoft.com/rhinotrac



Also, this (untested) code might fix it:

define shown_last() => {
        local(curMap = inline_scopeGet)
        !#curMap || #curMap->size == 0? return 0;
       
        local(inline = #curMap->find(::currentinline)->dsInfo)
        return #inline->skipRows +
#curMap->find(::currentset)->get(INLINE_RESULTROWS_POS)->size
}

Throw that into a file in LassoStartup. If it does fix it, make sure to
mention it in the bug report or in the comments :)

Thanks,
Brad


On 7/29/14, 12:41 PM, Steven McIntosh wrote:

> USING LASSO 9.2.7 on Mac:
> I think there may be a bug with shown_last, either that or it’s been too many years since I’ve used it.
>
> Example table has 18 records.
>
> search table with -maxrecords=15 and -skiprecords=0
> shown_count=15
> shown_first=1
> shown_last=15
>
> search table with -maxrecords=15 and -skiprecords=15
> shown_count=3
> shown_first=16
> shown_last=30
>
> In the 2nd example, shouldn’t the shown_last value be 18? Or is that not the purpose of shown_last?
>
> -Steve
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>    the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to:<[hidden email]>
> Send administrative queries to<[hidden email]>
#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>