How do iI code for a float data element in the Settings xml file? I am getting an error when the value has a decimal point in it. 255.01567. Have you got an example?
Ronnie
How do iI code for a float data element in the Settings xml file? I am getting an error when the value has a decimal point in it. 255.01567. Have you got an example?
Ronnie
The Object Store sample in the SDK has a sample for a float setting. Is this specific to GCM,GC, or the Connect IQ app?
Could it be something where a comma used instead of a period in some places?
No comma. I am writing elapsedDistance + a whole number ( previous odometer in my app ) back into the setting. The result has decimals and when I then tr to update settings in GCM or Garmin Express the update fails until I remove the decimals. Would the float fix this?
I fixed it.
I fixed it.
Please let us knwo how you fixed it.
<property id="set_CurrMoOdo" type="float">0</property>
<property id="set_CurrMoOdoSec" type="number">8</property>
In the settings file - changed from number to float - also changed the appropriate fields in the view.mc file to float also.
hidden var setCurrYrOdo = 0f;
Thank you for the explanation.
I've already thought this. It isn't a <setting ...>, but it's a <property ...> as is defined in the sample ObjectStore in the file properties.xml as Jim already said.