stdProgress
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 32/100
Línea de trabajo
Start by locating the stdProgress entry point in the VBA library and map the constructors and instance methods listed in the spec. Review the examples to understand nested progress, form or frame binding, Step, self, and Finish behavior. Done means the listed API and the three demonstrated usage patterns work as described.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
stdProgress
Concept
The concept is to be able to build a Progress object, which can continuously sub-divide progress (and ultimately update a progress bar). This progress object could also be supplied as a parameter to functions which increases the ease of using it as a progress meter.
Example 1:
With stdProgress.CreateFromPercents(0.9,0.1).bindForm(myProgressBar)
Dim allSheetNames as collection: set allSheetNames = new collection
With .CreateFromCount(workbooks.count)
For each wb in workbooks
With .CreateFromCount(wb.sheets.count)
for each sheet in wb.sheets
allSheetNames.add sheet.name
.step
next
End With
next
End With
With .CreateFromCount(allSheetNames.count)
Dim vSheetName
for each vSheetName in allSheetNames
debug.print vSheetName
.step
next
End with
End With
- We divide the work into a 0.9 and 0.1 split, i.e. 90% and 10%.
- We subdivide the 90% into
workbook.countparts. Assume 2 workbooks are open, so that's 45% each. - We subdivide the 45% into
wb.sheets.countparts. Assume 5 sheets per workbook so 9% per sheet. - We step for every sheet name added to the workbook incrementing up the tree till the parent, which updates the form.
- Upon finishing we've updated 90% of the progress, 10% remains
- We divide this 10% into the number of sheets (10) so 1% for each sheet.
- Each sheet we increment by this value
- We unload the object as progress is completed
Example 2
With stdProgress.CreateFromCount(3)
'do some task
.step()
'do some other task
.step()
'do some other task
.step() 'optional, as the progress bar will unload immediately after this method in this case
End With
Example 3
Sub test(pb)
with pb.CreateFromCount(workbooks.count)
for each wb in workbooks
if wb.name = sName then
debug.print workbook.fullname
pb.finish
exit function
end if
next
end with
End Sub
Spec
- Constructors
- stdProgress::CreateFromPercents(Paramarray params())
- stdProgress#CreateFromPercents(Paramarray params())
- stdProgress::CreateFromCount(iPartsCount as long)
- std{rpgress#CreateFromCount(iPartsCount as long) - split progress evenly amongst N parts
- self - Returns Me
- Instance methods
- bindForm(Optional Byval oUF as object, ByVal sUpdateMethodName as string) - binds a form with an update method, if no form supplied just return self
- bindFrame(Optional ByVal fr as frame) - binds a frame, the progress object will insert labels into the frame to visualise progress. If no fram supplied just return self
- Step - steps forward by 1 step of progress. Default is 0.01 if created from percents, otherwise it's 1 from counts.
- Finish - call if you need to urgently finish the progress accumulated.
- Lenguaje dominante
- VBA
- Estrellas
- 412
- Forks
- 70
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sancarn/stdVBA
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
-
Issues of stdRefArrayAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Todos los issues de sancarn/stdVBA
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Исправить опечатки в протоколеAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
GameShowLDA/AskMkiM#1075 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
FriendsofECCE/ECCE#731 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
penso/herdr-gpui#934 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Y-ASLant/ElegantClipboard#178 ·