Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332

    Grin Alphabetize or Numerically order a list??

    Anyone have any ideas on how to easily alphabetize or Numerically order a Global List, or Delimited String, or delimited text file?

    I'm not using this in a listbox object so sort at run time isn't going to do it....

  2. #2
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244

    Re: Alphabetize or Numerically order a list??

    You could actually use a list box to do this, if yu want to. Resize it to super small and the following actions will work:

    Page.Init
    [*]%TextFile% =TextFile.Read ("C:\address\textfile.txt")[*]%NewList% = String.Replace ("%TextFile%", "", "")

    Page.Show
    [*]ListBoxObject[ListBox1].Add (Start, "%NewList%")[*]%ItemText% = ListBoxObject[ListBox1].GetItemText (All)[*]Page.HideObject ("ListBox1")[*]GlobalList[NewGlobalList].Add (Beginning, "%ItemText%")

    Not forgetting to set-up the NewGlobalList to receive the data.

    Note: the delimiters are set to #ASC_CR##ASC_LF#
    the string replace in Page.Init has blank "Search for" and "Replace With" fields. i guess you could also leave those both to #ASC_CR##ASC_LF#

    Dont forget to add
    #ASC_CR# - 13
    #ASC_LF# - 10

    to your 'Constants' in the Configuration Tab of Project setting too.
    -
    = Derek
    ["All glory comes from daring to begin" - fortune cookie]

  3. #3
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332

    Re: Alphabetize or Numerically order a list??

    Thanks Derek. This works wonderfully. IR, wouldn't mind an action in the Global List to Sort Alphabetically/Numerically and another action to remove Duplicate entries.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts