Repository navigation
Modules and language
| Module | Belongs to | Runs |
|---|---|---|
| Object module | A catalog, document, register… | On that object's events: BeforeWrite, OnWrite, BeforeDelete, OnDelete, and for a document Posting and UndoPosting
|
| Manager module | The kind as a whole | Code that is about all products rather than one: lookups, form selection (FormGetProcessing), choice data |
| Form module | A form | The form's events and its commands |
| Common module | The configuration | Shared procedures, called from anywhere |
An event handler is a procedure with the event's name. The name is fixed: a procedure under another name is never called. The editor lists the handlers an object offers.
Code runs wherever the object is used: a form, another module, a background job, the application server. An object module never assumes a window.
| CES (C-style, the default) | VES (keyword style) | |
|---|---|---|
| Function | function Compute(x) { return x * 2; } |
Function Compute(x) Return x * 2 EndFunction |
| Loop | foreach (item in items) { Message(item.Name); } |
Foreach item In items Do Message(item.Name) EndDo |
Both compile to the same bytecode. New configurations use CES. Do not mix the two in one module. Keywords are case-insensitive, but each has exactly one spelling.
- Procedures and functions,
var,if,while,foreach,try … except - Lambdas with closure capture
- Multi-line strings, convenient for query texts
-
LINQ compiled into the bytecode:
var q = from o in Orders where o.Total > Threshold orderby o.Date descending select { N = o.Number, V = o.Total };
- Built-in values: value tables and trees, structures, maps, arrays, spreadsheet documents, JSON, HTTP and HTTPS clients, files
- Bytecode is cached per configuration version, so a module compiles once
| Write | To get |
|---|---|
Catalogs.Products |
The products manager: create, find, select |
Documents.Receipt |
The receipts manager |
InformationRegisters.Prices, AccumulationRegisters.Stock… |
The register |
Constants.CompanyName |
A constant |
Data.Catalogs.Products |
The same catalog as a LINQ source |
new Query("SELECT …") |
A query; see Queries and reports |
Inside a document's object module, RegisterRecords.Stock is the set of records the document
will write to the Stock register when it is posted.
codeRunner is a scratch window: write a script, check its syntax, run it. It needs no base and
no configuration.
A caption is written in every language the configuration declares, as one string:
en = 'Employee'; ru = 'Сотрудник'; uk = 'Працівник';. Tstr(text) picks the user's language
in code.
Getting started
The designer
Running it