McBasic™Get McBasic™ ↗
Build 881
Runtime API

Collections, trees and drag payloads

Read the indexing and ownership rules instead of assuming every collection works like an array.

Read the task-based guide before using an isolated signature. Arguments are positional unless a signature explicitly marks an optional argument.

Collection#

Ordered values with one-based positions and optional keys.

BASIC-facing contract
Count As Long (read only)
Sub Add(item As Variant, Optional key As String)
Function Item(indexOrKey As Variant) As Variant
Sub Remove(indexOrKey As Variant)
Sub RemoveAt(index As Long)
Sub Clear()

Dictionary#

Keyed values; test Exists before reading an optional key.

BASIC-facing contract
Count As Long (read only)
Sub Add(key As String, item As Variant)
Sub SetItem(key As String, item As Variant)
Function Item(key As String) As Variant
Function Exists(key As String) As Boolean
Sub Remove(key As String)
Sub Clear()

TreeNodes#

One-based child-node collection.

BASIC-facing contract
Count As Long (read only)
Function Add(text As String) As TreeNode
Function Item(index As Long) As TreeNode
Sub RemoveAt(index As Long)
Sub Clear()

TreeNode#

A node owns its child collection. Lazy completion must preserve the request identity.

BASIC-facing contract
Text As String
Tag As Variant
Expanded As Boolean
Nodes As TreeNodes (read only)
Parent As TreeNode (read only)

DragData#

An immutable runtime payload snapshot. Accept only formats your handler can process.

BASIC-facing contract
HasText, HasFiles As Boolean (read only)
Text As String (read only)
Files As Collection (read only)
Function HasFormat(format As String) As Boolean
Function GetData(format As String) As Variant
Source baseline 20f4bfed6b · Build manifest