Bug in fix for ALOY-217
Closed this issue · 3 comments
I.e. the parsing of the content of tabs in the XML-views that was introduced in Alloy 0.2.19 (and still exist in 0.2.24). I've created an example gist for the issue:
https://gist.github.com/3691647
Compiling this yields the following error:
/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:254
console.warn('Skipping element ' + node.nodeName + ' in "' + filename + '",
Actually we have two errors here:
Firstly, there's an error in the produced warning, as the the variable filename is missing (which will give errors on both line 254 AND 240 in compilerUtils.js).
Secondly, which is the main issue at hand here, it basically can't process the Require'd widget in the sub-view (MyTab.xml), and the compile command tries to locate the file <path_to_project>/app/views/com.appcelerator.searchForBooks.xml - which is constructed in the variable fullpath on line 245 in compilerUtils.js. If the Require in MyTab.xml is requiring a normal view, this works just fine; it just can't handle the widget... There needs to be a check here of what type of Require is expected, and adjust the fullpath appropriately if it's a widget..
Thanks for the in-depth analysis on this one. Working on a fix now.
Just pushed 0.2.25 to npm with these fixes in place. I tested against our test apps and your gist and all operates as expected now. Thanks again for the fantastic analysis. Made my job a lot easier.
Great! Thanks a lot.. :) ..and just glad to be of help! :)