On April 23, 2021, I helped Wayne Phillips introduce the world to twinBASIC at the Access DevCon Vienna conference. I boldly predicted that twinBASIC (along with the Monaco editor) would replace VBA and its outdated development environment by 2025. With that goal in mind, this weekly update is my attempt to keep the project fresh in the minds of the VBA development community.
Every Sunday, I will be providing updates on the status of the project, linking to new articles discussing twinBASIC, and generally trying to increase engagement with the project. If you come across items that should be included here, tweet me @NoLongerSet or email me at mike at nolongerset dot com.
Package Manager Panel
One of the more exciting long-term features of twinBASIC is the Package Manager feature.
This should enable simple sharing of custom code among twinBASIC developers. It will also (eventually) support the creation of commercial packages. Due to preview limitations, the full source code is currently included (as read-only) with twinBASIC packages. Distributing closed-source packages is on the roadmap.
To help simplify the management of twinBASIC packages, Wayne has added a package manager alongside the COM References user interface:
As the "TIP" implies in the above screenshot, you can now create private packages, where the package can only be seen and downloaded by the package author.
Semantic Versioning Support
As of v0.13.76, twinBASIC version numbers now allow for Major, Minor, Revision, and Build numbers. This provides support for Semantic Versioning, which is an especially nice feature for packages which are meant to be consumed by other developers.
If you are not familiar with it, Semantic Versioning builds meaning into version numbers. For example, any breaking change requires a new Major version number under the Semantic Versioning approach. This lets users of your code know by looking at the version number alone whether they can safely update to the latest version of your package.
There were some general improvements and fixes to the IntelliSense feature this week, including:
- IntelliSense latency performance improved on large projects by around 50%
- IntelliSense no longer lists class constructors/destructors
- IntelliSense no longer shows private information
- Fixed bug where IntelliSense suggestions did not appear on first opening a project until after a few keystrokes
Around the Web
TWINSERV: Official twinBASIC Package Server
Along with the release of the twinBASIC Package Manager (see item above), Wayne also introduced a twinBASIC Package Server, named TWINSERV.
TWINSERV integrates with the twinBASIC VS Code extension to make sharing twinBASIC packages with other users very easy. Wayne's Custom Controls, previously distributed as source code within Sample Project #6, is now deployed as a package via TWINSERV. Wayne also converted and released his File Property Explorer code (originally released as a downloadable MS Access database in 2010) as a TWINSERV-hosted package.
For more information about working with TWINPACK packages and the TWINSERV package server, refer to the twinBASIC wiki's Package section:
- What's a package?
- Creating a TWINPACK package
- Importing a package from TWINSERV
- Importing a package from a TWINPACK file
Important Notes about CustomControls
I wanted to highlight the following notes from Wayne's announcement of the custom controls library being released as a TWINPACK package:
As of v0.13.84, the custom controls are now available in a TWINPACK package. From now on, only add the
[twinBASIC Extension] Custom Controls Library [v1.0]reference if you are designing a new custom control.
To use the provided (experimental) custom controls, you should now instead reference the package
CustomControlsPackage, available via the package manager service.
This means that you no longer need the zTemporarySupport.twin file, nor the WaynesGrid.twin files (etc), in your main project, and should delete all of them if you already have them to avoid conflicts going forward.
Quickly Report Bugs from within VSCode
Wayne has added a link to the twinBASIC panel that takes you directly to the GitHub issues page to report a bug:
Clicking the link will take you to the root "Issues" page in the GitHub project. From here, there are two steps to reporting the bug:
Step 1. Enter a description of the bug in the filters/search box to see if there is already an existing bug report:
If there is a match, add a comment to the existing issue with any helpful context that may aid in troubleshooting. In this case, there is no need to create an additional issue in GitHub.
Step 2. If there are no matches, open a new issue by clicking [New Issue] > Bug report: [Get started] > then complete the template and [Submit new issue]:
The only potential downside to removing friction from bug reporting is that it may result in excessive duplicate bug reports. So, when you use this feature, be sure to do that quick search of the GitHub repository to see if the bug has already been reported.
Congrats to the New twinBASIC GitHub Moderators
One sign of a successful and growing community is the need for moderation.
As the twinBASIC GitHub Issues project has generated more discussion (the site routinely gets ~200 comments per week now, even with an official Discord server as another outlet for project discussion), the time required to moderate that discussion has grown, too.
With an already full plate when it comes to actual development of twinBASIC, Wayne has enlisted the help of two of the top contributors to the twinBASIC GitHub discussion, Ben Clothier (@bclothier) and Krool (@Kr00l).
Here are the updates from the past week. You can also find this information by installing the twinBASIC VS Code extension and clicking on the Changelog tab of the extension page:
[v0.13.91, 23rd January 2022]
- fixed: Public class field members using As-New semantics further fixed
[v0.13.90, 22nd January 2022]
- fixed: Public class field members using As-New semantics were generating vtable members that didn't auto-instantiate the backing field
[v0.13.89, 22nd January 2022]
- fixed: package files are now immediately locked once a package is added, instead of only becoming locked upon compiler restart [ https://github.com/WaynePhillipsEA/twinbasic/issues/681 ]
- fixed: intellisense suggestions not opening on first opening a project, until after a few keystrokes
[v0.13.88, 21st January 2022]
- improved: intellisense latency performance on large projects by around 50%
- improved: further performance improvement to Implements-Via feature
- fixed: constructors and destructors should not appear in intellisense
- fixed: intellisense showing private information [ https://github.com/WaynePhillipsEA/twinbasic/issues/6 ]
[v0.13.87, 21st January 2022]
- improved: TWINSERV will now reject packages with the same project ID from different publishers, regardless of private/public status [ https://github.com/WaynePhillipsEA/twinbasic/issues/680 ]
- fixed: intellisense on handles clause 'Handles X.', where X is a WithEvents array, was not working
- fixed: Implements-Via now handles the case where the field has not been set to an object gracefully
[v0.13.86, 20th January 2022]
- fixed: generic classes can now implement other interfaces, including generic interfaces [ https://github.com/WaynePhillipsEA/twinbasic/issues/676 ]
[v0.13.85, 20th January 2022]
- renamed: reference '[twinBASIC Extension] Custom Controls Library' to '[twinBASIC Extension] Custom Controls DESIGNER Library' for clarity
- fixed: Empty string handling in VBA.Strings.Split function [ https://github.com/WaynePhillipsEA/twinbasic/issues/677 ]
- improved: duplicate generic classes in the same scope will now result in a compile-error at the definition [ https://github.com/WaynePhillipsEA/twinbasic/issues/675 ]
[v0.13.84, 20th January 2022]
- added: support for WithEvents on arrays (e.g. Private WithEvents MyGroup() As Class1)
- improved: custom control examples now make use of WithEvents on arrays to allow OnChanged notifications to propagate throughout
- improved: custom controls are now deployed as a package via TWINSERV
- updated: modified the CustomControls sample (Sample 6) to use the new CustomControlsPackage on TWINSERV
- fixed: Clipboard object not binding correctly after referencing a package
- fixed: toggling references of type [twinBASIC Extension] was unsuccessful since adding the packages support
[v0.13.83, 19th January 2022]
- fixed: App and Collection members not binding correctly once a package has been referenced
[v0.13.82, 19th January 2022]
- fixed: some internal COM error handling edge cases
[v0.13.81, 19th January 2022]
- fixed: further ParamArray() As Any fixes (LSP crash, ByVal inline attribute) [ https://github.com/WaynePhillipsEA/twinbasic/issues/671 ]
- improved: ParamArray() As Any must now be defined explicitly with ByRef/ByVal to avoid confusion
- improved: SetDllDirectory attribute now allowed to be set on components to affect all contained DLL Declares [ https://github.com/WaynePhillipsEA/twinbasic/issues/672 ]
[v0.13.80, 18th January 2022]
- fixed: some issues with the new ParamArray() As Any support from v0.13.79
[v0.13.79, 18th January 2022]
- added: support for CDecl varargs using ByVal/ByRef ParamArray() As Any (for .../va_list support) [ https://github.com/WaynePhillipsEA/twinbasic/issues/3 ]
[v0.13.78, 18th January 2022]
- fixed: regression of intellisense too broad matching in v0.13.77 [ https://github.com/WaynePhillipsEA/twinbasic/issues/668#issuecomment-1015305540 ]
[v0.13.77, 18th January 2022]
- fixed: intellisense in With-block dots [ https://github.com/WaynePhillipsEA/twinbasic/issues/668 ]
- fixed: Implements-Via not working with packaged components, giving 'circular reference' error [ https://github.com/WaynePhillipsEA/twinbasic/issues/665 ]
[v0.13.76, 17th January 2022]
- added: support for PRIVATE packages, where the package can only be seen and downloaded by the package author
- improved: added a new 'TWINBASIC PACKAGE MANAGER' panel, and moved the 'PUBLISH PACKAGE' button into it, along with Sign-in/out buttons
- added: App.Major, App.Minor, App.Revision and App.Build version number properties [ https://github.com/WaynePhillipsEA/twinbasic/issues/143 ]
- improved: version number settings now always available from the twinBASIC extension panel
- fixed: regression of intellisense being broken in BAS/CLS files [ https://github.com/WaynePhillipsEA/twinbasic/issues/652 ]