Phase 4: Formularmodell und Objektsprache

This commit is contained in:
2026-09-04 17:30:32 +02:00
parent 5cf5a6582c
commit 54488b5b67
35 changed files with 7195 additions and 627 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -70,6 +70,11 @@ impl RuntimeError {
pub const INVALID_SCREEN_MODE: Self = Self(271);
pub const INVALID_WHEN_FORMS_SHOWING: Self = Self(272);
pub const INVALID_PROPERTY_VALUE: Self = Self(380);
pub const DESIGN_TIME_CONTROL: Self = Self(362);
pub const FORM_ALREADY_DISPLAYED: Self = Self(400);
pub const NON_MODAL_WHILE_MODAL: Self = Self(401);
pub const MODAL_NOT_TOPMOST: Self = Self(402);
pub const MDI_FORM_MODAL: Self = Self(403);
pub const NO_ACTIVE_CONTROL: Self = Self(430);
pub const NO_ACTIVE_FORM: Self = Self(431);
@@ -219,7 +224,10 @@ mod tests {
"Invalid when forms are showing"
);
assert_eq!(RuntimeError::NO_ACTIVE_FORM.code(), 431);
assert_eq!(RuntimeError(403).message(), "MDI form cannot be shown modally");
assert_eq!(
RuntimeError(403).message(),
"MDI form cannot be shown modally"
);
}
#[test]

View File

@@ -18,6 +18,8 @@ pub enum Value {
Dbl(f64),
Cur(i64),
Str(Rc<str>),
/// Formular-/Control-Objekt mit optionalem Index eines Control-Arrays.
Obj(u16, Option<i32>),
Arr(Rc<RefCell<ArrayObj>>),
Rec(Rc<RefCell<RecordObj>>),
/// Referenz (BYREF-Parameter-Slot).
@@ -91,7 +93,11 @@ pub struct ArrayObj {
}
impl ArrayObj {
pub fn new(elem: TypeInit, dims: Vec<(i32, i32)>, udts: &[UdtLayout]) -> Result<Self, RuntimeError> {
pub fn new(
elem: TypeInit,
dims: Vec<(i32, i32)>,
udts: &[UdtLayout],
) -> Result<Self, RuntimeError> {
let mut len: usize = 1;
for (lo, hi) in &dims {
if hi < lo {