Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| 12114:demo [2024/04/15 03:54 UTC] – created mwolfe | 12114:demo [2024/04/15 19:11 UTC] (current) – [Demo Script: DevCon 2024] mike | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Demo Script: DevCon 2024 ====== | ====== Demo Script: DevCon 2024 ====== | ||
| - | Create | + | * I have 25 minutes for the demo portion: |
| + | * 0:01: Download and open twinBASIC | ||
| + | * 0:02: Customize add-in name and description | ||
| + | * 0:04: Create | ||
| + | * 0:05: Edit the Code in myToolWindow | ||
| + | * 0:07: Test in Access | ||
| + | * 0:10: Explain Strongly-typed collections and copy '' | ||
| + | * 0:15: Bring in other dependencies | ||
| + | * 0:16: Test in Access | ||
| + | * 0:18: Test in Barebones Access | ||
| + | * 0:22: Convert fafalone' | ||
| + | * 0:24: Build 64-bit version | ||
| + | * 0:25: Explain '' | ||
| + | ===== Download and Save Sample Code ===== | ||
| - | Open twinBASIC > **Sample 4** | + | - Download [[https:// |
| + | - Extract from Zip folder | ||
| + | - Open twinBASIC > **Sample 4** | ||
| + | - Enter Project Name: '' | ||
| + | - Save as: '' | ||
| + | - Navigate to: '' | ||
| + | - Create folder named: '' | ||
| + | - Filename: '' | ||
| - | {{: | + | ===== Customize the Addin Name and Description |
| - | + | Next, let's customize the friendly name and description | |
| - | Save as: '' | + | - Go to **dllRegistration.twin** > **DllRegisterServer** |
| - | + | - In the " | |
| - | Ignore '' | + | - In the " |
| - | + | ||
| - | <file text .hgignore> | + | |
| - | syntax: glob | + | |
| - | *.twinproj | + | |
| - | </ | + | |
| - | + | ||
| - | ===== Set Export Path for Version Control | + | |
| - | + | ||
| - | - Ensure a clean repository with initial commit | + | |
| - | - **Project** > **Project Settings...** | + | |
| - | - Search for " | + | |
| - | - Check box next to "[√] Project: Export Path" | + | |
| - | - Enter text: '' | + | |
| - | * //This will save the twinBASIC source files to a subfolder named " | + | |
| - | - Check box next to "[√] Project: Export After Save" and set value in dropdown | + | |
| - | - Click [Save Changes] | + | |
| - | - **File** > **Export Project...** to force an initial export | + | |
| - | - In TortoiseHg, commit | + | |
| - | * The commit will include over 1,000 files; this is expected | + | |
| - | * Most of the committed files come from referenced packages; that's ok | + | |
| - | * [[nls> | + | |
| - | + | ||
| - | ===== Test Build From Source in Empty Folder ===== | + | |
| - | + | ||
| - | - Create a new folder: '' | + | |
| - | - Clone the repository into this folder: | + | |
| - | - Open a new instance of twinBASIC | + | |
| - | | + | |
| - | - Enter folder name: '' | + | |
| - | - **File** > **Save Project As...** > '' | + | |
| - | - Make any small change to a project file | + | |
| - Save the project | - Save the project | ||
| - | - Commit the change and push to Opalstack | + | - Build the project |
| - | + | - Launch | |
| - | + | - Switch | |
| - | ===== Test Build From Source for an Existing Project ===== | + | - Dock the add-in window |
| - | + | - Go to " | |
| - | The twinBASIC IDE appears to currently lack a "Build from Source" | + | - Go to "Add-Ins" > " |
| - | + | * Point out the " | |
| - | - In the original repository ('' | + | - Close "Add-In Manager" |
| - | - Open a new twinBASIC instance OR go to **File** | + | |
| - | - In the _| New |_ tab, click [Import from folder...] then [Open] | + | |
| - | | + | |
| - | - Go to **File** | + | |
| - | - Save project as '' | + | |
| - | - Click [Yes] when asked to replace the existing file | + | |
| - | | + | |
| - | | + | |
| - | - Verify that new "Last Modified" | + | |
| - | - Verify that there are no pending changes in the repository | + | |
| ===== Create the Tool Window Controls ===== | ===== Create the Tool Window Controls ===== | ||
| + | Next, we're going to customize the controls that appear on the tool window. | ||
| - Open myToolWindow.tbcontrol | - Open myToolWindow.tbcontrol | ||
| - Select all controls and delete them | - Select all controls and delete them | ||
| + | - Click DIAGNOSTICS error to go to myToolWindow.twin and **delete all dead code** | ||
| - Select form and set the following properties: | - Select form and set the following properties: | ||
| * Height: 1700 | * Height: 1700 | ||
| Line 95: | Line 75: | ||
| * Top: 1050 | * Top: 1050 | ||
| * Width: 2250 | * Width: 2250 | ||
| + | - Create a version label | ||
| + | * Caption: Version {hhmm} | ||
| ===== Edit the Code in myToolWindow.twin ===== | ===== Edit the Code in myToolWindow.twin ===== | ||
| Line 108: | Line 90: | ||
| </ | </ | ||
| - | ===== Build and Test the Addin on Same Machine | + | ===== Test the Updated |
| - | The following instructions assume a machine with 32-bit Office | + | |
| + | - Make sure Access is closed then **Build** the tB project | ||
| + | - Reopen Access and switch to VBA | ||
| + | - Enter sample text '' | ||
| + | |||
| + | ===== Strongly-Typed Collection Class ===== | ||
| + | Now, let's talk about what this add-in will actually, you know, //do//. | ||
| + | |||
| + | The purpose of the add-in is to encapsulate the '' | ||
| + | |||
| + | I put a link to this article in the Resources page for today' | ||
| + | |||
| + | For our purposes, the important thing to know about them is that you CANNOT build them in the VBA editor. | ||
| + | |||
| + | As you can imagine, manually jumping through those hoops is inefficient and error-prone. | ||
| + | |||
| + | ===== Copy the VBA Code Into twinBASIC ===== | ||
| - | - Ensure " | + | - Create a new module named MyModule.twin |
| - | - **File** > **Build** | + | - |
| - | * Creates and registers this file: '' | + | |
| - | * As part of registration, | + | |
| - | * '' | + | |
| - | * Description: | + | |
| - | * FriendlyName: | + | |
| - | * LoadBehavior: | + | |
| - | * '' | + | |
| - | * (Default): '' | + | |
| - | * '' | + | |
| - | * (Default): '' | + | |
| - | * '' | + | |
| - | * (Default): '' | + | |
| - | * '' | + | |
| - | * (Default): '' | + | |
| - | * ThreadingModel: | + | |
| - | * '' | + | |
| - | * (Default): '' | + | |
| - | * DEBUG CONSOLE should show this: | + | |
| - | * [LINKER] SUCCESS created output file ' | + | |
| - | * [LINKER] | + | |
| - | * [REGISTER] type-library registration completed. DllRegisterServer() returned OK | + | |
| - | - Open Excel or Access | + | |
| - | - Press [Alt] + [F11] to go to VBA IDE | + | |
| - | - Tool window will likely be floating; click and drag to dock it somewhere: | + | |
| - | - Enter '' | + | |
| ===== Build and Test the Addin on a Different Machine and Bitness ===== | ===== Build and Test the Addin on a Different Machine and Bitness ===== | ||