Add-in ; User Setting Default valuesI've been looking into Add-ins for distributing complex scripts and I was curious if there is a way for the user to set the default values. Lets say, for example, a Text Edit box is on Module1. During design time, I can set its initial values, and during run time, i can manipulate it with <
In the event of a dozen or so input fields, it would be handy for the end user to set default values common to their needs.
Re: Add-in ; User Setting Default valuesYou could have a file bundled in with the add-in that stores default values and have your button update that file. A simple jmp table would work well there. For example, if your add-in ID is my_addin, and the table of user preferences for your app was user_prefs.jmp, you could reference that file using this path: "$ADDIN_HOME(my_addin\user_prefs.jmp)".
You would need to set up your application to populate the inputs using the values stored in that data table when the app launches, and program that button to update that file with the current entries to those fields.
Re: Add-in ; User Setting Default valuesMuch like what @cwillden wrote, I have saved the actual default settings as .jsl files, and then all that had to be done was to do a simple check to see if a default file exists, and then if it does, then just Include() the .jsl file.
Re: Add-in ; User Setting Default valuesThanks for the response. Including a file in the addin directory sounds like a resonable approach. I'm assuming $ADDIN_HOME is a relative path to account for different install directories, correct?
Re: Add-in ; User Setting Default valuesSorry about the delayed response, but yes it is a relative path which is what makes add-ins completely portable.