function repeat numLoopCount BUG!!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Solmos
    New Member
    • Aug 2006
    • 355

    function repeat numLoopCount BUG!!

    found a bug in the function of repeat numLoopCount ..

    And is that if the total of times to repeat the function is more than 500, the application is blocked and does not respond, and when ending closes...

    Example:

    Code:
    numLoopCount = 1;
    repeat
    
    File = ListBox.GetItemText("ListBox1", numLoopCount);
    File.Delete(File, false, false, false, nil);
    
    	numLoopCount = numLoopCount + 1;
    until numLoopCount == 600;

    Any suggestions?

    thx
  • bule
    Indigo Rose Customer
    • May 2005
    • 1116

    #2
    Try this:

    Code:
    File.Delete(ListBox.GetItemText("ListBox1", numLoopCount), false, false, false, nil);
    Never know what life is gonna throw at you. ZubTech

    Comment

    • Solmos
      New Member
      • Aug 2006
      • 355

      #3
      No, that's not the problem.

      I have File.Delete as simple example, but whatever action you make repeated so often, the function is not working properly, it blocks the application (no response) and closes.

      You might try putting Registry.Delete, file.copy or action you want, as long fault that role when you have 1ue repeated more than 500 times

      Any suggestion or other function for repeat one fuction +1000 times?

      thx

      Comment

      • bule
        Indigo Rose Customer
        • May 2005
        • 1116

        #4
        What happens if you use for loop?
        Never know what life is gonna throw at you. ZubTech

        Comment

        • Solmos
          New Member
          • Aug 2006
          • 355

          #5
          Please one exmple

          thx

          Comment

          • bule
            Indigo Rose Customer
            • May 2005
            • 1116

            #6
            Code:
            local numLoopCount;
            local File;
            
            for numLoopCount = 1, 600 do
              File = ListBox.GetItemText("ListBox1", numLoopCount);
              File.Delete(File, false, false, false, nil);
            end
            Try using local whenever you can (but it is not required).
            Never know what life is gonna throw at you. ZubTech

            Comment

            • Solmos
              New Member
              • Aug 2006
              • 355

              #7
              :yes:yes:yes

              Bule very thanks, this code works perfect!!

              thx

              Comment

              Working...
              X