Oh, I didn't know that `int` is acceptable for Java arguments. Thanks for the correction.
I was under the impression that Java arguments must be specified using fully qualified class names. e.g. `java.lang.Object`, `java.lang.String`, etc. But I guess I was mistaken. I'm not familiar with Java, you see...
The main reason why I need this is when working with long arrays where I already know which element index I need to retrieve. e.g. last 3 elements. I can use for-each loop to retrieve the first 3 elements efficiently, but not the last 3 elements because I have to iterate the whole array.
Is there a simpler way to access Java arrays?
Moderator: Martin
Re: Is there a simpler way to access Java arrays?
It's not me that changed the parameters. Automagic fills them in. It's weird that they're not the same for both of us. Anyway, glad it works.
Re: Is there a simpler way to access Java arrays?
What do you mean by "Automagic filled them in"?
I mean, where did you find that `int`? Cause the code in my Script action doesn't get corrected by Automagic. I type the `get()` arguments manually, and there's no underlining hint when the cursor is within the `methodSignature` argument's value, because that argument is a string. I don't see any hint in the flow log either.
I mean, where did you find that `int`? Cause the code in my Script action doesn't get corrected by Automagic. I type the `get()` arguments manually, and there's no underlining hint when the cursor is within the `methodSignature` argument's value, because that argument is a string. I don't see any hint in the flow log either.
Re: Is there a simpler way to access Java arrays?
Well..you shouldn't do it this way.
You use the function button in the bottom of the script window. You type in the desired Java function and you get the screen where you choose the class and function.
And the parameters get filled in automagically
You use the function button in the bottom of the script window. You type in the desired Java function and you get the screen where you choose the class and function.
And the parameters get filled in automagically
Re: Is there a simpler way to access Java arrays?
Oh, I didn't know that Java related functions have additional dialogs. That's sure is useful. I thought the Function button simply generates the function call template like most other functions do.
Thanks for explaining that.
Thanks for explaining that.