Recent

Author Topic: TStrings, sorting  (Read 12709 times)

didiergm

  • New Member
  • *
  • Posts: 26
TStrings, sorting
« on: April 02, 2009, 08:39:07 pm »
When setting a Tstrings.sorted property to true the strings are properly sorted, but the corresponding objects do not follow the sort.

This happens regarless of whether the sorted property is set before or after filling the tstrings.

I wanted tp file a bug but have not been able to access the bugtracker all day.

(tested on beta 0.9.27.20090402 with fpc 2.2.5)

Didier
« Last Edit: April 03, 2009, 07:23:35 am by didiergm »

mas steindorff

  • Hero Member
  • *****
  • Posts: 593
Re: TStringlist, sorting
« Reply #1 on: April 03, 2009, 02:02:59 am »
I had a similar issue when I tried to use a TSringlist to convert a serial string into sub strings by assigning the raw string to Tstr.comatext and then trying to access the tstr.count and  .strings property for the resulting list.  The obect would not execute to do the reodering I was after.

I solved my problem by using a non visible Memo box and breifly seting it's .Visible property to true after adding the string to it.  This seemed to fire off the a string sorting mechanism I was after.  a few lines later, I set the memo back to hiden so there is only a littel flash on the screen.

I hope this helps until you get a real fix.
windows 10 &11, Ubuntu 21+ IDE 3.4 general releases

didiergm

  • New Member
  • *
  • Posts: 26
Re: TStringlist, sorting
« Reply #2 on: April 03, 2009, 07:23:09 am »
Mas,

thanks for the idea, I've found another workaround;  but above all wanted to report the issue in case it was not reported yet.

Didier

bobo

  • Full Member
  • ***
  • Posts: 171
Re: TStrings, sorting
« Reply #3 on: April 03, 2009, 07:53:42 am »
Yes, please report this in the bug tracker with a little console program demo.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: TStrings, sorting
« Reply #4 on: April 03, 2009, 08:56:00 am »
I wonder what the actual TStrings descendant was.

didiergm

  • New Member
  • *
  • Posts: 26
Re: TStrings, sorting
« Reply #5 on: April 03, 2009, 10:03:00 am »
Tstringlist

 

TinyPortal © 2005-2018