mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-02 22:54:36 +00:00
parent
e79dcc4bec
commit
0feb674612
3 changed files with 0 additions and 15 deletions
|
@ -151,11 +151,8 @@ export component Example inherits Window {
|
|||
}
|
||||
```
|
||||
|
||||
<!--
|
||||
## Change Callbacks
|
||||
|
||||
**This feature is still experimental**
|
||||
|
||||
In Slint, it's possible to define a callback that is invoked when a property's value changes.
|
||||
|
||||
```slint
|
||||
|
@ -213,5 +210,3 @@ Using a changed callback forces immediate evaluation of bindings, which are typi
|
|||
This practice also compromises the purity of bindings, complicating edits via graphical editors.
|
||||
Accumulating excessive changed events can introduce issues and bugs, especially in scenarios involving loops, where a change callback modifies a property, potentially triggering changes to the same property.
|
||||
|
||||
|
||||
-->
|
|
@ -1,10 +1,6 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
env::set_var("SLINT_ENABLE_EXPERIMENTAL_FEATURES", "true");
|
||||
|
||||
slint_build::compile("ui/main.slint").unwrap();
|
||||
}
|
||||
|
|
|
@ -1354,12 +1354,6 @@ impl Element {
|
|||
}
|
||||
|
||||
for ch in node.PropertyChangedCallback() {
|
||||
if !diag.enable_experimental && !tr.expose_internal_types {
|
||||
diag.push_error(
|
||||
"Change callbacks are experimental and not yet implemented in this version of Slint".into(),
|
||||
&ch,
|
||||
);
|
||||
}
|
||||
let Some(prop) = parser::identifier_text(&ch.DeclaredIdentifier()) else { continue };
|
||||
let lookup_result = r.lookup_property(&prop);
|
||||
if !lookup_result.is_valid() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue