Windows applications
Create a window, add controls, react to events, and show it - native Windows interfaces from the same readable statements.
Windows applications are experimental in Otter 1.0 (release scope matrix): they work and are tested, but details may change before they are fully supported. They need Windows: on macOS and Linux, window programs and otter desktop stop with a clear message. Most window programs can also be compiled into a web application with otter web, which is fully supported and runs everywhere.
Otter
clicks is 0
create window into app
title of app is "Otter Counter"
create text box into display
text of display is "0"
create button into addButton
text of addButton is "Add one"
put display in app
put addButton in app
when addButton is clicked
increase clicks
text of display is clicks
.
show app
create button into saveButton makes a control and gives it a name. Properties are read and set with of. put places a control in a window or in a row or column container, and when name is clicked handles the event.
Drag and drop is not available for Windows applications yet; it works in web applications.
Back to the reference