slint-ui/slint · error

ItemMemberFunctionCall

Error message

ItemMemberFunctionCall `{prop_name}`

What it means

The Slint interpreter's `eval_item_member_function` hit an `ItemMemberFunctionCall` whose member function name it does not implement. Only a fixed set of builtin item member functions (e.g. `focus`, `show_popup`, `close` for windows) is handled; anything else falls through to this `unimplemented!()` panic. This marks an interpreter gap, not a user syntax error.

Solutions

  1. Upgrade the slint interpreter crate to a version matching the compiler that produced the .slint code
  2. Check whether the called member function is actually supported by the interpreter and rewrite the code to avoid it
  3. File/fix by adding a match arm for the missing function name in internal/interpreter/eval.rs

Example fix

// before (slint)
component C inherits Window { public function do-thing() {} }
// calling c.do-thing() from interpreted code hits unimplemented
// after
// upgrade the interpreter crate so the member function has an eval arm, or inline the function body into the calling expression
Defensive patterns

Strategy: try-catch

Validate before calling

// Check interpreter/compiler crate versions match
assert_eq!(slint::VERSION, i_slint_interpreter::VERSION);

Prevention

When it happens

Trigger: Calling an item member function from interpreted Slint code (e.g. via the Slint interpreter or live-preview) that the evaluator has no arm for — typically a newly added builtin member function in the compiler that the interpreter's eval.rs has not been extended to support.

Common situations: Using the interpreter with a .slint file that uses a newer Slint language feature (e.g. a newly introduced item member function) while running an older interpreter; a version mismatch between the compiler and interpreter crates or usage of a nightly/unreleased feature.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of slint-ui/slint@3a7e700487 (2026-09-16). Data as JSON: /api/errors/58f3004e97eb4120. Report an issue: GitHub.

Appendix: source

Thrown at internal/interpreter/eval.rs:2842

        );
    }
    if let Some(menu) = vtable::VRef::downcast_pin::<ContextMenu>(item_rc.borrow()) {
        dispatch!(menu, prop_name.as_str();
            "close" => close => (),
            "is-open" => is_open,
        );
    }
    if let Some(window) = vtable::VRef::downcast_pin::<WindowItem>(item_rc.borrow()) {
        match prop_name.as_str() {
            "hide" => {
                window.hide(&adapter, &item_rc);
                return Value::Void;
            }
            "close" => return Value::Bool(window.close(&adapter, &item_rc)),
            _ => {}
        }
    }
    unimplemented!("ItemMemberFunctionCall `{prop_name}`")
}

View on GitHub (pinned to 3a7e700487)