twinBASIC Update: October 24, 2021

Highlights include the addition of 4 new custom control events, ElementTabStop/Index properties, and a Spanish presentation on twinBASIC.

twinBASIC Update: October 24, 2021

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.


Highlights

Improvements for CustomControls (twinBASIC GUI)

Custom controls (and elements within those controls–such as cells in a grid control) in twinBASIC now support the following events:

  • OnClick
  • OnDblClick
  • OnMouseDown
  • OnMouseUp
  • OnMouseEnter
  • OnMouseLeave
  • OnMouseMove
  • OnScrollH
  • OnScrollV
  • OnGotFocus
  • OnLostFocus
  • OnKeyDown
  • OnKeyUp

There are also new properties for control elements to support tabbing within a custom control (e.g., cells in a grid):

  • ElementTabIndex
  • ElementTabStop

Updated Slider Examples

The slider examples have been reworked, with some of the new styles looking suspiciously like scrollbars.  It seems scrollbars are on the menu for next week.

Right-Click Issue When Designing Forms in VS Code

When you right-click a control in the twinBASIC designer, you will see two pop-up windows: the built-in VS Code cut/paste popup and the twinBASIC cut/paste / send back/front popup.  The problem, according to Wayne, is that there is currently no way to disable the built-in right-click menu in VS Code.  It sounds like Wayne is considering submitting a pull request to the VS Code team to make it possible to disable the built-in menu.

Around the Web

Creating COM Plugins for Access with twinBASIC

Juanjo Luna gave a 90-minute+ video presentation on creating a COM plugin using twinBASIC for the Spanish-speaking Access User Group.

If you're not a Spanish speaker, you can use YouTube's closed-caption auto-translation feature to follow along in your native language.  Here's the step-by-step:

  1. Click the "CC" button to turn on closed-captioning
  2. Click the gear icon to open the Settings menu
  3. Click on the Subtitles option
  4. Click on "Auto-translate" (NOTE: if "Auto-translate" is not an option, you may need to select "Spanish (auto-generated)" first)
  5. Choose your preferred language

Changelog

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.11.562, 23rd October 2021]

  • improved: VS Code extension initialization sequence to try to avoid the 'Cancelled'/'launch.json' sporadic message on startup

[v0.11.561, 22nd October 2021]

  • added: OnGotFocus/OnLostFocus and TabIndex/TabStop to CustomControls ElementDescriptor
  • updated: Sample 6 (CustomControls) examples to use the new focus and key events (tabs + arrows)
  • improved: field / property Description attributes will now show up in the form designer property sheet
  • improved: WaynesSliderControl and examples, getting ready for use as scrollbars
  • improved: better mouse tracking and cursor synchronization
  • fixed: regression since v0.11.99 for some default values being output to a type library, the compiler would crash
  • fixed: miscompile when assigning a non-simple UDT local variable to a param variable
  • fixed: right-click issue in the property sheet when there was existing text data in the clipboard

[v0.11.120, 20th October 2021]

[v0.11.114, 19th October 2021]

[v0.11.99, 18th October 2021]

  • fixed: CustomControls deleted from a form were not fully removed from the control selector (above the property sheet)
  • fixed: memory leak in CustomControl form engine
  • fixed: the FailMessage parameter was not Optional for SequenceEquals and NotSequenceEquals members of the Assert library [ https://github.com/WaynePhillipsEA/twinbasic/issues/54 ]
  • removed: 'Ignore and Continue' button on the form designer loading page as it was a temporary workaround before the JSON fix in v0.11.41
  • improved: loading of other webviews, matching with the changes made in v0.11.37 for the form designer webview
  • fixed: default values not being set correctly on outputted COM type libraries [ https://github.com/WaynePhillipsEA/twinbasic/issues/456 ]

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