trunc.ate Posted January 10, 2004 Share Posted January 10, 2004 When comparing ProgressOn and ProgressSet I noticed that the positions for the attributes "maintext" and "subtext" are interchanged: ProgressOn("title", "maintext" [, "subtext"][, x pos] [, y pos] [, opt]) ProgressSet( percent [, "subtext"] [, "maintext"])Not quite intuitive IMO. Since in ProgressSet both attributes are optional why not making this ProgressSet( percent [, "maintext"] [, "subtext"])? Link to comment Share on other sites More sharing options...
Valik Posted January 10, 2004 Share Posted January 10, 2004 When comparing ProgressOn and ProgressSet I noticed that the positions for the attributes "maintext" and "subtext" are interchanged: Not quite intuitive IMO. Since in ProgressSet both attributes are optional why not making this ProgressSet( percent [, "maintext"] [, "subtext"])? My guess is because it seems much more likely that you are going to change the sub-text than the main text. By reversing the order, you would always have to specify the main text (Even if it didn't change the entire time you used ProgressSet) just to change the sub-text. Functionality over consistency. Link to comment Share on other sites More sharing options...
trunc.ate Posted January 10, 2004 Author Share Posted January 10, 2004 My guess is because it seems much more likely that you are going to change the sub-text than the main text.You think so? I would prefer the main text (see example below). But shouldn't that be left to the scripter himself, in any case? $a = 0 $range = 200 $step = $range/100 $percentage = 0 $test = "Testrange is " & $a & " to " & $range ProgressOn("Progress Test", "Processing... " , $test ,-1,-1, 2) For $i = 1 to $range Step 1 ;Scripting goes here Sleep(20) If $i/$step = int($i/$step) Then $a = $a + 1 $percentage = "Processing... " & $a & "%" EndIf ProgressSet($a, "", $percentage) Next Link to comment Share on other sites More sharing options...
Valik Posted January 10, 2004 Share Posted January 10, 2004 You always have the option of wrapping ProgressSet in a function of your own which takes whatever parameters in whatever order you want. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now