Replies: 3 comments 4 replies
-
This is where all the helper tool stuff is. That one should be a fairly easy fix. |
Beta Was this translation helpful? Give feedback.
-
Hi @AdamBebko I was able to get this working but I wasn't able to push to the dev branch or create a new branch and create a pull request, it says that permission is denied. Summary of the changes:
The current solution is a quick one, but may not be the most elegant. What I wanted to do originally, check if the file already exists and if it does, then ask the user if they want to overwrite it via a popup menu. The problem with this is that I was not able to send the user's button choice (to overwrite or not the file) back to the respective ScriptHelperEditorWindow's ScriptTemplateComponent. I thought of sending the component's name to the popup window, but then the code was getting complicated and ugly. This is what the Script Helper Window currently looks like: This is what the "ScriptHelperErrorEditorWindow" looks like: If you have any questions about anything let me know. |
Beta Was this translation helpful? Give feedback.
-
Note, when the "Create Experiment Design File" button is pressed, it creates both the Design and the Settings Files, not just the Design File. Do you want me to separate the Design file creation from creating both of those files and only creating the Design file? I would also then add the "new SettingsExperimentAsset().CreateAsset(experimentName, allowFileOverwrite);" to the "Automatically set everything up for me!" button function list. Not sure if this would change too much of how things work internally for your code. |
Beta Was this translation helpful? Give feedback.
-
Issue #44
"If you use the Script Helper Tool to setup the experiment automatically more than once, with the same name, it will overwrite any previously created and edited files.
I suggest adding a function to check if these files already exist and to provide a popup of some kind asking the user to confirm if they want to overwrite the existing files.
Confirming would recreate/overwrite the files experiment files.
Canceling would keep the user at the Script Helper window without overwriting any files. The user could then change the experiment name and then create/setup the desired files."
My idea is to solve this is to check if there are already existing files, when one of the buttons in the Script Helper Tool window are pressed, and if so, show a popup window which asks if the user would like to overwrite existing files or cancel the file creation.
To get this to work, I need to understand how to access the Script Helper Tool script and its button calls - I will need to add checks to the button press functions for scripts with the "experiment_name_script_type". For instance, if the user's experiment is called "Experiment" and the Runner script button is pressed, search for a folder with the name experiment name and then search for the ExperimentRunner script in that folder.
Beta Was this translation helpful? Give feedback.
All reactions