Data integrity of property key names

Former Member
Former Member
Currently when using settings I don't believe there is a way of specifying the property key name other than the id in xml properties. This of course means that the property key must reside in at least 2 places (with an exception I will soon mention). I think there should be another way to set the property key for data integrity. The string SET_SENSOR_CADENCE_TITLE could be included in this file, but more appropriately placed in a language file.


My current solution
hidden const KEY_SENSOR_CADENCE = Ui.loadResource(Rez.Strings.KEY_SENSOR_CADENCE);
getProperty(KEY_SENSOR_CADENCE);

<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE layout [
<!ENTITY KEY_SENSOR_CADENCE "sensorCadence">
]>
<resources>
<strings>
<string id="KEY_SENSOR_CADENCE">&KEY_SENSOR_CADENCE;</string>
</strings>
<properties>
<property id="&KEY_SENSOR_CADENCE;" type="boolean">true</property>
</properties>
<settings>
<setting propertyKey="@Properties.&KEY_SENSOR_CADENCE;" title="@Strings.SET_SENSOR_CADENCE_TITLE">
<settingConfig type="boolean"/>
</setting>
</settings>
<resources>