Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minimal.rs example is broken on Sciter 4.2.5.0 or newer. #46

Closed
8176135 opened this issue Jan 6, 2019 · 2 comments
Closed

minimal.rs example is broken on Sciter 4.2.5.0 or newer. #46

8176135 opened this issue Jan 6, 2019 · 2 comments

Comments

@8176135
Copy link
Contributor

8176135 commented Jan 6, 2019

Because of 4.2.5.0 disabling some unsafe features by default, the minimal example now

  • Can't open files
  • Can't connect to inspector
  • Displays "Running on undefined machine"

Being new to Sciter I had to stare at some really opaque error messages for a while (which don't even show up by default because #![windows_subsystem = "windows"]) to figure out what's going on.

Do we want to add

sciter::set_options(sciter::RuntimeOptions::ScriptFeatures(
		    sciter::SCRIPT_RUNTIME_FEATURES::ALLOW_SYSINFO as u8 |  // Enables Sciter.machineName()
		    sciter::SCRIPT_RUNTIME_FEATURES::ALLOW_FILE_IO as u8 | // Enables opening file dialog
		    sciter::SCRIPT_RUNTIME_FEATURES::ALLOW_SOCKET_IO as u8)).unwrap(); // Enables connecting to inspector

or should we just remove these things (file opener, machineName(), inspector) from the minimal.rs example.

Personally think showing this early is pretty important, because Sciter's own documentation don't seem to show any of this, and the error messages all just say the functions are undefined.

I'll probably make a PR for this.

@pravic
Copy link
Member

pravic commented Jan 6, 2019

Yes, you are right.

I've been thinking about this as well, but probably it'd be better to enable this by default (as I do for debugging) with an ability to opt-out.

@ngirard
Copy link
Contributor

ngirard commented Apr 22, 2019

This issue should be closed as fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants