Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

stdProgress

オープン
#38 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
32/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
visualbasic
領域
desktop, tooling

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

enhancement lib-stdProgress

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
  1. We divide the work into a 0.9 and 0.1 split, i.e. 90% and 10%.
  2. We subdivide the 90% into workbook.count parts. Assume 2 workbooks are open, so that's 45% each.
  3. We subdivide the 45% into wb.sheets.count parts. Assume 5 sheets per workbook so 9% per sheet.
  4. We step for every sheet name added to the workbook incrementing up the tree till the parent, which updates the form.
  5. Upon finishing we've updated 90% of the progress, 10% remains
  6. We divide this 10% into the number of sheets (10) so 1% for each sheet.
  7. Each sheet we increment by this value
  8. 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.
主要言語
VBA
スター
412
フォーク
70
平均マージ
20時間 38分
マージ済み PR(30日)
18

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sancarn/stdVBA のほかの issue

sancarn/stdVBA の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。