Closed zakrn closed 8 years ago
when you build it on mac or linux,the struct OsWindow do not have a method named "from".so you can not built it on mac. you can fix it like this:
/// Attach Sciter to existing native window.
pub fn attach(hwnd: HWINDOW) -> Window {
#![cfg(windows)]
assert!( hwnd.is_null() == false );
Window { base: OsWindow::from(hwnd), host: Rc::new(Host::attach(hwnd)) }
}
Thanks for reporting this. Try now.
trying to run the example in step 3 gives me this error on mac, any ideas?
cargo run --example minimal Compiling sciter-rs v0.4.0 src/window.rs:82:33: 82:37 error: mismatched types: expected
platform::windows::OsWindow
, found*mut capi::sctypes::_HWINDOW
(expected structplatform::windows::OsWindow
, found *-ptr) [E0308] src/window.rs:82 Window { base: OsWindow::from(hwnd), host: Rc::new(Host::attach(hwnd)) } ^~~~ src/window.rs:82:33: 82:37 help: runrustc --explain E0308
to see a detailed explanation error: aborting due to previous error Could not compilesciter-rs
.