Methodox App Maker
Methodox App Maker makes desktop apps the way Visual Basic did. You drag controls onto a form, set their text and names, and write what each button does as rows of actions. Then you run the app, debug it, and publish it as a program of its own.
The code is written as rows, as in Methodox Action Maker: one action a row, read top to bottom. The whole app, form and code, is one Divooka document (.dvk), which also opens in Divooka Compute.
Getting it
- Inside Divooka Compute Standard.
MethodoxAppMaker.exeis in Compute's folder. This edition also has the C# script and NuGet packages. When a document has a form and a Routine entry, Compute's toolbar offers Open in Methodox App Maker. - On its own. A simpler stand-alone edition, with rows only and no C# script, is planned for a later release. It is not available yet.
App Maker is not part of Divooka Explore. It reads in English and Simplified Chinese.
Your first app
This app has a box to type a name, a Greet button and a line that answers Hello, World! when you type World and press the button.
Draw the form
- Click Text Box in the toolbox. It goes on the form at the first free place.
- Drag Button onto the form, to the right of the box.
- Click Label. It goes under the box.
- Select each control and, in the property grid beside the form, give it a name:
namefor the box,greetfor the button,answerfor the label. Set the button's text toGreet. - Drag the label's right handle to make it wider.
To line controls up, select two or more (Ctrl or Shift and click). The tools to align their edges or middles, match their sizes or space them evenly appear over the form.
Write the code
- Double-click the Greet button. App Maker writes a routine named Greet Click, connects it to the button's Click event, and shows the code.
- Double-click the empty row and pick Get Text. On its card, type
name. The row reads the box's text into the valuegetText. - On the next empty row, pick Set Text. Type
answeras the control. For the text, choose a calculation: Format, with the templateHello, {0}!andgetTextas its value.
The routine now has two rows: Get Text, then Set Text.
Run it
Press F5. The form comes up live, in the place you designed it. Type World in the box and press Greet. The label reads Hello, World!. What the app prints appears in the output under it.
To debug, select the Set Text row and press F9 to set a breakpoint, then press Greet again. The app stops with the code in front and each row's value beside it. F10, F11 and Shift+F11 step; F5 goes on; Shift+F5 stops the app.
Save and publish
Ctrl+S saves the app as one .dvk file. Ctrl+Shift+B publishes it as a program of its own into a folder you choose; the program opens the form in its own window. Publish is the same build as Divooka Compute's.
The window
| Part | What it does |
|---|---|
| Toolbox | The controls: Label, Button, Text Box, Check Box, Option, Switch, Dropdown, List, Number Box, Slider, Progress Bar, Heading, Caption, Link, Password Box and Line. Click one to add it, or drag it to where you want it. |
| Form | Your window, drawn as it will look when it runs. Drag to move; drag handles to size. Controls snap to each other, to the form and to an 8-unit grid. Hold Alt to place freely. |
| Property grid | The selected control, or the form when nothing is selected: its name, text, place and size, Enabled, Visible, a tooltip, and its events. Each event shows the routine it runs; click it to open the code, or to write one. |
| Code | Every routine the events run, as rows. F7 shows the code and Shift+F7 the form. |
| Output | What a run prints, and a box to type in when the app reads a line. |
Packages
The toolbar's package button opens the Packages card. It lists the packages your code can use. A new app starts with what a first app needs: the Standard Library, Platform, GUI Components and Graph Editor Essentials. Switch others on to use their actions. A package your code already uses stays on.
In the Divooka Compute edition, the card also takes NuGet packages, by id and version.
The C# script
The Divooka Compute edition has a third view beside the form and the code. New C# script writes a .cs file beside the app, named after it. Every public static method in it becomes an action your rows can call. Saving or running the app compiles the script again, and compiler messages go to the output.
Embed in the app keeps the script inside the app's file instead, so you have one file to pass on. Keep beside the app moves it out again.
How an app is stored
The app is a normal Divooka document:
- each form is a Components graph, with one node per control
- each event's code is a Routine
- the entry is a Routine named Main, which shows the first form
So the same file opens in Divooka Compute as graphs, and runs anywhere a document runs, with stew or as a published program. Changes you make to it in Compute are kept when you open it again in App Maker.
Keyboard
| Key | Does |
|---|---|
Ctrl+N, Ctrl+O, Ctrl+S, Ctrl+Shift+S |
New, open, save, save as |
Ctrl+Shift+B |
Publish the app as a program |
Ctrl+Z, Ctrl+Y |
Undo and redo, on the form or in the code, whichever is in front |
Delete, Ctrl+C, Ctrl+X, Ctrl+V, Ctrl+D |
Delete, copy, cut, paste or duplicate the selected controls |
| Arrow keys | Move the selected controls by one unit; with Shift, by one grid step |
Esc |
Select nothing, so the property grid shows the form |
F7, Shift+F7 |
Show the code, show the form |
Enter |
In the code: on an empty row, pick an action; on a filled row, edit its values |
Alt+Up, Alt+Down |
Move the selected row up or down |
F5, Shift+F5 |
Run, or go on; stop |
F9, F10, F11, Shift+F11 |
Breakpoint, step over, step into, step out |
The code's other keys are Action Maker's: see its keyboard shortcuts.
See also
- Methodox Action Maker: rows without a form, for scripts and learning.
- Desktop applications: the other ways to build a window in Divooka.
- Divooka Distributions: which distributions carry App Maker.