twinBASIC Update: September 4, 2022

Highlights include new IDE shortcut keys, an awesome new IDE History panel, and a project from fafalone that showcases twinBASIC's interface definition feature.

twinBASIC Update: September 4, 2022

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:


History Panel Added in IDE

The code History panel (added in BETA 105 and enhanced in BETA 108) adds a bookmark for every procedure as you edit them.

  • Bookmarks are shown most recently edited first.
  • Clicking on a bookmark takes you to the last edited line in that procedure.
  • Hovering over a bookmark reveals date-time and line number details.
  • Bookmarks are not added if you only view a procedure.
  • To force add a bookmark to the history, just make a temporary edit (like adding then deleting a space).
  • Bookmarks persist between sessions.
  • Bookmark entries are removed when the associated file is deleted.

This looks like an awesome feature that I didn't even know I needed until now.

Ctrl + F4 / Ctrl + W to Close Active Code Tab

Added in BETA 104.

Around the Web

Explorer-style Drag-Drop Images with tB-defined x86+x64 interfaces

Frequent twinBASIC GitHub commenter and twinBASIC device driver creator, fafalone, just posted the following project over on (emphasis mine):

A while back I posted this project:

[VB6] Register any control as a drop target that shows the Explorer drag image

I wanted to try my hand at using these interfaces in x64 apps. A 64-bit version of oleexp doesn't seem likely; there's seemingly insurmountable barriers to using midl with a project that needs to redefine things in the force-included headers, and the original types weren't preserved so every single interface would have to be manually reviewed and updated if it uses pointer types. But, **twinBASIC lets you define interfaces as a native language feature**. So I set about re-implementing all the necessary ones for this project.


Here are the updates from the past week.  You can also find this information by visiting the GitHub twinBASIC Releases page.

Releases · WaynePhillipsEA/twinbasic
Contribute to WaynePhillipsEA/twinbasic development by creating an account on GitHub.

BETA 102

  • fixed: AddressOf  where  is the current procedure [ ]
  • fixed: Select Case Err problem [ ]
  • fixed: module Function with Date return value sometimes gives incorrect result (Win64 compiler only) [ ]

BETA 103

  • fixed: Exit For behaviour, ensuring the control variable is not erroneously cleared [ ]
  • added: attribute [ PackingAlignment(n) ] for UDTs, equivalent to #pragma pack in C [ ]
  • fixed: IDE menu would sometimes appear erroneously whilst debug stepping

BETA 104

  • fixed: CByte(True) causing overflow runtime error [ ]
  • improved: error handling around Ambient properties of ActiveX controls to better support Ax controls [ ]
  • improved: CTRL+F4 and CTRL+W can now be used to close the current tab in the IDE [ ]

BETA 105

  • added: (EXPERIMENTAL) HISTORY panel in the IDE [ ]

BETA 106

  • fixed: (regression in BETA 105) IDE treeview entries are in wrong order
  • fixed: muted spurious debug console output entries of '~~~ changed history bookmark: '
  • fixed: project save implementation now allows client to adjust the output path when save fails [ ]

BETA 107

  • fixed: erroneous 'invalid PackingAlignment attribute' errors on some UDTs
  • fixed: some auto-implemented OUT-only parameters were incorrectly implemented with IN-OUT semantics [ KarlSevenSeven, private ]

BETA 108

  • fixed: newly added breakpoints sometimes not active until an edit is made to a source file
  • improved: HISTORY panel is now persisted across sessions
  • improved: HISTORY panel entries now show the full timestamp in the hover tooltip
  • improved: HISTORY panel now logs when a form design is edited
  • improved: HISTORY panel now removes associated entries when a file is deleted
  • fixed: PackingAlignment attribute for UDTs is now correctly respected in generated Ax type libraries
  • fixed: using public UDTs as types for parameters in Ax classes now works correctly (previously had an extra VT_PTR in the type library descriptor)

All original code samples by Mike Wolfe are licensed under CC BY 4.0