Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 12 additions & 48 deletions docs/Miscellaneous/Documentation Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,56 +81,20 @@ These are modules within VBA and VBRUN:
>
> All non-alphabetic characters, as well as parameters, are removed from the links. All attribute names are in lowercase in the links. E.g. `ArrayBoundsChecks(Bool)` is referenced as `/tB/Core/Attributes#arrayboundschecks`.

- [AppObject](../tB/Core/Attributes#appobject)
- [ArrayBoundsChecks](../tB/Core/Attributes#arrayboundschecks)
- [BindOnlyIfNoArguments](../tB/Core/Attributes#bindonlyifnoarguments)
- [BindOnlyIfStringSuffix](../tB/Core/Attributes#bindonlyifstringsuffix)
- [ClassId](../tB/Core/Attributes#classid)
- [CoClassCustomConstructor](../tB/Core/Attributes#coclasscustomconstructor)
- [CoClassId](../tB/Core/Attributes#coclassid)
- [COMControl](../tB/Core/Attributes#comcontrol)
- [COMCreatable](../tB/Core/Attributes#comcreatable)
- [COMExtensible](../tB/Core/Attributes#comextensible)
- [ComImport](../tB/Core/Attributes#comimport)
- [CompileIf](../tB/Core/Attributes#compileif)
- [CompilerOptions](../tB/Core/Attributes#compileroptions)
- [ConstantFoldable](../tB/Core/Attributes#constantfoldable)
- [ConstantFoldableNumericsOnly](../tB/Core/Attributes#constantfoldablenumericsonly)
- [Debuggable](../tB/Core/Attributes#debuggable)
- [DebugOnly](../tB/Core/Attributes#debugonly)
- [Description](../tB/Core/Attributes#description)
- [DispId](../tB/Core/Attributes#dispid)
- [DllExport](../tB/Core/Attributes#dllexport)
- [DLLStackCheck](../tB/Core/Attributes#dllstackcheck)
- [EnforceErrors](../tB/Core/Attributes#enforceerrors)
- [EnforceWarnings](../tB/Core/Attributes#enforcewarnings)
- [EnumId](../tB/Core/Attributes#enumid)
- [EventInterfaceId](../tB/Core/Attributes#eventinterfaceid)
- [EventsUseDispInterface](../tB/Core/Attributes#eventsusedispinterface)
- [Flags](../tB/Core/Attributes#flags)
- [FloatingPointErrorChecks](../tB/Core/Attributes#floatingpointerrorchecks)
- [FormDesignerId](../tB/Core/Attributes#formdesignerid)
- [Hidden](../tB/Core/Attributes#hidden)
- [IdeButton](../tB/Core/Attributes#idebutton)
- [IntegerOverflowChecks](../tB/Core/Attributes#integeroverflowchecks)
- [InterfaceId](../tB/Core/Attributes#interfaceid)
- [AppObject](../tB/Core/Attributes#appobject), [ArrayBoundsChecks](../tB/Core/Attributes#arrayboundschecks)
- [BindOnlyIfNoArguments](../tB/Core/Attributes#bindonlyifnoarguments), [BindOnlyIfStringSuffix](../tB/Core/Attributes#bindonlyifstringsuffix)
- [ClassId](../tB/Core/Attributes#classid), [ClassInterface](../tB/Core/Attributes#classinterface), [CoClassCustomConstructor](../tB/Core/Attributes#coclasscustomconstructor), [CoClassId](../tB/Core/Attributes#coclassid), [COMControl](../tB/Core/Attributes#comcontrol), [COMCreatable](../tB/Core/Attributes#comcreatable), [COMExtensible](../tB/Core/Attributes#comextensible), [ComImport](../tB/Core/Attributes#comimport), [CompileIf](../tB/Core/Attributes#compileif), [CompilerOptions](../tB/Core/Attributes#compileroptions), [ConstantFoldable](../tB/Core/Attributes#constantfoldable), [ConstantFoldableNumericsOnly](../tB/Core/Attributes#constantfoldablenumericsonly)
- [Debuggable](../tB/Core/Attributes#debuggable), [DebugOnly](../tB/Core/Attributes#debugonly), [DefaultMember](../tB/Core/Attributes#defaultmember), [Description](../tB/Core/Attributes#description), [DispId](../tB/Core/Attributes#dispid), [DispInterface](../tB/Core/Attributes#dispinterface), [DllExport](../tB/Core/Attributes#dllexport), [DLLStackCheck](../tB/Core/Attributes#dllstackcheck), [DualInterface](../tB/Core/Attributes#dualinterface)
- [EnforceErrors](../tB/Core/Attributes#enforceerrors), [EnforceWarnings](../tB/Core/Attributes#enforcewarnings), [EnumId](../tB/Core/Attributes#enumid), [EventInterfaceId](../tB/Core/Attributes#eventinterfaceid), [EventsUseDispInterface](../tB/Core/Attributes#eventsusedispinterface)
- [Flags](../tB/Core/Attributes#flags), [FloatingPointErrorChecks](../tB/Core/Attributes#floatingpointerrorchecks), [FormDesignerId](../tB/Core/Attributes#formdesignerid), [Hidden](../tB/Core/Attributes#hidden)
- [IdeButton](../tB/Core/Attributes#idebutton), [IgnoreWarnings](../tB/Core/Attributes#ignorewarnings), [IntegerOverflowChecks](../tB/Core/Attributes#integeroverflowchecks), [InterfaceId](../tB/Core/Attributes#interfaceid)
- [MustBeQualified](../tB/Core/Attributes#mustbequalified)
- [OleAutomation](../tB/Core/Attributes#oleautomation)
- [PackingAlignment](../tB/Core/Attributes#packingalignment)
- [PopulateFrom](../tB/Core/Attributes#populatefrom)
- [PredeclaredID](../tB/Core/Attributes#predeclaredid)
- [PreserveSig](../tB/Core/Attributes#preservesig)
- [Restricted](../tB/Core/Attributes#restricted)
- [RunAfterBuild](../tB/Core/Attributes#runafterbuild)
- [Serialize](../tB/Core/Attributes#serialize)
- [SetDllDirectory](../tB/Core/Attributes#setdlldirectory)
- [SimplerByVals](../tB/Core/Attributes#simplerbyvals)
- [TestCase](../tB/Core/Attributes#testcase)
- [TestFixture](../tB/Core/Attributes#testfixture)
- [TypeHint](../tB/Core/Attributes#typehint)
- [Unimplemented](../tB/Core/Attributes#unimplemented)
- [UseGetLastError](../tB/Core/Attributes#usegetlasterror)
- [UserDefinedTypeIsAnAlias](../tB/Core/Attributes#userdefinedtypeisanalias)
- [PackingAlignment](../tB/Core/Attributes#packingalignment), [PopulateFrom](../tB/Core/Attributes#populatefrom), [PredeclaredID](../tB/Core/Attributes#predeclaredid), [PreserveSig](../tB/Core/Attributes#preservesig)
- [Restricted](../tB/Core/Attributes#restricted), [RunAfterBuild](../tB/Core/Attributes#runafterbuild)
- [Serialize](../tB/Core/Attributes#serialize), [SetDllDirectory](../tB/Core/Attributes#setdlldirectory), [SimplerByVals](../tB/Core/Attributes#simplerbyvals)
- [TestCase](../tB/Core/Attributes#testcase), [TestFixture](../tB/Core/Attributes#testfixture), [TypeHint](../tB/Core/Attributes#typehint)
- [Unimplemented](../tB/Core/Attributes#unimplemented), [UseGetLastError](../tB/Core/Attributes#usegetlasterror), [UserDefinedTypeIsAnAlias](../tB/Core/Attributes#userdefinedtypeisanalias)
- [WindowsControl](../tB/Core/Attributes#windowscontrol)

## Development Environment
Expand Down
71 changes: 67 additions & 4 deletions docs/Reference/Attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ Applicable to: [**Class**](Class)

Assigns a COM CLSID to a class. For details, [see this COM documentation page](https://learn.microsoft.com/en-us/windows/win32/com/com-class-objects-and-clsids).

## ClassInterface

twinBASIC doesn't supports this attribute directly. It supports its values under different names. See:

* [DualInterface](#dualinterface)
* [DispInterface](#dispinterface)


## CoClassCustomConstructor (String)
{: #coclasscustomconstructor }

Expand Down Expand Up @@ -208,7 +216,7 @@ Applicable to: [**Class**](Class)

Syntax: **[Debuggable** [ **( True** \| **False )** ] **]**

Applicable to: [**Module**](Module), [procedure in a Class or Module](../Gloss#procedure)
Applicable to: [**Module**](Module), [procedure in a **Class** or **Module**](../Gloss#procedure)

When false, turns of breakpoints and stepping for the method or module. The default value is **True**.

Expand All @@ -221,6 +229,36 @@ Applicable to: [procedure definitions](../Gloss#procedure)

Excludes calls to this procedure from the Build. They are only available when running from the IDE, i.e. debugging.

## DefaultMember (optional Bool)

{: #defaultmember }

Syntax: **[DefaultMember** [ **(** **True** \| **False** **)** ] **]**

Applicable to: [procedure in a **Class**](../Gloss#procedure)

Default members are accessed under the instance of the object itself, without specifying their name. For example, a class that offers indexable elements may have an **Item** property that is the default member:

```vb
Class MyCollection
[DefaultMember]
Property Get Item(ByVal index&) As String
' ...
End Property

[DefaultMember]
Property Let Item(ByVal index&, ByVal value$)
' ...
End Property
End Class

Sub Example()
Dim coll As New MyCollection
Debug.Print "Item #3: ", coll(3) ' Property Get Item is invoked
coll(4) = "Item 4" ' Property Let Item is invoked
End Sub
```

## Description (String)
{: #description }

Expand All @@ -237,7 +275,18 @@ Syntax: **[DispId(** 123 **)]**

Applicable to: [procedure in an Interface](../Gloss#procedure)

Defines a dispatch ID associated with the procedure.
Defines a dispatch ID associated with the procedure when exposed via **IDispatch**.

## DispInterface

Syntax: **[DispInterface]**

Applicable to: [**Interface**](Interface) in a **Library**

> [!NOTE]
> This attribute is generated in the **Library** modules that twinBASIC generates for COM references in a project. It cannot be manually created.

Indicates that the interface exposes methods via **IDispatch** late-binding. This is the default. Note that [**DualInterface**](#dualinterface) can also be specified, giving much improved performance over that of **IDispatch**-based interfaces.

## DllExport (optional Bool)
{: #dllexport }
Expand All @@ -262,6 +311,18 @@ Applicable to: [**Declare** (API declaration)](Declare)

Gives minor codegen size reduction on 32-bit API calls on the Intel platform. Has no effect on other platforms.

## DualInterface

Syntax: **[DualInterface]**

Applicable to: [**Interface**](Interface) in a **Library**

> [!NOTE]
>
> This attribute is generated in the **Library** modules that twinBASIC generates for COM references in a project. It cannot be manually created.

Indicates that the interface exposes methods through the OLE VTable binding. The latter has much improved performance over that of **IDispatch**-based interfaces.

## EnforceErrors (optional Bool)
{: #enforceerrors }

Expand Down Expand Up @@ -341,10 +402,12 @@ Syntax: **[IdeButton("** caption **")]**

Applicable to: [procedure](../Gloss#procedure) definition in a module.

## IgnoreWarnings (optional Bool)
## IgnoreWarnings (String List)
{: #ignorewarnings }

Syntax: **[IgnoreWarnings** [ **( True** \| **False )** ] **]**
Syntax: **[IgnoreWarnings** **(** **TBnnnn** [ **,** **TBmmmm** ]... **)** **]**

Disables certain warnings. The list of strings should enumerate the warnings that are to be suppressed.

## IntegerOverflowChecks (optional Bool)
{: #integeroverflowchecks }
Expand Down