DataRequest - Downloading Event

Fired while data is being downloaded from the server

Member of DataRequest (PRIM_WEB.DataRequest)

Parameters

NameTypeData TypeDescription
Loaded*InputIntegerAmount of data downloaded in bytes
Total*InputIntegerTotal amount of data to be downloaded in bytes
Progress*InputIntegerPercentage download complete

Details

The Downloading event is fired repeatedly while data is being transferred, providing details of the progress of the download.

Example

In this example, an download routine is called. Whenever the event is fired, a progress bar is updated.
Mthroutine Name(Upload)
Define_Map For(*Input) Class(#Prim_web.File) Name(#File) Pass(*By_Reference)
 
   Define_Com Class(#Xxxxx.Yyyyyy) Name(#FileDownload)
 
   #FileDownload.ExecuteAsync( #File.Blob #File.Name )
 
   #ProgressBar.Percentage := 0
 
   Evtroutine Handling(#FileDownload.Downloading) Progress(#Progress)
 
      #ProgressBar.Percentage := #Progress
 
   Endroutine
 
   Evtroutine Handling(#FileDownload.Completed)
 
      * User Processing
 
   Endroutine
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2