Double
Last updated
Last updated
double
is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a double
is 0.0. You can change the default value of the property by assigning a new value in an overridden reset
method.
double
properties should be declared in your APLConfiguration
subclass header file as follows:
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) double propertyName;
...
Double
is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a Double
is 0.0. You can change the default value of the property by assigning a new value in an overridden reset
method.
double
is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a double
is 0.0. You can change the default value of the property by assigning a new value in an overridden reset
method.
Double
is a double-precision 8 byte floating-point type with an approximate range of 2.3E-308 to 1.7E+308.
The default value of a Double
is 0.0. You can change the default value of the property by assigning a new value in an overridden reset
method.
The flutter APLNativeConfiguration
class defers to the underlying platform APLConfiguration
(iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration
(Android) subclass to read property values.
The React Native module AppfigurateModule
class defers to the underlying platform APLConfiguration
(iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration
(Android) subclass to read property values.
React Native always converts the underlying Double to a JavaScript Number.
Allows a double property to be changed in Appfigurate using a slider between minimum and maximum values.
Prototype
DOUBLE_PROPERTY_SLIDER(propertyName, minValue, maxValue, icon, description, restart)
You can customize the minimum and maximum images using the icon
parameter. If restart
is YES
, then the app will be restarted if the property value changes.
Example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) double maxDecibel;
@end
@implementation Configuration
DOUBLE_PROPERTY_SLIDER(maxDecibel, 60.5, 120.41, APLIconSliderVolume, @"Clipping - decibels", NO);
- (void) reset {
self.maxDecibel = 100.0;
}
...
Prototype
@DoublePropertySlider(min, max, icon, description, restart)
var propertyName: Double
You can customize the minimum and maximum images using the icon
parameter. If restart
is true
, then the app will be restarted if the property value changes.
Example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@DoublePropertySlider(min: 60.5, max: 120.41, icon: .volume, description: "Clipping - decibels", restart: false)
var maxDecibel: Double
override func reset() {
maxDecibel = 100.0
}
...
Prototype
@DoublePropertySlider(description, minValue, maxValue, sliderIcon, restart)
double propertyName;
You can customize the minimum and maximum images using the sliderIcon
parameter. If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertySlider;
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider;
public class AppConfiguration extends Configuration {
@DoublePropertySlider(minValue = 60.5, max = 120.41, sliderIcon = IconSlider.IconSliderVolume, description = "Clipping - decibels", restart = false)
public double maxDecibel;
@Override
public void reset() {
super.reset();
this.maxDecibel = 100.0;
}
...
Prototype
@DoublePropertySlider(description, minValue, maxValue, sliderIcon, restart)
var propertyName = 0.0
You can customize the minimum and maximum images using the sliderIcon
parameter. If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertySlider
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider
class AppConfiguration : Configuration() {
@DoublePropertySlider(minValue = 60.5, max = 120.41, sliderIcon = IconSlider.IconSliderVolume, description = "Clipping - decibels", restart = false)
var maxDecibel = 0.0
override fun reset() {
super.reset()
maxDecibel = 100.0
}
...
Prototype
double get propertyName => nativeDouble('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get maxDecibel => nativeDouble('maxDecibel');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let maxDecibel = await Appfigurate.nativeValue("maxDecibel"); // Number
Allows a double property to be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input.
Prototype
DOUBLE_PROPERTY_EDIT(propertyName, minValue, maxValue, regex, description, restart)
If restart
is YES
, then the app will be restarted if the property value changes.
Example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) double shotAccuracy;
@end
@implementation Configuration
DOUBLE_PROPERTY_EDIT(shotAccuracy, -2.1, 4.1, @"", @"Shot accuracy", NO);
- (void) reset {
self.shotAccuracy = 3.241;
}
...
Prototype
@DoublePropertyEdit(min, max, regex, description, restart)
var propertyName: Double
If restart
is true
, then the app will be restarted if the property value changes.
Example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@FloatPropertyEdit(min: -2.1, max: 4.1, regex: "", description: "Shot accuracy", restart: false)
var shotAccuracy: Double
override func reset() {
shotAccuracy = 3.241
}
...
Prototype
@DoublePropertyEdit(description, minValue, maxValue, regularExpression, restart)
double propertyName;
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyEdit;
public class AppConfiguration extends Configuration {
@DoublePropertyEdit(description = "Shot accuracy", minValue = -2.1, maxValue = 4.1, regularExpression = "", restart = false)
public double shotAccuracy;
@Override
public void reset() {
super.reset();
this.shotAccuracy = 3.241;
}
...
Prototype
@DoublePropertyEdit(description, minValue, maxValue, regularExpression, restart)
var propertyName = 0.0
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyEdit
class AppConfiguration : Configuration() {
@DoublePropertyEdit(description = "Shot accuracy", minValue = -2.1, maxValue = 4.1f, regularExpression = "", restart = false)
var shotAccuracy = 0.0
override fun reset() {
super.reset()
shotAccuracy = 3.241
}
...
Prototype
double get propertyName => nativeDouble('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get shotAccuracy => nativeDouble('shotAccuracy');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let shotAccuracy = await Appfigurate.nativeValue("shotAccuracy"); // Number
Allows a double property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices.
Prototype
DOUBLE_PROPERTY_LIST(propertyName, description, restart, ...)
If restart
is YES
, then the app will be restarted if the property value changes.
Example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) double rating;
@end
@implementation Configuration
DOUBLE_PROPERTY_LIST(rating, @"Quality rating", NO, @{@"Low": @10.0, @"Average": @50.0, @"Excellent": @95.0});
- (void) reset {
self.rating = 10.0;
}
...
Prototype
@DoublePropertyList(description, restart, values)
var propertyName: Double
If restart
is true
, then the app will be restarted if the property value changes.
Example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@DoublePropertyList(description: "Quality rating", restart: true, values: ["Low": 10.0, "Average": 50.0, "Excellent": 95.0])
var rating: Double
override func reset() {
qualityRating = 10.0
}
...
Prototype
@DoublePropertyList(description, keys, values, restart)
double propertyName;
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyList;
public class AppConfiguration extends Configuration {
@DoublePropertyList(description = "Quality rating", keys = {"Low", "Average", "Excellent"}, values = {10.0, 50.0, 95.0}, restart = false)
public double rating;
@Override
public void reset() {
super.reset();
this.rating = 10.0;
}
...
Prototype
@DoublePropertyList(description, keys, values, restart)
var propertyName = 0.0
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyList
class AppConfiguration : Configuration() {
@DoublePropertyList(description = "Quality rating", keys = ["Low", "Average", "Excellent"], values = [10.0, 50.0, 95.0], restart = false)
var rating = 0.0
override fun reset() {
super.reset()
rating = 10.0
}
...
Prototype
double get propertyName => nativeDouble('propertyName');
Example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get rating => nativeDouble('rating');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let rating = await Appfigurate.nativeValue("rating"); // Number
Allows a double property to be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input.
Prototype
DOUBLE_PROPERTY_LIST_EDIT(propertyName, minValue, maxValue, regex, description, restart, ...)
If restart
is YES
, then the app will be restarted if the property value changes.
Example
@import AppfigurateLibrary;
@interface Configuration : APLConfiguration
@property(nonatomic, assign) double forwardServerTime;
@end
@implementation Configuration
DOUBLE_PROPERTY_LIST_EDIT(forwardServerTime, 0.0, 366.0, @"^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])?(?:\\.\\d+)?$", @"Forward server time (days)", NO, @{@"7 days": @7.0, @"1 month": @30.0, @"1 Year": @365.0});
- (void) reset {
self.forwardServerTime = 7.0;
}
...
Prototype
@DoublePropertyListEdit(min, max, regex, description, restart, values)
var propertyName: Double
If restart
is true
, then the app will be restarted if the property value changes.
Example
import AppfigurateLibrary
@objcMembers class Configuration: APLConfiguration {
@DoublePropertyListEdit(min: 0.0, max: 366.0, regex: #"^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])?(?:\.\d+)?$"#, description: "Forward server time (days)", restart: false, values: ["7 days": 7.0, "1 month": 30.0, "1 Year": 365.0])
var forwardServerTime: Double
override func reset() {
forwardServerTime = 7.0
}
...
Prototype
@DoublePropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
double propertyName;
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyListEdit;
public class AppConfiguration extends Configuration {
@DoublePropertyListEdit(description = "Forward server time (days)", minValue = 0.0, maxValue = 366.0, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = {"7 days", "1 month", "1 Year"}, values = {7.0, 30.0, 365.0}, restart = false)
public double forwardServerTime;
@Override
public void reset() {
super.reset();
this.forwardServerTime = 7.0;
}
...
Prototype
@DoublePropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
var propertyName = 0.0
If restart
is true
, then the app will be restarted if the property value changes.
Example
import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.DoublePropertyListEdit
class AppConfiguration : Configuration() {
@DoublePropertyListEdit(description = "Forward server time (days)", minValue = 0.0, maxValue = 366.0, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = ["7 days", "1 month", "1 Year"], values = [7.0, 30.0, 365.0], restart = false)
var forwardServerTime = 0.0
override fun reset() {
super.reset()
forwardServerTime = 7.0
}
...
Prototype
double get propertyName => nativeDouble('propertyName');
Dart example
import 'package:appfigurateflutter/appfigurateflutter.dart';
public class Configuration extends APLNativeConfiguration {
double get forwardServerTime => nativeDouble('forwardServerTime');
...
Example
import {
NativeModules,
} from 'react-native';
const {Appfigurate} = NativeModules;
...
let forwardServerTime = await Appfigurate.nativeValue("forwardServerTime"); // Number