Skip to content

Commit

Permalink
add support for widgets in tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
brentonhouse committed Feb 21, 2020
1 parent 26d106c commit 5d4889e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Alloy/commands/compile/parsers/Alloy.Require.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,16 @@ function parse(node, state, args) {
state
) + ')';
let parent = { symbol: args.symbol };
if (args.parent.symbol && !state.templateObject && !state.androidMenu) {
if (args.parent.symbol && !state.templateObject && !state.androidMenu && !state.insideContainer) {
code += ';\n' + args.symbol + '.setParent(' + args.parent.symbol + ');\n';
parent = {
symbol: args.symbol + '.getViewEx({recurse:true})'
};
} else if ( state.insideContainer ) {
code += ';\n';
parent = {
symbol: args.symbol + '.getViewEx({recurse:true})'
};
} else {
code += '.getViewEx({recurse:true});\n';
}
Expand Down
1 change: 1 addition & 0 deletions Alloy/commands/compile/parsers/Ti.UI.Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function parse(node, state, args) {
if (theNode) {
code += CU.generateNodeExtended(child, state, {
parent: {},
insideContainer: true,
post: function(node, state, args) {
windowSymbol = state.parent.symbol;
}
Expand Down

0 comments on commit 5d4889e

Please sign in to comment.