{"action":"created","issue":{"url":"https://api.github.com/repos/dbankier/TiShadow/issues/407","labels_url":"https://api.github.com/repos/dbankier/TiShadow/issues/407/labels{/name}","comments_url":"https://api.github.com/repos/dbankier/TiShadow/issues/407/comments","events_url":"https://api.github.com/repos/dbankier/TiShadow/issues/407/events","html_url":"https://github.com/dbankier/TiShadow/issues/407","id":57277276,"number":407,"title":"Runtime Error in DensityAssets.js","user":{"login":"wpccolorblind","id":735111,"avatar_url":"https://avatars.githubusercontent.com/u/735111?v=3","gravatar_id":"","url":"https://api.github.com/users/wpccolorblind","html_url":"https://github.com/wpccolorblind","followers_url":"https://api.github.com/users/wpccolorblind/followers","following_url":"https://api.github.com/users/wpccolorblind/following{/other_user}","gists_url":"https://api.github.com/users/wpccolorblind/gists{/gist_id}","starred_url":"https://api.github.com/users/wpccolorblind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpccolorblind/subscriptions","organizations_url":"https://api.github.com/users/wpccolorblind/orgs","repos_url":"https://api.github.com/users/wpccolorblind/repos","events_url":"https://api.github.com/users/wpccolorblind/events{/privacy}","received_events_url":"https://api.github.com/users/wpccolorblind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-11T05:07:47Z","updated_at":"2015-05-07T08:56:00Z","closed_at":null,"body":"Tried a --shadow on one of my apps so I can start using tishadow to develop with it.  Fairly familiar with tishadow now from the past month or so, but I'm getting this very odd issue on android.\r\n\r\nError:\r\n{\r\n  \"message\": \"Uncaught TypeError: Object function (from, to) {\\n    var rest = this.slice((to || from) + 1 || this.length);\\n    this.length = 0 > from ? this.length + from : from;\\n    return this.push.apply(this, rest);\\n} has no method 'replace'\",\r\n  \"lineOffset\": 69,\r\n  \"line\": 1,\r\n  \"title\": \"Runtime Error\",\r\n  \"lineSource\": \"r(n in density_folders)if(s=r.replace(\\\"%FOLDER%\\\",density_folders[n].replace(\\\"%\",\r\n  \"sourceName\": \"api/DensityAssets.js\"\r\n}\r\n\r\nCode:\r\nvar newImage = Ti.UI.createImageView( {\r\n\timage: {any image url is reproducing this}\r\n} )\r\n\r\ncontainer.add( newImage )\r\n\r\nThis same code works great when I just test it in my index.js file and some others.  However, the same code in other files just won't work, even when I reference the same container.  This is because the error comes on the line that actually creates the image.\r\n\r\nIf I do a try catch around it, I catch an exception but it's completely empty.\r\n\r\nI'm stumped after several hours of investigating this and minifying the example to reproduce...\r\n\r\nNot quite sure what the code in tishadow around the error is doing, but obviously the file variable is not what the code expects and it just assumes it's a string, replace is called, and thus the exception.\r\n\r\nAnyone seen anything like this before?"},"comment":{"url":"https://api.github.com/repos/dbankier/TiShadow/issues/comments/99780616","html_url":"https://github.com/dbankier/TiShadow/issues/407#issuecomment-99780616","issue_url":"https://api.github.com/repos/dbankier/TiShadow/issues/407","id":99780616,"user":{"login":"bitfabrikken","id":2039652,"avatar_url":"https://avatars.githubusercontent.com/u/2039652?v=3","gravatar_id":"","url":"https://api.github.com/users/bitfabrikken","html_url":"https://github.com/bitfabrikken","followers_url":"https://api.github.com/users/bitfabrikken/followers","following_url":"https://api.github.com/users/bitfabrikken/following{/other_user}","gists_url":"https://api.github.com/users/bitfabrikken/gists{/gist_id}","starred_url":"https://api.github.com/users/bitfabrikken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitfabrikken/subscriptions","organizations_url":"https://api.github.com/users/bitfabrikken/orgs","repos_url":"https://api.github.com/users/bitfabrikken/repos","events_url":"https://api.github.com/users/bitfabrikken/events{/privacy}","received_events_url":"https://api.github.com/users/bitfabrikken/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T08:56:00Z","updated_at":"2015-05-07T08:56:00Z","body":"Did some digging. I, and probably wpccolorblind, do not use the /android/images folder - instead I use /pix, which I've gotten used to. There's no 9 patch images there or resolution specific things.\r\nI think that's what the code chokes on currently - not being able to find what it's expecting.\r\nI made a small fix, that seems to work for me: https://github.com/dbankier/TiShadow/compare/master...bitfabrikken:patch-2"}}