Imp.configparams Feature Requests

I have a few feature requests for imp.configparams. I’m sure you’ve already thought of most of these but since I haven’t seen them documented anywhere, I thought I could post them for everyone’s input.

First, the callback function should be called with an argument. This argument would be a String and would be the name of the key that has changed. This will allow developers to call different functions to handle each key-value change differently if they choose. (I could implement this functionality today by having a second table, identical to the imp.configparams table and then looping through to see which value was different but that is messy and I think this is functionality a lot of people would benefit from.)

Secondly, it would be nice to control the data types that the planner will accept/pass to the imp. I would propose 4 different data types.

  1. string - This is what is allowed today. The only difference that is needed is to optionally limit the number of characters the field will accept.

  2. List - A list is composed of strings and should force a user to select a value from a drop down box. This list should be configurable from the squirrel code (probably as an array that is passed to an API call along with the key name). This will allow control over what data can be inputted into the imp.

  3. ranged float - This allows a user to input a floating point value into the planner but it can optionally have a maximum and minimum allowed value so that the developer can control the bounds over the input. If an illegal value is input, the planner could either show a message box and show the acceptable range or it could adjust the value to the bound that was broken (so if the max was set to 50.5 and someone put in 500, it would set to 50.5)

  4. ranged int - This is identical to the ranged float but only accepts integer values. It might also be nice if some up/down buttons were added to the planner UI for both numeric types. This would differentiate the ranged values from a string input and make it easy to adjust a value up/down in increments of 1.


All those sound most sensible, some were on our list but not all. A certain amount of this is waiting for the planner environment update as it’s related to input validation…

As a follow up to this - is it possible today to update the configparams from the squirrel code (instead of just the planner)? Right now it looks like I can call imp.configure over and over (is this bad or is there a reason not to do this?) but it would be nice if I updated one of the keys in the table it could update the planner automatically (or if I could update single keys in the table instead of having to recall imp.configure every time).