-
-
Notifications
You must be signed in to change notification settings - Fork 581
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
Update Scripting.java #521
Conversation
changed Scripting to create Examples directory only when it need to create scripts directory. This is for real usage, where one want remove the example directory because scripts are already setup better to check for examples.
Hi @cri-s, please run one test for me. Make sure that if you start OpenPnp with an empty config directory that the examples get created and copied. If that works okay, let me know, and I will merge this. |
@cri-s After thinking about this some more, I think we should do it a different way. The primary use case for this is letting people who upgrade get new script examples to try. With your change they will not get the new examples, and will have to go find them in Git and copy them manually. Since having the Example scripts does no harm, and does give the user more options, I don't want to change this. What I'd suggest is that you add code that checks for the presence of a .ignore file in each directory as it's loaded. If .ignore is present then don't load that directory or show it in the menu. That way you can even hide the entire Examples menu item. What do you think? |
@cri-s Thanks, I will add it. Ready in 5 mins. |
…ll now exclude that directory from the scipts menu.
I'm getting the following error when starting the machine:
|
@dzach Are you running from source or from a download? |
Latest source, develop branch. |
Make sure that you've done a right click refresh in Eclipse. It's possible some files are missing from the cache. If that doesn't fix it, please add: |
@dzach ^ |
No IDE here, just plain console. I get:
but the file that came in the resources is
i.e. So the problem seems to be here, in line 78: String[] exampleScripts = |
Ah, yes. My mistake. Will fix in a few minutes. Thanks for the report.
…On Sat, Apr 15, 2017 at 4:25 PM Dimitrios ***@***.***> wrote:
No IDE here, just plain console.
I get:
Python/Print_Hallo_Openpnp.py
java.lang.NullPointerException
at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1257)
at org.openpnp.Scripting.<init>(Scripting.java:90)
[...]
but the file that came in the resources is
openpnp/src/main/resources/scripts/Examples/Python/Print_Hallo_OpenPnP.py
i.e. Print_Hallo_OpenPnP.py and not Print_Hallo_Openpnp.py
So the problem seems to be here, in line 78:
String[] exampleScripts =
new String[] {"JavaScript/Call_Java.js", "JavaScript/Hello_World.js",
"JavaScript/Print_Scripting_Info.js",
"JavaScript/Reset_Strip_Feeders.js", "JavaScript/Move_Machine.js",
"JavaScript/Utility.js", "JavaScript/QrCodeXout.js",
"*Python/Print_Hallo_Openpnp.py*", "Python/Print_Methods_Vars.py",
"Python/Print_Nozzle_Info.py"};
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#521 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABIKc8VeQy66HQOiemkO4j0X5kOornJoks5rwTXDgaJpZM4M-Mam>
.
|
* develop: Fixes part of #501, where the job could not be loaded if the panelization process was not completed. Changed Scripting.execute from private to public. Will now accept a String filepath, as well. Fixes case of an example script which was causing problems on case sensitive filesystems. Update README.md Update README.md Fixes #521: Placing a .ignore file in a subdirectory under scripts will now exclude that directory from the scipts menu. Updated changes for two new PRs. Remove example scripts that are not working, or that don't use submitMachineTask interface. Move script examples into Python and JavaScript subdirectories. Improves tests for eagle mountsmd importer. Adds a test for #390. added example-files to Scripting.java for copy action relocate files from Python to Examples dir ... and remove CMD/RUN in the filenames proposal with yellow power button for issue #379 to visualize missing home Fixes #431 by limiting the cam transform to 90 degrees. Removes the NavigationView. This feature was never finished and is unlikely to be in this iteration of the user interface. Removing it saves us startup time, removes the JavaFX dependency and solves some bugs. Fixes #396. Delete CMD_clear_log.py Delete RUN_tool_change_all_nozzle.py initial release intial commit Create CMD_clear_log.py
No description provided.