www.icetips.com  Icetips Utilities Documentation 6/16/2016    

Progress Class:  ReleaseWindow

Previous  Top  Next  


Prototype: (none)

 

This method activates a timer based ACCEPT loop that runs for 1/100th of a second, releasing the window so it can be moved and other controls can interact.  This is important to use when using the ProgressClass with tight loops that run for more than a second or two.  It should called periodically during the process, depending on how long it is, perhaps every 1-5%

Example:

 

ITP  ITProgressClass

Q1   QUEUE

F1     LONG

    END

Q2   QUEUE

F2     BYTE

    END

I    LONG

P    LONG

CODE

!! Queues are filled here.

ITP.Init(?Progress1,RECORDS(Q1),True!! Initialize with the number of records from Q1

ITP.AddToCurrentValue(RECORDS(Q2))     !! Add the number of records from Q2

IF SkipQ1

  ITP.SetTotalValue(RECORDS(Q2))

ELSE

  P = RECORDS(Q1) / 100

  LOOP I = 1 TO RECORDS(Q1)

    GET(Q1,I)

    !! Do something

    ITP.Update

    IF I % P = 0

      ITP.ReleaseWindow

    END

  END

END

 

LOOP I = 1 TO RECORDS(Q2)

  GET(Q2,I)

  !! Do something

  ITP.Update

END

ITP.Kill

 

See also:

Update



Direct link to this page: http://www.icetips.com/manuals/utilities/releasewindow_progress.htm