You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm trying to learn how to use the amazing neon, but i can't really understand a thing.
If i try to execute this code:
let js_arr:Handle<JsArray> = try!(try!(call.arguments.require(scope, 1)).check::<JsArray>());
js_arr.set(0,JsNumber::new(scope,1000));
I get this error on the second line (js_arr.set): This function takes 3 parameters but 2 were supplied.
I don't understand why since it's a JsArray. Even Racer tells me that the set method takes 2 parameters. But no matter what, js_arr.set takes 3 parameters in this order: &mut bool, neon::macro_internal::runtime::raw::Local and neon::macro_internal::runtime::raw::Local.
Can someone please explain me what's happening? I'm getting crazy trying to understand how JsArray works.
The text was updated successfully, but these errors were encountered:
Issue solved, but i would like to notice that i already imported Object.
These were my original imports:
use neon::vm::{Call,JsResult};use neon::mem::Handle;use neon::js::{JsInteger,JsNumber,JsString,JsObject,JsArray,JsValue,Object,Key};use neon::js::error::{JsError,Kind};
Somehow changing them to the following fixed the issue:
use neon::vm::{Call,JsResult};use neon::mem::Handle;use neon::js::{Object,JsArray,JsInteger,JsObject,JsNumber};
Hi, i'm trying to learn how to use the amazing neon, but i can't really understand a thing.
If i try to execute this code:
I get this error on the second line (
js_arr.set
):This function takes 3 parameters but 2 were supplied.
I don't understand why since it's a JsArray. Even Racer tells me that the set method takes 2 parameters. But no matter what,
js_arr.set
takes 3 parameters in this order:&mut bool
,neon::macro_internal::runtime::raw::Local
andneon::macro_internal::runtime::raw::Local
.Can someone please explain me what's happening? I'm getting crazy trying to understand how JsArray works.
The text was updated successfully, but these errors were encountered: