Difference between revisions of "ALTADataSet.UpdateCalculationProgress"

From ReliaWiki
Jump to navigation Jump to search
Line 2: Line 2:
 
{{Template:ALTAEvents.UpdateCalculationProgress.Cmt}}
 
{{Template:ALTAEvents.UpdateCalculationProgress.Cmt}}
  
== Method Syntax ==
+
== Syntax ==
{{APIName|'''UpdateCalculationProgress'''(}}
+
<ul><li>UpdateCalculationProgress(
{{APIPrefix|ByVal}}
 
 
{{APIName|sender}}
 
{{APIName|sender}}
 
{{APIPrefix|As}}
 
{{APIPrefix|As}}
{{APIName|[[ALTADataSet Class|ALTADataSet]]}}{{APIPrefix|, ByVal}}{{APIName|msgx_0}}{{APIPrefix|As String}}{{APIPrefix|, ByVal}}{{APIName|msgx_1}}{{APIPrefix|As String}}{{APIPrefix|, ByVal}}{{APIName|pdone}}{{APIPrefix|As Double}}{{APIPrefix|, ByVal}}{{APIName|append_to}}{{APIPrefix|As Boolean}}{{APIPrefix|, ByVal}}{{APIName|Prev_increment}}{{APIPrefix|As Long}}{{APIPrefix|, ByRef}}{{APIName|Cancel}}{{APIPrefix|As Boolean}}{{APIName|)}}<br>
+
{{APIName|[[ALTADataSet Class|ALTADataSet]]}},
 +
{{APIName|msgx_0}}
 +
{{APIPrefix|As String}},
 +
{{APIName|msgx_1}}
 +
{{APIPrefix|As String}},
 +
{{APIName|pdone}}
 +
{{APIPrefix|As Double}},
 +
{{APIName|append_to}}
 +
{{APIPrefix|As Boolean}},
 +
{{APIName|Prev_increment}}
 +
{{APIPrefix|As Long}},
 +
{{APIName|Cancel}}
 +
{{APIPrefix|As Boolean}}
 +
{{APIName|)}}</li></ul>
  
== Parameters ==
+
Parameters
'''sender'''
+
:''sender'': An [[ALTADataSet Class|ALTADataSet]] object.
An ALTADataSet object
 
  
'''msgx_0'''
+
:''msgx_0'': The main display label.
The main display label.
 
  
'''msgx_1'''
+
:''msgx_1'': The remaining label.
The remaining label.
 
  
'''pdone '''
+
:''pdone '': The percentage to display, in decimal form (0.00 to 0.99).
The percentage,in decimal, to display. (0 to .99)
 
  
'''append_to'''
+
:''append_to'': If True, append ''pdone'' to the current percentage value in the progress display at the rate of ''Prev_increment'', otherwise ''pdone'' will replace the value.
If True, append '''pdone''' to the current percentage value in the progress display at the rate of '''Prev_increment''', otherwise '''pdone''' will replace the value.
 
  
'''Prev_increment'''
+
:''Prev_increment'': This is the value of the incremental value per progress update if ''append_to'' is True.  If ''append_to'' is False, this value is ignored.
This is the value of the incremental value per progress update, if '''append_to''' is True.  If '''append_to''' is False, this value is ignored.
 
  
'''Cancel'''
+
:''Cancel'': This determines if the calculation can be cancelled.
This determines if the calculation can be cancelled.
 
  
 
== Usage Example ==
 
== Usage Example ==

Revision as of 21:10, 26 February 2014


Called by an ALTADataSet object when the calculation progress should be updated.

Syntax

  • UpdateCalculationProgress( sender As ALTADataSet , msgx_0 As String, msgx_1 As String, pdone As Double, append_to As Boolean, Prev_increment As Long, Cancel As Boolean )

Parameters

sender: An ALTADataSet object.
msgx_0: The main display label.
msgx_1: The remaining label.
pdone : The percentage to display, in decimal form (0.00 to 0.99).
append_to: If True, append pdone to the current percentage value in the progress display at the rate of Prev_increment, otherwise pdone will replace the value.
Prev_increment: This is the value of the incremental value per progress update if append_to is True. If append_to is False, this value is ignored.
Cancel: This determines if the calculation can be cancelled.

Usage Example

Declare the ALTAEvents.
Declare the ALTADataSet.
Note: The ALTADataSet constructor already creates a new ALTAEvents, which could be used in place of AEvents in the example below.

       Dim AEvents as New ALTAEvents
       Dim ADS as New ALTADataSet

Update the calculation progress display.

       AEvents.UpdateCalculationProgress(ADS, "NewMessage1", "NewMessage2", 100, False, 0, True)