[Gambas-user] string[].Sort(bASC) only sorts ascendig

Jussi Lahtinen jussi.lahtinen at gmail.com
Sat Dec 5 19:28:39 CET 2020


I usually do something like this, if I "have" to use the boolean anyway:
string[].Sort(Iif(bASC, gb.Ascent, gb.Descent))

Jussi



On Sat, Dec 5, 2020 at 10:10 AM Bruce <adamnt42 at gmail.com> wrote:

> On 5/12/20 1:43 pm, Jussi Lahtinen wrote:
> > It's not boolean. See gb.Ascent and gb.Descent.
> >
> >
> > Jussi
> >
> > On Sat, Dec 5, 2020 at 5:00 AM Bruce <adamnt42 at gmail.com> wrote:
> >
> >> With latest commits I can only sort string arrays in ascending order no
> >> matter what the value of bASC is.
> >> (This is on the pure Gambas3 install, i.e. no local customisations).
> >>
> >> SOS
> >> bruce
> >>
> >> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> >>
> >
> >
> >
> > ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> >
>
> Bugger! That code has been working for years.
>
> Gridview.Columns.Ascending is Boolean and was just assigning that to the
> sort (as a Boolean. Now Iguess I'll have to use a complex 1 level If
> test. ;-)
>
> b
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201205/560696d6/attachment.htm>


More information about the User mailing list