twinBASIC Update: August 15, 2021
Highlights include IntelliSense improvements, a 12-month twinBASIC roadmap, and a pure Win32 API GUI application written in twinBASIC.
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.
NOTE: If you are not seeing the latest twinBASIC updates in Visual Studio Code, make sure that you have the latest VS Code update. To do this, click on the gear icon in the lower-left corner of the VS Code window and choose "Check for Updates..."
Longtime readers know how I feel about IntelliSense. Saying that I'm a fan is a bit of an understatement. Some of the biggest improvements in this week's twinBASIC updates centered on improved IntelliSense support. Let's dive in.
Select Case with Enumerations
Wayne Phillips: "Select-Case control variable type is now considered for the condition expression intellisense as of v0.10.4198"
Boolean Operations and Enumerations
The following improvements appeared in v0.10.4266:
Only Creatable Classes Show in As New Dropdown
This improvement also appeared in v0.10.4266:
The inspiration for this particular IntelliSense improvement is probably related to Wayne's observation that "the majority of classes are defined in TypeLibraries with the FCANCREATE ('creatable') flag on them, even when the classes are not creatable through COM directly."
Implements and Handles
The following improvements appeared in v0.10.4333:
Around the Web
twinBASIC 12-MONTH ROADMAP
Wayne provided an updated 12-month roadmap for the twinBASIC project. Refer to the link for estimated release dates. I'll list the features themselves below.
Short-Term Features (in-progress)
- Unit Testing
- IntelliSense in the Debug Console
- Opening of VB6 .vbp project files
- Compiler Warnings
- VB6 App object support
- Ability to change referenced library namespace identifier
- Match runtime error numbers/descriptions to VB6 / VBA
- All planned issues
- Daily bug fixes
Long-Term Features (scheduled)
- File I/O Support
- 64-bit Compiler Support
- Optimized Compilations
- Forms GUI Support (three parts)
- vbWatchdog Support
- Multi-Threading Language Support
- Inheritance Language Support
- Analysis Extension API
- Edit & Continue Support
- Cross-Platform Support (two parts)
Wayne started a discussion about providing JSON-based transformations to make COM TypeLibraries more developer-friendly.
Transformations should be considered as HINTS, providing EXTRA detail or information, and not change fundamental ABI compatibility.
The idea of course is that twinBASIC will parse these files and apply the modifications to the internal type library cache to provide much richer intellisense and a better developer experience.
The plan is that twinBASIC will include the JSON transformation files in its distribution, but a new community-based open source project should be set up to create and maintain the transformation files.
The twinBASIC thread over on vbforums.com had a fair bit of new activity over the past few days. In particular, user Niya put twinBASIC through its paces and offered some constructive feedback (including many items that have already been addressed in twinBASIC updates).
Sample GUI application
Niya put together a simple GUI application in twinBASIC using pure Win32 API function calls. The sample code and a brief demo video are available here: twinBASIC Pure Win32 GUI Sample.
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.10.4378, 15th August 2021]
- fixed: error 'Server requested save of unrecognized project. Save failed.' when sometimes opening a project
- added: VS Code extension command 'twinbasic.saveProjectAndRestartCompiler' and associated icon in the twinBASIC panel
- improved: 'Start Debugging' menu command now detected and better UX
[v0.10.4359, 14th August 2021]
- improved: intellisense now available after RaiseEvent keyword [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
- improved: intellisense for Implements keyword now only shows classes and interfaces (e.g. not enums) [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
[v0.10.4333, 14th August 2021]
- fixed: Debug.Print / Debug.Assert intellisense [ https://github.com/WaynePhillipsEA/twinbasic/issues/269 ]
- improved: Handles clause now offers intellisense [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
- improved: Implements clause now offers intellisense [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
[v0.10.4276, 13th August 2021]
- fixed: paramarray for-each edge case [ https://github.com/WaynePhillipsEA/twinbasic/issues/355 ]
[v0.10.4273, 13th August 2021]
- fixed: bad syntax on fixed-length string causes compiler crash [ https://github.com/WaynePhillipsEA/twinbasic/issues/350 ]
- fixed: datatype intellisense not always working, depending on the enabled type libraries references
[v0.10.4266, 13th August 2021]
- improved: further improvements to and refining of intellisense [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
[v0.10.4198, 12th August 2021]
- fixed: passing fixed arrays as ParamArray elements [ https://github.com/WaynePhillipsEA/twinbasic/issues/347 ]
- improved: intellisense in Select-Case conditional expressions is now based on the control variable type [ https://github.com/WaynePhillipsEA/twinbasic/issues/337#issuecomment-897077715 ]
[v0.10.4166, 12th August 2021]
- fixed: debugger double-Release() of ITypeInfo in some cases, leading to instability during debugging
- fixed: evaluation of enumeration values not allowing binding to private component elements [ https://github.com/WaynePhillipsEA/twinbasic/issues/346 ]
- fixed: parameter intellisense showing incorrectly for parameters beyond the end of the parameter list [ https://github.com/WaynePhillipsEA/twinbasic/issues/337#issuecomment-897058229 ]
- improved: added assignment intellisense [ https://github.com/WaynePhillipsEA/twinbasic/issues/337#issuecomment-897058229 ]
[v0.10.4125, 11th August 2021]
- improved: intellisense for enum and boolean parameters [ https://github.com/WaynePhillipsEA/twinbasic/issues/337 ]
[v0.10.4081, 11th August 2021]
- fixed: codeLens was not working in build v0.10.4030
- improved: end-block completion when the new end point extends the last line of the document
- fixed: binding to Private Sub Main is now allowed [ https://github.com/WaynePhillipsEA/twinbasic/issues/342 ]
- fixed: for-each now holds on to a reference of the object being enumerated, not just the IEnumVARIANT interface obtained from it, since the XML library crashes without it [ https://github.com/WaynePhillipsEA/twinbasic/issues/341 ]
- fixed: debugger on-hover issue with Nothing objects [ https://github.com/WaynePhillipsEA/twinbasic/issues/341 ]
[v0.10.4030, 10th August 2021]
- fixed: support for As-New datatypes on arrays [ https://github.com/WaynePhillipsEA/twinbasic/issues/336 ]