diff --git a/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemTypes.js b/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemTypes.js index 9739c8ee1..c727535d6 100644 --- a/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemTypes.js +++ b/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemTypes.js @@ -6,6 +6,7 @@ exports.parse = function(node, state) { parents: [ 'Ti.UI.ButtonBar', 'Ti.UI.iOS.TabbedBar', + 'Ti.UI.OptionBar', 'Ti.UI.TabbedBar' ], children: [ diff --git a/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js b/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js new file mode 100644 index 000000000..b75b77602 --- /dev/null +++ b/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js @@ -0,0 +1,12 @@ +const _ = require('lodash'); +const tiapp = require('../../../tiapp'); +const U = require('../../../utils'); +const MIN_VERSION = '10.0.0'; + +exports.parse = function(node, state) { + const tiappSdkVersion = tiapp.getSdkVersion(); + if (tiapp.version.lt(tiappSdkVersion, MIN_VERSION)) { + U.die(`Ti.UI.OptionBar requires Titanium SDK ${MIN_VERSION}+`); + } + return require('./Ti.UI.ButtonBar').parse(node, state); +};