Profiles
Example module: hellotypes, editabledata property.
hasprofile:true on a property is the framework’s most cost-effective mechanism: a single boolean, and the property gains named configuration save/load to the database, without writing a single line of code.
"editabledata": {
"permission": 2,
"hasprofile": true,
"e": { "..." }
}What this flag triggers, fully automatically
- Save/load: a client sends
PS/PLwith a profile name; the server builds a snapshot limited to thehasprofile:trueproperties and writes it to the database (or reads it back). Already handled generically by the framework — nothing to write in the module. - On the interface side: a module’s “Settings” box only lists
hasprofile:trueproperties; the profile load/save bar only appears if at least one exists. - Two lists of values, also automatic: each module has its own list of saved profiles (empty at first, populated on every save), and the controller additionally maintains an aggregated list per module type, used by the interface’s profile selector.
Nearly all real modules use it
This is the standard mechanism for any configuration the user needs to be able to name, find, and reload — camera settings, sequence parameters, autofocus profile… A module that exposes personal settings should almost always have at least one hasprofile:true property.