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.
Here are some links to get involved with the project:
- twinBASIC Installation Guide
- GitHub Issue Tracker (report bugs)
- twinBASIC Discord Server (chat about the project)
Settings Filter Bar
Wayne added a filter bar to the Settings area to make it easier to find and change project settings:
Added a Predeclared Global Class
As of version 0.14.10, the "
LoadResString [have been] moved to the
Global predeclared class, as per VB6."
The App class itself is still incomplete, as it currently implements only the following properties:
To get updates on the status of the remaining App properties, follow GitHub issue 143, VB6 App object not supported.
Around the Web
Error Handling Settings When Debugging twinBASIC
Kr00l started a discussion about how twinBASIC should replicate the "Error Trapping" IDE options from VBx:
Here's Wayne's response:
At the moment, the tB debugger is in a sort of mixed mode.... "Break On Unhandled Errors AND in Class Modules". This is what I consider to be a more natural way of debugging... since it more accurately reflects what happens when you compile to an EXE/DLL. For example, if we compile your OERN example in VB6 to an EXE, the error does propagate back to Main() and the code does continue beyond the .Test call as expected without interruption... so the current tB debugging behaviour matches that.
That said, I do agree that we should still offer
Break on Unhandled Errorsand
Break in Class Modulesmodes of course.
Ben Clothier recommended adding support for a debugger-specific attribute as this setting only changes behavior of the code while running in the debugger and not at runtime:
I'm thinking it will be clearer to decorate with something like:
No More Separate Update Needed for the WinForms Controls Package
Wayne dropped the following nugget of information in the twinBASIC Discord server:
[Starting February 14, 2022], the Windows controls package and the CustomControlsPackage will be included as part of the compiler deployment. This means that when we release a new version of the compiler, you won't need to do anything in your projects in order to get the latest up-to-date version of the forms implementation; your projects will automatically reference the latest version that shipped with the compiler.
This is a welcome addition, as it removes a manual step that was previously required if you wanted to see updates in the twinBASIC WinForms controls package.
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.14.18, 12th February 2022]
- fixed: some edge cases involving Global.LoadPicture
- improved: config/settings editor now doesn't use fancy unicode characters for arrows [ https://github.com/WaynePhillipsEA/twinbasic/issues/730 ]
- improved: config-settings editor now has a filter/search bar
[v0.14.17, 11th February 2022]
- added: Global.LoadPicture method
[v0.14.16, 11th February 2022]
- fixed: compiler crash involving bad syntax on lines using AddressOf [ https://github.com/WaynePhillipsEA/twinbasic/issues/729 ]
[v0.14.15, 11th February 2022]
- improved: IDE now accepts
ByRef Optionaland auto-corrects it to its proper form, like in VBx [ https://github.com/WaynePhillipsEA/twinbasic/issues/698 ]
- improved: IDE now shows unresolved datatype names appropriately (e.g.
LongLong) [ https://github.com/WaynePhillipsEA/twinbasic/issues/693 ]
[v0.14.14, 10th February 2022]
- fixed: handling of IDIspatch::Invoke where arrays are returned rather than property-get accessors being exposed on the client side [ https://github.com/WaynePhillipsEA/twinbasic/issues/720 ]
- fixed: surplus data being display in debug output [ https://github.com/WaynePhillipsEA/twinbasic/issues/725 ]
[v0.14.13, 10th February 2022]
- changed: the compiler itself is now seperated into an EXE plus DLL configuration [ https://github.com/WaynePhillipsEA/twinbasic/issues/723#issuecomment-1034124546 ]
- fixed: passing a predeclared object symbol to a ByRef-Variant parameter was not triggering the As-New semantics creation of the object [ https://github.com/WaynePhillipsEA/twinbasic/issues/722 ]
- improved: embedded NULL characters in BSTRs now get output as spaces in the Debug Console, to match VBx Immediate Window behaviour [ https://github.com/WaynePhillipsEA/twinbasic/issues/722#issuecomment-1034018752 ]
- improved: further changes made to avoid Defender / Firewall being triggered when opening the form designer [ https://github.com/WaynePhillipsEA/twinbasic/issues/723 ]
- fixed: runtime crash when a form was moved to another monitor, or if a DPI change occured [ https://github.com/WaynePhillipsEA/twinbasic/issues/724 ]
[v0.14.12, 10th February 2022]
- improved: tweaked the Form Designer websocket parameters to try avoid triggering Windows Firewall [ https://github.com/WaynePhillipsEA/twinbasic/issues/723 ]
[v0.14.11, 9th February 2022]
- added: VBRUN.SystemColorConstants.vbInactiveTitleBarText to match VB6 [ https://github.com/WaynePhillipsEA/twinbasic/issues/721 ]
- fixed: regression, LoadResPicture / LoadResData / LoadResString broken in last build
Windows Forms Controlspackage v0.0.9 released with Font fix [ https://github.com/WaynePhillipsEA/twinbasic/issues/706#issuecomment-1033828143 ]
[v0.14.10, 9th February 2022]
LoadResStringnow moved to the
Globalpredeclared class, as per VB6
- fixed: global
Clipboardobjects are no longer creatable, like in VB6 [ https://github.com/WaynePhillipsEA/twinbasic/issues/717 ]
- fixed: significant change to how UDTs are finalized. sub-UDT finalization now doesn't depend on declaration order [ https://github.com/WaynePhillipsEA/twinbasic/issues/190 ]
[v0.14.9, 8th February 2022]
- fixed: import VBP project relative-paths issue [ https://github.com/WaynePhillipsEA/twinbasic/issues/703 ]
- fixed: memory-fragmentation issue on x64 [ https://github.com/WaynePhillipsEA/twinbasic/issues/699 ]
- updated: Windows Forms Control package to v0.0.8, to fix Timer Width/Height issue in constructor causing an unhandled error in compiled EXEs
- improved: '(add)' feature in the array lists on the property sheet now focuses the text element that just got added, ready for data entry
- added: constant OLEDropEffectConstants.vbDropEffectLink to match OLE DROPEFFECT_LINK constant [ https://github.com/WaynePhillipsEA/twinbasic/issues/713 ]
[v0.14.8, 7th February 2022]
- fixed: import from large VBP projects now succeed [ https://github.com/WaynePhillipsEA/twinbasic/issues/703 ]
- added: most of the missing enumerations/constants from VBRUN library
- fixed: a few parser / compiler bugs resulting in miscompilation in rare circumstances
- fixed: constants can now be defined as fixed length strings for VBx compatibility
- fixed: Redim followed by Else on the same line from a single-line-if statement was not parsing correctly
- improved: test case failures now report dirty booleans in the assertion report [ https://github.com/WaynePhillipsEA/twinbasic/issues/697 ]
- fixed: Sanitize booleans option wasn't working in all circumstances [ https://github.com/WaynePhillipsEA/twinbasic/issues/697 ]