User options properties allow options to be set from a key script. This is a quick way to set options from a key without using the Options utility.
| Property | Description | Example | Result |
|---|---|---|---|
| optionsChangedNotification() | Notifies the calculator app that there has been a change in the options. This needs to be called in a script that changes the options so the display will be updated. | c1.optionsChangedNotification(); | |
| maxFracDigits, maxFracDigits | Maximum and minimum fractional digits. Typically they are set to be equal except in the "all" formatting key. | c1.maxFracDigits = c1.rgx; | |
| rowsToDisplay | The number of rows in the display. 1-4. This is not typically scripted since it can be changed with the swipe up/down gesture. | ||
| keyClicks | Boolean to turn key clicks on or off. | ||
| displayStackLabels | Boolean to turn the stack labels on or off. | ||
| hideKeyPreviews | Boolean to turn key previews on or off. | ||
| hapticLevel | Boolean to set haptic feedback on or off. | ||
| useFractionDigits | Boolean to use fractions. | let maxFractionDenominator = c1.rgx; c1.maxFractionDenominator = maxFractionDenominator; c1.mostPrecise = false; c1.fixedDemon = false; c1.numberStyle = c1.NFSTYLEDEC; c1.useFractionDigits = true; c1.useSignificantDigits = false; optionsChangedNotification(); c1.rgy; |
|
| maxFractionDenominator | Integer of the maximum fraction denominator. | ||
| mostPrecise | true :denominator can be ANY value less than maxFractionDenominator false: use the fixedDemon property. |
||
| fixedDemon | Only applies when mostPrecise = false. true = denominator is not reduced. false = any factor of the maxFractionDenominator. |
||
| useSignificantDigits | Boolean to use significant digits. When false, maxFracDigits is used for fixed format unless useFractionDigits is true. |
let fracDigits = c1.rgx; c1.maxFracDigits = fracDigits; c1.minFracDigits = fracDigits; c1.numberStyle = c1.NFSTYLEDEC; c1.useSignificantDigits = true; c1.useFractionDigits = false; optionsChangedNotification(); c1.rgy; |
|
| numberStyle | The number style, NFSTYLEDEC, NFSTYLENONE, NFSTYLESCI | c1.numberStyle = c1.NFSTYLEDEC | |
| NFSTYLEDEC | Used to set numberStyle to set the number formatter style to decimal. | c1.numberStyle = c1.NFSTYLEDEC | 1 |
| NFSTYLENONE | Used to set numberStyle to set the number formatter style to none. | c1.numberStyle = c1.NFSTYLENONE | 0 |
| NFSTYLESCI | Used to set numberStyle to set the number formatter style to scientific. | c1.numberStyle = c1.NFSTYLESCI | 4 |