twinBASIC Update: May 8, 2022
Highlights include version control-friendly improvements to the new IDE, an IDE Font Size setting, and a milestone for another VBx successor language, RAD Basic.
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:
- Custom twinBASIC IDE Installation Guide (NOTE: the twinBASIC VSCode extension is under a feature freeze until 2023)
- GitHub Issue Tracker (report bugs)
- twinBASIC Discord Server (chat about the project)
Highlights
Export/Import in New IDE to Support Version Control
Wayne added several features to the new IDE to support version control.
It's not quite fully integrated yet–at least not to the point where Git will work directly with the .twinproj virtual file system–but the new features should make working with version control even easier than it was with the VSCode extension.
With the new features, you can set up a twinBASIC project to export to version control-friendly text files every time you save the project.
Additionally, there is an "Import from folder..." command that will let you import a project that was previously exported to source (for example, when working on a new device or in a team environment).
Read the announcement from Wayne for all the details.
Change IDE Font Size
You can now set the font size for code windows in the IDE via Tools > IDE Options... > Font Size:
Toggle Sort Order of the Debug Console
You can now toggle the sort order of the Debug Console using the "Invert Output Direction" command available from the ellipsis menu in the upper-right corner of the Debug Console pane:
Around the Web
Try/Finally Support in twinBASIC?
Ben Clothier opened a discussion on this topic over on Github:
Is your feature request related to a problem? Please describe.
twinBASIC providesReturn
which allow us to leave the function immediately. However, there is no way to guarantee proper clean up. In other languages, this is usually managed with aTry
/Finally
block. I know that it is planned to integrate vbWatchDog which does provide bothErrEx.Catch
andErrEx.Finally
but noTry
keyword.
Describe the solution you'd like
At a minimum, implement the equivalent ofFinally
orErrEx.Finally
to make it easy to define a block of code that must be run no matter what.
The ensuing back-and-forth raised some interesting points.
RAD Basic Releases Third Alpha
RAD Basic – the Visual Basic 7 that never was – releases third alpha: Spend your weekend wallowing in the good old days, by Richard Speed at The Register
Changelog
Here are the updates from the past week. You can also find this information by visiting the GitHub twinBASIC IDE issues page.
NOTE: Development of the twinBASIC VSCode extension is paused until 2023 so that efforts can be focused on the new IDE.
BETA 31
BETA 31 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_31.zip
- fixed: regression in BETA 30 that allowed the special root files and folders (e.g. Settings file) to be deleted
- improved: 'Export Path' setting now accepts placeholders such as "${SourcePath}\${ProjectName}"
BETA 30
BETA 30 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_30.zip
- fixed: sleep-awake cycling was leaving redundant compiler processes running [ https://github.com/IDE doesn't like being put to sleep #819 ]
- added: 'Invert Output Direction' option for the debug console, available via ellipses icon menu [ https://github.com/allow displaying events in debug console in ascending or descending order #825 ]
- fixed:
DateAdd
,DatePart
andDateDiff
not working in compiled files (only working whilst debugging) [ https://github.com/DateAdd
seems to crash at runtime #827 ] - added: project setting of 'Project: Export Path' [default: empty]
- added: project setting of 'Project: Export After Save' [default: false]
- added: project setting of 'Project: Export Verbose' [default: false]
- added: 'Export Project' File menu command (Ctrl+E shortcut) [ https://github.com/Version Control with the new IDE #823#issuecomment-1114494260 ]
- added: 'Import from folder' option in the new-project dialog [ https://github.com/Version Control with the new IDE #823#issuecomment-1114494260 ]
- improved: automatically fix \n line feeds to \r\n during project import
- improved: removed the restrictions from the root project folder, allowing for any custom files to be added [ https://github.com/Version Control with the new IDE #823#issuecomment-1114822802 ]
BETA 29
BETA 29 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_29.zip
- improved: IDE panel sections are now draggable to different dockable areas, and positions are persisted across sessions
- added: 'Font Size' IDE Option, currently not applied to the form-designer
- added: Err.LastHResult read-only property to represent the HRESULT from the last COM call made from the current stack frame [ https://github.com/Support attributes? #25#issuecomment-1112860820 ]
- improved: Err.ReturnHRESULT now changed to Err.ReturnHResult for consistency with LastHResult
- fixed: typo in WinNativeForms file name (CombBox.twin -> ComboBox.twin) [ https://github.com/Windows Forms GUI Support #706#issuecomment-1112546093 ]
- fixed: replaced mention of 'VS Code' with 'IDE' in Settings description [ https://github.com/Error in description from Project: Register DLLs to HKEY_LOCAL_MACHINE #816 ]
- fixed: renamed HellowWorld.twin in Sample 2 (GetIPAddresses)
- fixed: (regression) Project > References menu option was presenting an 'undefined' error
- fixed: Description attribute on members was not being output in the generated type library correctly [ https://github.com/Description doesn't display correctly in VBA object browser #822 ]
- fixed: missing error when fixed-array bounds range was negative and the lower bound was not supplied [ https://github.com/Incorrect Array dimensions do not generate an error until runtime #821 ]
- fixed: IDE not awakening from computer sleep mode [ https://github.com/IDE doesn't like being put to sleep #819 ]