Mailinglist Archive: yast-devel (101 mails)

< Previous Next >
Re: [yast-devel] Progress::New() can be called recursively now
  • From: Johannes Meixner <jsmeix@xxxxxxx>
  • Date: Wed, 23 Jan 2008 11:21:48 +0100 (CET)
  • Message-id: <Pine.LNX.4.64.0801231101560.16819@xxxxxxxxxxxxxx>

Hello,

On Jan 23 09:17 Ladislav Slezak wrote (shortened):
The new functionality allows you to create a "parent progress" which has two
stages. The progress values will be recalculated so that the first Write()
call
will display progress from 0% to 50% the second one from 50% to 100%.

Can the "parent progress" only have two stages?
What about three or more stages?

The level is "unlimited", the first Write() can call another nested two
Write()
functions which will be recalculated to 0%-25% and to 25%-50%, and so on...

I wonder whether this recalculation is really right.

Assume the hierarchy is:

parent -> child1, child2 -> child1, grandchild1, grandchild2

If I understand you correctly, the recalculated progress values are:

child1: 0% to 50%
grandchild1: 50% to 75%
grandchild2: 75% to 100%

I think that usually the user assumes that the progress value
match to the time it takes to do the task.

But because of your recalculation it looks as if child1 needs
twice the time of a grandchild.

I think a better recalculation would be to devide it equally
regardless if it is a child or grandchild, i.e:

child1: 0% to 33%
grandchild1: 33% to 66%
grandchild2: 66% to 100%

Of course this doesn't make sure that the progress values match
really well to the actual time because it assumes that all
children need the same time but I think this is better
than introduce "artificial" differences.


Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References