You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ba57d0e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: WIP.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ sibling. History goes nowhere: git keeps it.
33
33
34
34
Reference documentation is **complete** for all thirteen packages: VBA, VBRUN, VB, WebView2, Assert, CustomControls, CEF, WinEventLogLib, WinNamedPipesLib, WinServicesLib, tbIDE, WinNativeCommonCtls and AppGlobalClassObject. It is adapted from primary sources: Microsoft VBA-Docs (CC-BY-4.0) for the runtime library, `.twin` source for the twinBASIC-specific packages. The CEF and WebView2 packages also carry a tutorial set.
35
35
36
-
Eleven **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: FileProps, Fmt, OLEGuids, WinReg, TwinTimerPackage, TBMANLIB_ListBoxHScroll, TBMANLIB_RES and VBA_JSON complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; OLEGuids documents each interface's methods on the interface's page. Each published one has a chapter in the book's Packages part. **BigNumberLib and WinReg are not published**: their packages do not compile on BETA 1005, so their pages are kept but excluded in `_config.yml`'s `exclude:` (owner, 2026-10-11), whose comment says how to bring one back.
36
+
Fourteen **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: FileProps, Fmt, OLEGuids, WinReg, TwinTimerPackage, TBMANLIB_Dialog, TBMANLIB_ListBoxHScroll, TBMANLIB_RES, tbProjPacker, tbRegExp and VBA_JSON complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names. tbRegExp's `exclude_from_docs` names its private engine module, `StaticRegex`, and tbProjPacker's its helper modules, `modPackUnpack` and `modWin32`: the indexer counts a Public Enum as public even inside a Private Module, because a built-in package's are reached through its library symbol written with an asterisk (`*WinNativeCommonCtls`, as `ImlDrawConstants` says). By its bare name no such enum is reachable, in a built-in or a contributed package (TB5079 on BETA 1005). OLEGuids documents each interface's methods on the interface's page. What TBMANLIB_Dialog's pages say its dialogs do comes from `test/package-probes/TBMANLIB_Dialog/`, which operates them in a built exe on a private desktop; run it again when the package's version changes. tbRegExp is the first section drafted by the doc-draft workflow ([WIP.Indexer.md](WIP.Indexer.md#draft-and-the-doc-draft-workflow)), then reviewed against the sources, the package's README and VBScript's own **RegExp** under `cscript`. Each published one has a chapter in the book's Packages part. **BigNumberLib and WinReg are not published**: their packages do not compile on BETA 1005, so their pages are kept but excluded in `_config.yml`'s `exclude:` (owner, 2026-10-11), whose comment says how to bring one back.
37
37
38
38
The rest of this file is the maintenance guide for updating existing pages or adding new ones: package surface notes, page conventions, and the integrity check.
Copy file name to clipboardExpand all lines: docs/Documentation/Tools-Build.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,7 +188,7 @@ A name that matches no package is reported, the other packages are done, and the
188
188
189
189
`sync`judges a package by what the store holds, never by the manifest. A package is read again when the store lacks its sources or its `api.json`, or holds an `api.json` in an older format or from another build. A package whose `api.json` another version of the scanner wrote is indexed again from the sources already in the store, with no download. A clone has no store, so its first `sync` reads every package.
190
190
191
-
**Which packages are documented.** A section of the reference documents a package when its folder under `docs/Reference/Default/`, `Built-In/` or `Contributed/` has an `index.md`, and the landing page's `package_name` lists the package (without that key, the folder's name is the package's). The page's `package_name`, `indexed_from`, `exclude_from_docs` and `exclude_kinds` are described under [Frontmatter and permalinks](Authoring#frontmatter-and-permalinks); the indexer reads them and the build does not put them into any page. `sync` copies a package's `api.json` to `indexer/snapshots/` only if the reference documents the package and that run indexed it.
191
+
**Which packages are documented.** A section of the reference documents a package when its folder under `docs/Reference/Default/`, `Built-In/` or `Contributed/` has an `index.md`, and the landing page's `package_name` lists the package (without that key, the folder's name is the package's). The page's `package_name`, `indexed_from`, `exclude_from_docs` and `exclude_kinds` are described under [Frontmatter and permalinks](Authoring#frontmatter-and-permalinks); the indexer reads them and the build does not put them into any page. `sync` copies a package's `api.json` to `indexer/snapshots/` only if the reference documents the package and that run indexed it, or the package has no snapshot yet and the store's `api.json` is of the version its section's `indexed_from` names. The second case is a new section: its package was synced before the section existed, so the next `sync` finds the store up to date and indexes nothing.
192
192
193
193
**What `analyze` reports.** By default it covers the documented packages and says how many others it left out. `--package` and `--packages` name any package. A package that no section documents has no pages to compare with, so every public symbol of it is listed as one to create, and so it is for every package under `--all`. A symbol is a type, or a name that a type declares: the Get, Let and Set of a property, and the overloads of a name, are one symbol, as the reference has one page for each. Only Public and Protected members of public types count, less what `exclude_from_docs` and `exclude_kinds` name. Each package is analyzed in one of two modes.
: *required* An object expression that evaluates to a **cDialog**.
17
+
18
+
*strDescription*
19
+
: *required* A **String**, the text that the dialog shows for the pair, such as `Text Files (*.txt)`.
20
+
21
+
*strExtension*
22
+
: *required* A **String**, the pattern that selects the files, such as `*.txt`. Several patterns are separated by semicolons: `*.jpg;*.jpeg`.
23
+
24
+
## Remarks
25
+
26
+
**AddFilter** appends `description|pattern` to the text of **Filter**, with a `|` in front of it when **Filter** is not empty. The first pair added is the one that the dialog selects when it opens.
27
+
28
+
A filter with one pair gives a file-type list with one item. Despite its name, *strExtension* is a pattern, and the class uses the text as it is: it adds no `*.` in front. Write the pattern in the form that the Windows documentation of `OPENFILENAME` gives, such as `*.txt`.
29
+
30
+
The class does not check the arguments. A `|` in either one adds an element, so the later elements are no longer paired correctly.
31
+
32
+
## Example
33
+
34
+
```tb check_build check_run
35
+
Dim dlg As New cDialog
36
+
dlg.AddFilter "Text Files (*.txt)", "*.txt"
37
+
dlg.AddFilter "Pictures", "*.png;*.jpg"
38
+
Debug.Print dlg.Filter ' Text Files (*.txt)|*.txt|Pictures|*.png;*.jpg
39
+
```
40
+
41
+
A `|` in a description makes three elements out of two:
Empties the [**Filter**](Filter) of the Open and Save As dialogs.
12
+
13
+
Syntax: *object*.**ClearFilter**
14
+
15
+
*object*
16
+
: *required* An object expression that evaluates to a **cDialog**.
17
+
18
+
## Remarks
19
+
20
+
**ClearFilter** sets **Filter** to an empty string, as `dlg.Filter = ""` does. The four `Set...Filters` methods call it first, so each of them replaces the filter.
21
+
22
+
## Example
23
+
24
+
```tb check_build check_run
25
+
Dim dlg As New cDialog
26
+
dlg.AddFilter "Text Files (*.txt)", "*.txt"
27
+
Debug.Print Len(dlg.Filter) > 0 ' True
28
+
29
+
dlg.ClearFilter
30
+
Debug.Print Len(dlg.Filter) ' 0
31
+
```
32
+
33
+
## See Also
34
+
35
+
-[Filter](Filter) property -- the whole list as one string
36
+
-[AddFilter](AddFilter) method -- appends a pair
37
+
-[Reset](Reset) method -- clears the filter along with every other property
Returns or sets whether the Open dialog asks permission before it accepts the name of a file that does not exist.
12
+
13
+
Syntax: *object*.**CreatePrompt**[ = *boolean*]
14
+
15
+
*object*
16
+
: *required* An object expression that evaluates to a **cDialog**.
17
+
18
+
*boolean*
19
+
: A **Boolean**. **True** sets `OFN_CREATEPROMPT`. The default is **False**.
20
+
21
+
## Remarks
22
+
23
+
Only [**ShowOpen**](ShowOpen) uses the property. [**ShowSave**](ShowSave) never sets `OFN_CREATEPROMPT`, and [**ShowBrowseForFolder**](ShowBrowseForFolder) ignores the property.
24
+
25
+
When the user types the name of a file that does not exist, such as `nosuch.txt`, the box *This file doesn't exist. Create the file?* appears, with the buttons *Yes* and *No*. *Yes* closes the dialog and returns the path. *No* leaves the dialog open. This happens whether [**FileMustExist**](FileMustExist) is **True** or **False**, so the question takes the place of the *File not found* box that **FileMustExist** shows.
26
+
27
+
The file is not created: neither the dialog nor the class creates it, and the program has to do so.
28
+
29
+
## Example
30
+
31
+
```tb check_build check_run
32
+
Dim dlg As New cDialog
33
+
Debug.Print dlg.CreatePrompt ' False
34
+
35
+
dlg.CreatePrompt = True
36
+
Debug.Print dlg.CreatePrompt ' True
37
+
```
38
+
39
+
This example lets the user name a new file in the Open dialog and creates it when the user agrees.
40
+
41
+
```tb check_build
42
+
Dim dlg As New cDialog
43
+
Dim path As String
44
+
45
+
dlg.CreatePrompt = True
46
+
path = dlg.ShowOpen()
47
+
If Len(path) > 0 Then
48
+
If Len(Dir$(path)) = 0 Then
49
+
Open path For Output As #1
50
+
Close #1
51
+
End If
52
+
End If
53
+
```
54
+
55
+
## See Also
56
+
57
+
-[FileMustExist](FileMustExist) property -- lets only names of existing files through
58
+
-[ShowOpen](ShowOpen) method -- shows the Open dialog
Returns or sets the extension that Windows adds to a file name that the user types without one.
12
+
13
+
Syntax: *object*.**DefaultExt**[ = *string*]
14
+
15
+
*object*
16
+
: *required* An object expression that evaluates to a **cDialog**.
17
+
18
+
*string*
19
+
: A **String**, an extension written without a period, such as `txt`. The default is an empty string.
20
+
21
+
## Remarks
22
+
23
+
[**ShowOpen**](ShowOpen) and [**ShowSave**](ShowSave) pass the text as the `lpstrDefExt` member of `OPENFILENAME`. [**ShowBrowseForFolder**](ShowBrowseForFolder) ignores it.
24
+
25
+
Windows appends the extension to a name that the user types without one. Write the extension without a period. The class does not change the text, and does not take an extension from the selected pair of [**Filter**](Filter).
26
+
27
+
In the Save As dialog, with the user typing `out`:
28
+
29
+
|**DefaultExt**|**ShowSave** returns |
30
+
|---|---|
31
+
|`txt`|`<dir>\out.txt`|
32
+
|`.txt`|`<dir>\out..txt`|
33
+
| An empty string |`<dir>\out`|
34
+
35
+
`<dir>` is the folder of the dialog. A period in **DefaultExt** is kept, and gives a name with two periods. An empty **DefaultExt** appends nothing.
36
+
37
+
## Example
38
+
39
+
```tb check_build check_run
40
+
Dim dlg As New cDialog
41
+
Debug.Print "[" & dlg.DefaultExt & "]" ' []
42
+
43
+
dlg.DefaultExt = "txt"
44
+
Debug.Print dlg.DefaultExt ' txt
45
+
```
46
+
47
+
This example shows the Save As dialog and adds `.txt` to a name typed without an extension.
48
+
49
+
```tb check_build
50
+
Dim dlg As New cDialog
51
+
dlg.DefaultExt = "txt"
52
+
dlg.SetCommonFilters
53
+
Debug.Print dlg.ShowSave()
54
+
```
55
+
56
+
## See Also
57
+
58
+
-[Filter](Filter) property -- the file-type list, which does not set the extension
59
+
-[ShowSave](ShowSave) method -- shows the Save As dialog
60
+
-[ShowOpen](ShowOpen) method -- shows the Open dialog
0 commit comments