sciter-sdk / rust-sciter

Rust bindings for Sciter
https://sciter.com
MIT License
806 stars 76 forks source link

Is there a better way? #102

Closed Zettexe closed 3 years ago

Zettexe commented 3 years ago

Right now I am using this code to get to the function last child. Is there a better way to access it?

let root = Element::from(Element::from_window(player_wnd.get_hwnd()).unwrap().as_ptr());
let body = root.last_child();
pravic commented 3 years ago

Why do you use Element::from if you already have Element::from_window?

Zettexe commented 3 years ago

Strangely when I tried it before I got an error using only Element::from_window but I tried it again now and it works fine... No idea what the difference was but its working now.