[TIMOB-19084] Windows: _ undefined in Alloy apps
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-08-14T18:25:42.000+0000 |
Affected Version/s | Release 4.1.0 |
Fix Version/s | Release 5.0.0 |
Components | Windows |
Labels | n/a |
Reporter | Christopher Williams |
Assignee | Kota Iguchi |
Created | 2015-06-26T19:43:47.000+0000 |
Updated | 2015-09-07T14:02:30.000+0000 |
Description
When trying out the RSS reader sample, it is now failing due to the "_" variable being undefined during the parsing of the XML feed.
Alloy has underscore inside it, and presumably exports _ globally for use. This works fine on iOS.
My guess is that the context for some of this code is wrong and we're losing the definition of _ somewhere along the line?
This may be specific to the RSS reader sample code. It's possible that the other platforms are actually "bleeding" some things into the global context when they shouldn't. Specifically https://github.com/appcelerator-developer-relations/Sample.RSS/blob/stable/app/lib/alloy/sync/rss.js There's no require to bring in underscore. If I add the following to the second line, it works:
This was specific to the RSS sample app. Not convinced it's a specific issue with WIndows SDK.
https://github.com/appcelerator/titanium_mobile_windows/pull/402
Verified using: Windows 8.1 Appc CLI Core: 5.0.0-33 Appc CLI NPM: 4.2.0-1 Titanium SDK: 5.0.0.v20150906220721 Nokia Lumia 930 8.1 RSS reader sample from https://github.com/appcelerator-developer-relations/Sample.RSS/pull/19 When removing [this line](https://github.com/appcelerator-developer-relations/Sample.RSS/pull/19/files#diff-8e4d796c00cf0dc7444dfac71d46e5f4R3) the app runs as expected Closing ticket