Skip to content

Add ability to display decimals for real / floating point numbers #110

@apizz

Description

@apizz

Currently when a preference with pfm_type = float is configured with pfm_default that has a real number with a decimal, this is not respected.

Additionally, many preferences that use real numbers have a minimum and/or default value of 0.0 and this doesn't appear to be respected either.

Example below:

                 <dict>
			<key>pfm_default</key>
			<real>0.5</real>
			<key>pfm_description</key>
			<string>Values can be decimals to the nearest hundreth - ex. 5.45</string>
			<key>pfm_name</key>
			<string>switchAutoScanElementInterval</string>
			<key>pfm_range_max</key>
			<real>25</real>
			<key>pfm_range_min</key>
			<real>0.0</real>
			<key>pfm_title</key>
			<string>Auto scanning interval in interface</string>
			<key>pfm_type</key>
			<string>float</string>
			<key>pfm_value_unit</key>
			<string>seconds</string>
		</dict>

screen shot 2019-01-01 at 11 57 20 pm

I haven't done extensive testing, but wondering if, for example, someone were to enter a value of 5.55 - as a number of preferences allow you enter seconds to the nearest hundreth - if that would correctly translate to its floating point number of 5.5500001907348633

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions