Table of Contents

2.1 Implicit Storage

MS-VBAL explicitly presumes an implementation-dependent storage mechanism outside the scope of its own specification. RD-VBAL explicitly specifies these mechanisms. This decouples the language semantics from implementation-dependent storage.

The environment host is responsible for configuring the implicit storage of the host VBA environment, and for loading any application settings and additional workspace resources into the runtime environment (see RD-VBAL §2.3.1 Composition Root).

2.1.1 Application Settings

MS-VBAL addresses legitimate application configuration concerns through an API exposed in the standard library, whose storage it leaves implementation-defined:

Member Specification
GetAllSettings MS-VBAL §6.1.2.8.1.7 GetAllSettings
GetSetting MS-VBAL §6.1.2.8.1.10 GetSetting
DeleteSetting MS-VBAL §6.1.2.8.2.3 DeleteSetting
SaveSetting MS-VBAL §6.1.2.8.2.4 SaveSetting

MS-VBA keeps these settings in the Windows Registry, under HKEY_CURRENT_USER\Software\VB and VBA Program Settings. RD-VBA keeps them in the workspace application settings by default: application appName's key key of section section is the setting ProgramSettings:appName:section:key of the workspace's appsettings.json.

Important

The LegacyRegistrySettings environment setting (appsettings.json of the environment host, Configuration:Environment) sets the storage of these members to the Windows Registry, as MS-VBA has it. Only Windows has a registry: elsewhere the setting is ignored, and the workspace application settings are used either way.

RD-VBA also adds members that manage the workspace application settings explicitly, whatever the legacy members use:

Member Specification SDK member
🧩 GetAllJsonSettings RD-VBAL §6.1.2.8.1.7.1 GetAllJsonSettings IStdInteractionModule.GetAllJsonSettings
🧩 GetJsonSetting RD-VBAL §6.1.2.8.1.10.1 GetJsonSetting IStdInteractionModule.GetJsonSetting
🧩 SaveJsonSetting RD-VBAL §6.1.2.8.2.4.1 SaveJsonSetting IStdInteractionModule.SaveJsonSetting

There is no DeleteJsonSetting: a configuration file is the workspace's to edit, and DeleteSetting covers the settings a program keeps for itself.

2.1.1.1 Workspace Application Settings

Rule Description
Location A workspace may include one or more .json configuration file(s), at its root or under any of its subfolders. A file outside the workspace, or that is not a .json file, is refused (error 5).
File name appsettings.json at the workspace root is the default. The config argument of the RD-VBA members names another file, relative to the workspace root.
Reading A setting is read through a .NET managed IConfiguration built over the file: a path is its sections separated by :, compared without regard to case; an array's elements are its sections 0, 1, ...; a number or a Boolean reads as its text. A file that is not there has no settings; a file that is not JSON is error 321.
Writing A setting is written as a JSON string under the sections of its path, each created when it is not there. A file that is written to is written whole, indented, and without its comments.
Binding The environment host (rdc.exe) binds the workspace's settings as the runtime session is composed.

An analysis reaches no settings: what it saves is not kept, and nothing is read.

The ErlLineNumbering environment setting is bound from appsettings.json, with the rest of the runtime profile (see RD-VBAL §6.1.2.7.1.14 Erl).


⏮️ RD-VBAL §2.0.2 Client/Server Capabilities | ⏭️ RD-VBAL §2.2 RDPROJ Structure