twinBASIC Update: May 1, 2022

Highlights include Set Next Statement support, new code samples and templates, a roadmap update, and a 7-Zip VBA library written in twinBASIC.

twinBASIC Update: May 1, 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:


Highlights

Set Next Statement Support

twinBASIC now supports changing the next statement to be executed at runtime.

You can do this with [Ctrl] + [F9] or by clicking and dragging the yellow "next statement" indicator:

Before you get too excited, this does not mean that twinBASIC supports the "Edit & Continue" feature.  That's the feature of VBx that allows you to pause executing code, edit the code, and then continue executing without having to restart.

That feature ("Edit & Continue") is currently on the roadmap for next year (Q1 2023).

New Templates and Samples

Wayne added or updated several project templates and samples over the past few weeks, including:

  • ActiveX Control [TUTORIAL]
  • Standard DLL (non-ActiveX)
  • Sample 4. MyVBEAddin (NEW with Toolwindow) [TUTORIAL]
  • Sample 5. MyCOMAddin (now includes ribbon code to add a button with a custom image...or maybe I just noticed it)

If you missed them, I wrote tutorials for two of them (follow links above).  

12-Month Roadmap Update

Wayne recently updated twinBASIC's 12-month roadmap.  Here are the highlights:

  • Q2: WebView2, Form & ActiveX Controls
  • Q3: Optimized builds, Inheritance
  • Q4: vbWatchdog, Multi-threading
  • Q1 ‘23: Edit & Continue, Cross-Platform

Around the Web

twinBASIC DevCon Vienna

twinBASIC celebrated its first birthday at the annual Microsoft Access DevCon Vienna virtual conference.

I'll be writing up a full review on the presentation in the coming days or weeks.  In the meantime, you can check out resources from the talk here.  The initial feedback seemed positive.  Last year, the big question from the audience was, "As an Access developer, why would I use twinBASIC?"  

This year, I set out to answer that question.  I gave four live demonstrations during the 45-minute talk.  In the span of about twenty minutes, I started from scratch and accomplished each item in the following list:

  • Install the twinBASIC IDE
  • Create a VBE add-in with tool window
  • Create a COM add-in with ribbon button and callback function
  • Install and demo the ribbon add-in in both Excel and Access
  • Create a custom ActiveX form control
  • Install and demo the custom control on an Access form
  • Import an existing VB6 project (*.vbp file) into twinBASIC

Each of the three main demos–the VBE add-in, COM add-in, and ActiveX control–would have taken hours of research and frustration for a VBA developer to accomplish using non-twinBASIC tools.  (I write from experience.)

This is why, when I talk about twinBASIC as a game-changer for Access developers, I think most Access developers will benefit indirectly from twinBASIC in the form of a more robust ecosystem of third-party tools, controls, and developer utilities.

TwinBasicSevenZip

Longtime former Access MVP, Ben Clothier, has started a new project to showcase the capabilities of twinBASIC.  

He mentioned the project on the twinBASIC Github page:

I wanted to showcase the capabilities of twinBASIC a bit more, so I started a new project, TwinBasicSevenZip to do just that. Right now it's just methods but I hope to also provide UI to report progress on extracting/compressing 7-zip files.

Be sure to check it out.

Changelog

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

twinBASIC IDE -- BETA RELEASE · Issue #772 · WaynePhillipsEA/twinbasic
As discussed in #763, I've been busy working for the last few weeks on a new IDE, specifically designed for the twinBASIC compiler. Here are the details for installing the current BETA release ...

NOTE: Development of the twinBASIC VSCode extension is paused until 2023 so that efforts can be focused on the new IDE.  

BETA 28

BETA 28 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_28.zip

  • improved: you can now drag the execution point marker in the code editor gutter, much like in VBx [ https://github.com/Jump to other line #814 ]
  • improved: 'Set Next Statement (Jump To Line)' is now enabled/disabled based on the current debug context

BETA 27

BETA 27 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_27.zip

  • added: SafeMode option in the win32/win64 build combobox to allow code fixing/recovery in crash situations
  • fixed: handling of 'Next: Next' in the parser, preventing incorrect treatment as a line label [ https://github.com/twinBASIC IDE -- BETA RELEASE #772#issuecomment-1100211685 ]
  • fixed: changing breakpoints during a debug session no longer triggers the bogus edit & continue reset [ https://github.com/Jump to other line #814#issuecomment-1112134058 ]
  • added: (experimental) 'Set Next Statement' (aka 'Jump To Line') support in the debugger through Ctrl+F9 or via context menu [ https://github.com/Jump to other line #814 ]

BETA 26

BETA 26 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_26.zip

  • added: 'clean' build option for deregistering and deleting built files (via File>Clean menu, or trashcan icon in toolbar) [ https://github.com/best way to register, unregister and share #811 ]
  • fixed: setting [ COMCreatable (False) ] on a form could cause runtime errors [ bclothier ]
  • added: built-run processes are now displayed in the IDE status bar, with 'bring to front' and 'terminate' options
  • added: 'Import File...' option to the 'Add' context menu. Drag'n'drop from Win Explorer will later be supported.
  • fixed: VBA.Interaction.Shell() now uses the CREATE_NEW_CONSOLE flag in the CreateProcess call [ https://github.com/Shell isn't the same #812 ]
  • improved: error handling and reporting of codegen errors that occur in Global variable initializers [ bclothier ]
  • improved: deleting/renaming a linked twin/tbform/tbcontrol will now prompt to apply the operation to both documents

BETA 25

BETA 25 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_25.zip

  • fixed: triggering of Startup Objects in DLLs is now safe and matches VB6
  • improved: the IDE now allows you to enter your licence key to unlock the 64-bit compiler
  • added: 'Standard DLL' new project

BETA 24

BETA 24 is now available:
https://www.twinbasic.com/downloads/twinBASIC_IDE_BETA_24.zip

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