E.g. location of auxiliary executables such as perl, which might be needed in plugins.
Basically, I can see two strategies. Not sure, which is best, yet.
1) Implement this entirely in the frontend, using a special element in the logic section, which can be connected à la:
<storedsetting id="perl_exe" setting_id="perl_exe" label="Location of Perl executable" type="exe"/>
<connect governor="perl_exe" client="perl_exe_input.text"/>
This would raise a number of follow-up questions, though:
- Should a stored setting take precedence over a setting defined in a run-again-link?
- Should the value be saved automatically when used? How?
2) Implement this on the R level. Main function to be used in plugins would be something like:
rk.get.plug.option <- function (id, label, default, type=c ("exe", "string", "number", "custom"), validation=function () TRUE) ...
Basically, when this is called, it will look for a stored setting (or take the default, if specified). If this passes the validation (defined by "type" or "validation" function), it will be used. Otherwise, the user will be prompted for a setting, interactively, using rk.show.question(). If a new setting is supplied, and is valid, it will be stored.