Skip to content

Commit 8d18ea9

Browse files
authored
Merge pull request tidev#918 from ewanharris/ALOY-1640
feat: move TabbedBar to UI namespace
2 parents 1e0cf75 + da36503 commit 8d18ea9

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

Alloy/commands/compile/parsers/Alloy.Abstract.BarItemTypes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ exports.parse = function(node, state) {
55
itemArrayDefinition: {
66
parents: [
77
'Ti.UI.ButtonBar',
8-
'Ti.UI.iOS.TabbedBar'
8+
'Ti.UI.iOS.TabbedBar',
9+
'Ti.UI.TabbedBar'
910
],
1011
children: [
1112
'Alloy.Abstract.BarItemType'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const tiapp = require('../../../tiapp');
2+
const MIN_VERSION = '8.0.0';
3+
4+
exports.parse = function(node, state) {
5+
const tiappSdkVersion = tiapp.getSdkVersion();
6+
if (tiapp.version.lt(tiappSdkVersion, MIN_VERSION)) {
7+
const platform = CU.getCompilerConfig().alloyConfig.platform;
8+
if (platform !== 'ios') {
9+
U.die(`Ti.UI.NavigationWindow for ${platform} requires Titanium ${MIN_VERSION}+`);
10+
}
11+
node.setAttribute('ns', 'Ti.UI.iOS');
12+
}
13+
return require('./Ti.UI.ButtonBar').parse(node, state);
14+
};

Alloy/commands/compile/parsers/Ti.UI.iOS.TabbedBar.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

Alloy/common/constants.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ exports.IMPLICIT_NAMESPACES = {
206206
DocumentViewer: NS_TI_UI_IOS,
207207
LivePhotoView: NS_TI_UI_IOS,
208208
SplitWindow: NS_TI_UI_IOS,
209-
TabbedBar: NS_TI_UI_IOS,
210209
PreviewContext: NS_TI_UI_IOS,
211210
PreviewAction: NS_TI_UI_IOS,
212211
PreviewActionGroup: NS_TI_UI_IOS,

0 commit comments

Comments
 (0)