AI Integration
NEW 4D.VECTOR native class
When you’re building intelligent features—semantic search, document classification, image grouping—you’re not just storing data anymore. You’re organizing meaning. And that starts with vectors.
4D 20 R10 introduces 4D.Vector, a native, memory-efficient class designed to hold and manipulate high-dimensional numeric data. It’s built for performance—supporting operations like cosine similarity, dot product, and normalization right inside 4D.
This isn’t about adding AI. It’s about making AI-native workflows part of your data model. Whether you’re comparing product descriptions, clustering support tickets, or ranking images by content, 4D.Vector lets you calculate and compare meaning—fast, precisely, and without external tooling.
And yes, you can store these vectors in your database. Use them in class-typed fields. Sort by similarity. It’s everything a modern intelligent system needs—built into your app’s core.
Vector Generation via OpenAI in AI Kit
4D 20 R10 extends the AI Kit with native support for OpenAI’s vector generation API. The new OpenAIEmbeddingsAPI.create() method transforms strings or collections into 4D.Vector instances—instantly usable in similarity scoring, ranking systems, or semantic filters.
No token management. No HTTP handling. No response parsing. Just direct, typed vectors built for intelligent workflows—generated in one line of code.
DATABASE
CLASS-TYPED OBJECT FIELDS IN STRUCTURE EDITOR
In the Structure Editor, object fields can now be assigned to a specific class. This isn’t just metadata—it’s a contract.
Assign a user class to an object field and you’ll get:
-
Property-level autocompletion
-
Syntax checking at compile time
-
Runtime validation of object shape
If the object doesn’t match the declared class, 4D raises an error—structure becomes schema, your data stays clean, and when combined with 4D.Vector, defining a typed vector attribute inside your class means every entity carries its own semantic fingerprint, ready for similarity scoring, AI-driven sorting, or intelligent recommendations.
SUPPORT FOR V7 UUIDS
UUID generation just got smarter. UUID.generate() now supports version 7 identifiers. That means your UUIDs are not only universally unique—they’re chronologically sortable, database-friendly, and designed for modern distributed systems.
Internally, v7 UUIDs embed timestamp data, making them ideal for ordered storage and easier to index. It’s a small change with a huge impact on scale and query performance.
ORDA
Entity Constructors and onTouch() Event
4D 20 R10 introduces constructor support and the onTouch() event for dataclass entities.
Use constructors to initialize values at instantiation—ideal for setting timestamps, defaults, or context-aware properties. Use onTouch() to react when attributes change in memory, enabling real-time validation, normalization, or field propagation.
Both run server-side by default (with client-side execution via local). This is the start of lifecycle-aware data logic—centralized, predictable, and native to the ORDA layer.
USER INTERFACE
DYNAMIC FORMULAS FOR FORM OBJECTS
Your UI logic just got smarter. You can now bind form object values directly to formulas using OBJECT SET DATA SOURCE FORMULA.
That means values can change dynamically—based on calculations, variables, or context—without binding to static fields.
Pair this with listbox constants like lk selected items expression and you get form behavior that adapts in real time, reducing code duplication and improving responsiveness.
NETWORK handling
NEW UDP COMMANDS
The new 4D.UDPSocket class gives you native support for the User Datagram Protocol. It’s fast, connectionless, and great for low-latency communication.
Set up callbacks like onData, onError, and onTerminate. Emit and receive packets with send(). Inspect metadata with 4D.UDPEvent. And track traffic in the shared 4DTCPUDPLog.txt file.
UDP is now first-class—and event-driven. Perfect for real-time device signals, discovery protocols, or low-overhead internal messaging.
TCP CONNECTION TIMEOUT CONTROL
The TCPConnection class now exposes a .connectionTimeout property so you can fine-tune responsiveness. Set thresholds for latency, kill long-running requests, and handle network errors faster.
No more UI freezing. No more indefinite waits. Just clean control over network behavior.
Dependency Manager
RECURSIVE DEPENDENCY RESOLUTION & MANAGEMENT
The Component Manager now understands the full tree. If your component requires other components—those are auto-loaded. If a circular reference exists—it’s blocked before it breaks you.
This feature introduces:
-
Recursive dependency discovery
-
Load-order resolution
-
Error detection for cyclic graphs
You write modular, reusable components. 4D makes sure they load correctly. Every time.
4D Netkit
Create, update, and delete events in Microsoft 365 and Google Calendars
cs.NetKit.Office365.calendar and cs.NetKit.Google.calendar classes now support full lifecycle management for calendar events.
These APIs give you precise control over:
-
Start and end times
-
Attendee management
-
Recurrence rules
-
Online meeting links
-
Notifications to guests
-
Event categories and descriptions
BUILD APPLICATION
BuildApp License Automation
The BuildApp process now includes automatic license integration. If your machine has valid deployment licenses, they’re injected directly into your built application.
New options in the Build dialog—and a new AutomaticLicenseIntegration boolean key in BuildApp.4DSettings—let you toggle between manual, automatic, or evaluation license modes. No license paths. No machine-specific overrides. Just seamless, portable builds.
Build logs now track license usage, and the UI clearly reports which targets were created post-build.
SECURITY
Secure Paste for Formulas
Formulas copied from outside your 4D application are now pasted as values only.
This change affects multi-style inputs and 4D Write Pro fields. If the formula has never been computed, its source is pasted as plain text. Otherwise, only the evaluated result (text or image) is retained.
It’s a silent fix to a quiet vulnerability—and a safer default for collaborative environments.
REMOVED LIBRARY
MECAB REMOVAL
The MeCab library for Japanese text segmentation has been removed. Originally introduced for keyword search, MeCab hasn’t seen an update in over a decade. It lacked dictionary customization and presented maintenance risks.
If you need custom tokenization, you can implement your own logic via ORDA and component-based queries.
