-
Notifications
You must be signed in to change notification settings - Fork 0
Base
nhmkdev edited this page Mar 8, 2014
·
6 revisions
Base data is data that provides a default value if the current object does not define it. Numerous data formats in the Support Framework use the base concept to eliminate data duplication.
See the sample below where baseObj provides the values for actualObj to default to and/or override.
var baseObj =
{
x:1,
y:2,
t:'some text'
}
var actualObj =
{
base:baseObj, // when anything is queried from the actualObj the baseObj will be the fallback for missing entries
y:10 // this is a value that will override the base
}
Often times it is desirable to expand upon an array that the base provides. At this time an (elegant?) solution is not implemented for dealing with the combination of the base and a given object's definition of the array. For now there are special fields to allow for such combination See the winex field in Dialog.