4d-v20

Comprehensive 4D v20 development skill with embedded documentation.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "4d-v20" with this command: npx skills add jaimealvarezv/4d-development-skill-v20/jaimealvarezv-4d-development-skill-v20-4d-v20

4D v20 Development Skill

This skill provides expert knowledge for developing in 4D v20. It includes embedded official documentation and best practice guides tailored for version 20.

📚 Documentation Router

TopicReference FileDescription
Language Syntaxlanguage-syntax.mdvar, operators, control flow, v20 specifics.
Data Typesdata-types.mdCollections, Objects, Variants, typing rules.
ORDAorda-modern.mdEntity Selections, DataClass, optimization.
Queriesquery-patterns.mdPlaceholders, formula queries, optimization.
Error Handlingerror-handling.mdON ERR CALL, Try/Catch (check availability).
Web & RESTweb-and-rest.mdWeb Server, REST API, HTTPRequest.
Forms & UIforms-and-ui.mdForm objects, events, list boxes.

⚠️ Critical v20 Rules

  1. Variable Declaration: ALWAYS use var $name : Type. Avoid C_TEXT unless modifying legacy code.
  2. Assignment: Use := for assignment found in legacy/standard mode. v20 allows = in some contexts but := is safer for compatibility.
    • Note: If "Use standard assignment =" option is on, = is fine. Default to := to be safe.
  3. Collections vs Arrays: Prefer Collections ([]) and Objects ({}) over Arrays (ARRAY TEXT).
  4. Query Literals: Use placeholders (:1, :2) or : $var. NEVER concat strings into queries (SQL injection checks).
    • Safe: ds.Users.query("name = :1", $name)
  5. Null: Use Null keyword. Check with Unknown value or Assert helper if needed.
  6. Linked Collections: When using [table], remember it returns a selection. To get a collection, use ds.Table.all().toCollection().

🚫 v21+ Features to AVOID (v21-only)

Do NOT use the following features unless you are certain the project is v20 R7+ or v21:

  • HTTP Classes: 4D.IncomingMessage, 4D.OutgoingMessage (v20 R6+). Use On Web Connection / WEB GET BODY for standard v20 servers.
  • File Handles: 4D.File.Handle (v21). Use File and Document to text / Text to document or File.getContent().
  • Singleton Classes: shared singleton Class. Use Storage for singletons in v20.
  • Try/Catch: Available in v20 R4+. If base v20, use ON ERR CALL. Verify exact v20 R-release.

🔍 Searching Documentation

The official 4D v20 documentation is embedded in the docs/ directory. To find information about a command or class:

  1. Search References: Check references/ first for high-level patterns.
  2. Grep Docs: Use grep_search or find_by_name in docs/ folder.
    • Example: grep -r "HTTP Request" docs/
  3. API Index: See api-index.md for a map of standard commands.

REST Contract

When building REST APIs in v20:

  • Success: { "ok": true, "data": ... }
  • Error: { "ok": false, "error": { "code": 123, "message": "..." } }
  • Use Web Server class or On Web Connection database method.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

obsidian

Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.

Archived SourceRecently Updated
Coding

gog

Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.

Archived SourceRecently Updated
Coding

obsidian-notes

Work with Obsidian vaults (plain Markdown notes) and automate via obsidian-cli.

Archived SourceRecently Updated
Coding

mcporter-cli

Use the mcporter CLI to list, configure, auth, and call MCP servers/tools directly (HTTP or stdio), including ad-hoc servers, config edits, and CLI/type generation.

Archived SourceRecently Updated