{ "id": "79688", "key": "TIMOB-5123", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "12470", "description": "", "name": "Release 1.7.4", "archived": true, "released": true, "releaseDate": "2011-10-31" }, { "id": "12087", "description": "", "name": "Sprint 2011-47", "archived": true, "released": true, "releaseDate": "2011-11-28" }, { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-01-06T12:02:29.000+0000", "created": "2011-08-26T13:32:37.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "branch-v8", "dr-list", "qe-testadded", "verified-1.7.3" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" } ], "issuelinks": [ { "id": "12973", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "80921", "key": "TIMOB-5406", "fields": { "summary": "Android: commonjs exports object is undefined in some cases", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2012-01-06T12:02:29.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "Multiple reports have come in from the community that CommonJS modules (in the Resources directory) are not being found in Android .apk files that have been packaged for distribution. I have confirmed this to be the case myself on both Gingerbread and Froyo devices with a .apk I built for distribution through Titanium Studio\r\n\r\nTo reproduce, try packaging an application for distribution using CommonJS JavaScript modules. Any simple module should be able to reproduce it, but you can use my sample app from here:\r\n\r\nhttps://github.com/appcelerator-developer-relations/Forging-Titanium/tree/master/ep-003/CustomComponents\r\n\r\nThe stack trace I got from my device is located here:\r\n\r\nhttp://www.pastie.org/pastes/2435429/text", "attachment": [ { "id": "24120", "filename": "device-2011-11-10-171754.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-10T17:37:08.000+0000", "size": 129320, "mimeType": "image/png" }, { "id": "24121", "filename": "device-2011-11-10-173441.png", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-10T17:37:08.000+0000", "size": 68192, "mimeType": "image/png" }, { "id": "23861", "filename": "timob5123.zip", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-25T09:53:38.000+0000", "size": 2328708, "mimeType": "application/zip" } ], "flagged": false, "summary": "Android: CommonJS Modules not included/functional in distribution build", "creator": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "environment": "Android 2.3.4, Android 2.2", "comment": { "comments": [ { "id": "164181", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "Also, reported in the Q&A here:\r\n\r\nhttp://developer.appcelerator.com/question/124473/commonjs-modules---typeerror-in-production", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-08-26T13:34:43.000+0000", "updated": "2011-08-26T13:34:43.000+0000" }, { "id": "164245", "author": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "NOTE: on iOS, it appears that packaged apps crash when trying to run code from a CommonJS module. I'm not sure if this is related, or is a separate bug.", "updateAuthor": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-26T22:41:52.000+0000", "updated": "2011-08-26T22:41:52.000+0000" }, { "id": "164263", "author": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I finally got my Galaxy Tab working with adb under Lion. As a result, I can run the CommonJS test project on the Android device (by selecting \"Android Device\" from the drop-down menu.) So it's only the Distribute command that does not work.\r\n\r\nSummary: \r\n\r\nRun on Android device WORKS\r\nDistribute - Android FAILS\r\nDistribute - iOS FAILS\r\nAll emulators WORK\r\n", "updateAuthor": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-28T19:50:18.000+0000", "updated": "2011-08-28T19:51:36.000+0000" }, { "id": "165724", "author": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Any word on when this issue might be addressed? Without the ability to deploy, a lot of us are hedging our plans for refactoring code to use the CommonJS module format.", "updateAuthor": { "name": "markb@mantisbible.com", "key": "markb@mantisbible.com", "displayName": "Mark Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-12T16:11:22.000+0000", "updated": "2011-09-12T16:11:22.000+0000" }, { "id": "165818", "author": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "body": "Please escalate this problem! We are dying on the vine, having just tried to release our app on the Android Market, and our very first customer ran into this.\r\n\r\nIs there a workaround? We have got to do something, and quick.", "updateAuthor": { "name": "bitshftr", "key": "bitshftr", "displayName": "Shawn Lipscomb", "active": true, "timeZone": "America/New_York" }, "created": "2011-09-13T10:04:40.000+0000", "updated": "2011-09-13T10:04:40.000+0000" }, { "id": "165833", "author": { "name": "jlbarnhart", "key": "jlbarnhart", "displayName": "Jon Barnhart", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Looking for a workaround for this, or possibly a fix in one of the nightly builds of the SDK. This is a complete show stopper for us. ", "updateAuthor": { "name": "jlbarnhart", "key": "jlbarnhart", "displayName": "Jon Barnhart", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-13T10:45:33.000+0000", "updated": "2011-09-13T10:45:33.000+0000" }, { "id": "165835", "author": { "name": "joejohnson", "key": "joejohnson", "displayName": "Joe Johnson", "active": true, "timeZone": "America/New_York" }, "body": "We are having the same problem. Is there a quick fix? Hate to be a pain but I need something. ", "updateAuthor": { "name": "joejohnson", "key": "joejohnson", "displayName": "Joe Johnson", "active": true, "timeZone": "America/New_York" }, "created": "2011-09-13T10:48:01.000+0000", "updated": "2011-09-13T10:48:01.000+0000" }, { "id": "165841", "author": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "body": "After lots of hard work and overtime our team was very excited to deploy. Our library is built around the \"require\" feature so there is no quick fix! Now we have to tell the president of the company that we had to pull the app off the market. It sure would be nice to give him a time frame as to when this issue will be addressed! To make matters worse, there is a board of directors meeting this week. A demo of the new Titanium based Smartphone app is on the agenda. Please help our president save face by escalating this ASAP!", "updateAuthor": { "name": "peteberry@ewrinc.com", "key": "peteberry@ewrinc.com", "displayName": "Pete Berry", "active": true, "timeZone": "America/New_York" }, "created": "2011-09-13T11:06:25.000+0000", "updated": "2011-09-13T11:06:25.000+0000" }, { "id": "165851", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "I have documented a workaround here. This is issue is starting to be addressed in 1.8, but as a platform team we need to verify CommonJS use cases before 1.8 ships:\r\n\r\nhttp://developer.appcelerator.com/question/124473/commonjs-modules---typeerror-in-production#answer-218739", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-09-13T11:18:52.000+0000", "updated": "2011-09-13T11:18:52.000+0000" }, { "id": "166822", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Pull requests ready:\r\n\r\nRhino:\r\nhttps://github.com/appcelerator/rhino_titanium/pull/4\r\n\r\nTiMobile:\r\nhttps://github.com/appcelerator/titanium_mobile/pull/493", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-23T14:02:53.000+0000", "updated": "2011-09-23T14:02:53.000+0000" }, { "id": "166969", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "It would be super fantastically awesome if these commonJS changes would get processed sooner rather than later - lots of folks running up against it with current prod release now that we've been demoing CommonJS so much (and since it's the wave of the future).", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-09-26T11:03:02.000+0000", "updated": "2011-09-26T11:03:02.000+0000" }, { "id": "166985", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Totally agree. The relevant peeps (those who will review my changes) won't see your comment since they don't watch here, but I'd anyway already told them it's high prio.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-26T12:23:29.000+0000", "updated": "2011-09-26T12:23:29.000+0000" }, { "id": "167069", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "Thanks!", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-09-27T05:41:35.000+0000", "updated": "2011-09-27T05:41:35.000+0000" }, { "id": "167206", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Going to merge into 1.7.X, so re-opening.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-28T10:01:48.000+0000", "updated": "2011-09-28T10:01:48.000+0000" }, { "id": "167230", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Merged into 1_7_X as well", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-28T13:08:33.000+0000", "updated": "2011-09-28T13:08:33.000+0000" }, { "id": "167275", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "We have a regression whereby if you put a forward slash in the front of the module path (require(\"/lib/mymodule\"), for example), it will fail.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-28T17:00:25.000+0000", "updated": "2011-09-28T17:00:25.000+0000" }, { "id": "167284", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "New testing notes:\r\n\r\nPlease test Kevin's original failcase (in the description) in *production* (i.e., \"Distribute - Android\" in Titanium Studio).\r\n\r\nTHEN, test the attached app in timob5123.zip. Test it twice: once with the tiapp.xml's \"compilejs\" setting to false, once to true.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-28T17:41:23.000+0000", "updated": "2011-09-28T17:50:07.000+0000" }, { "id": "167287", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Newer fix in master and 1_7_X", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-09-28T18:50:01.000+0000", "updated": "2011-09-28T18:50:01.000+0000" }, { "id": "167326", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified fixed with Mac OS X 10.6.8, Titanium Studio build: 1.0.5.201109261308 , SDK 1.7.3.v20110928185013. Packaged CustomComponents sample, and TIMOB5123 Zip with false and true. Installed all 3 on Nexus S 2.3.4. All packaged and run on device with no issue.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-09-29T10:44:59.000+0000", "updated": "2011-09-29T10:44:59.000+0000" }, { "id": "167990", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "It seems is not fixed yet. ( 1.7.3 and 1.8 )\r\nI'm trying to deploy to device with Android 2.1 and I get this error:\r\n\r\n~~~\r\n10-05 10:53:33.819: ERROR/TiJSError(29889): (kroll$6: app://mycards/carddetail.js) [2,56885] - Message: TypeError: Cannot find function makeInit in object [object Object]. (app://mycards/carddetail.js#76)\r\n\r\n~~~\r\n\r\nOf course that the module is ok and it works with 1.7.2 without any problem.\r\nWith or without \r\nfalse\r\n\r\nThank you.\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T02:04:11.000+0000", "updated": "2011-10-05T02:04:11.000+0000" }, { "id": "167994", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Were you setting the {{exports}} object directly, by chance? Such as ...\r\n\r\n{code}\r\nexamples={...};\r\n{code}\r\n\r\nIf so, note that that is **not** part of the CommonJS standard. The fact that it worked in previous versions of the Android {{require()}} implementation (and in iOS) was more or less accident. We now use the official Rhino (the javascript engine) CommonJS implementation in Android.\r\n\r\nRegarding it not being part of CommonJS, see\r\n\r\nhttp://groups.google.com/group/commonjs/browse_thread/thread/1f4fa28f304d4d35\r\n\r\nNode (nodejs) does not support if either, for example.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T03:43:12.000+0000", "updated": "2011-10-05T03:43:12.000+0000" }, { "id": "167996", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "FYI re the {{exports = ...}} issue that I note above, we have already a parity ticket for that, meaning a ticket to address the fact that it works in iOS but not Android. So it will either be removed from iOS or a new solution will be found for Android.\r\n\r\nTIMOB-5406", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T03:45:58.000+0000", "updated": "2011-10-05T03:46:23.000+0000" }, { "id": "168000", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "Yes sir, it seems that setting an object that will be assigned to exports later breaks the things :)\r\n\r\nIt would be better (imho) to be removed from ios to stick with the standard.\r\nThank you.\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T04:46:37.000+0000", "updated": "2011-10-05T04:46:37.000+0000" }, { "id": "168003", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "The module spec provides for assignment of an object to the exports variable. This is a case where an addition to Android is needed.", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-10-05T05:28:19.000+0000", "updated": "2011-10-05T05:28:19.000+0000" }, { "id": "168004", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "I haven't been able to find it in any spec. Where do you see it?", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T05:31:49.000+0000", "updated": "2011-10-05T05:32:01.000+0000" }, { "id": "168005", "author": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "body": "I'm lost.\r\nSo\r\n{code}\r\nvar mod = {a:'b'};\r\nexports = mod;\r\n{code}\r\nis valid (from the standard point of view)?\r\n\r\nif so\r\n{code}\r\nexports.a = 'b';\r\n{code}\r\nwill still work ?\r\n\r\nthnx\r\n\r\n\r\n", "updateAuthor": { "name": "rborn", "key": "rborn", "displayName": "Dan Tamas", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T05:32:20.000+0000", "updated": "2011-10-05T05:32:20.000+0000" }, { "id": "168010", "author": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "body": "Dan, you are correct, the first format should work.\r\n\r\nThe Module spec:\r\nhttp://wiki.commonjs.org/wiki/Modules/1.1\r\n\r\nindicates that exports must be a free variable - a free variable (in computer science terms) is a placeholder value to which other values can be assigned. By that definition, it should be possible to assign a value to the exports object.\r\n\r\n{code}\r\nfunction MyObject() {}\r\nMyObject.prototype.sayHello() {\r\n alert('hello');\r\n};\r\nexports = MyObject;\r\n{code}\r\n\r\n{code}\r\nvar MyObject = require('MyObject');\r\nvar o = new MyObject();\r\n{code}\r\n\r\nThe above should be a valid use of CommonJS modules.", "updateAuthor": { "name": "kwhinnery", "key": "kwhinnery", "displayName": "Kevin Whinnery", "active": true, "timeZone": "America/Chicago" }, "created": "2011-10-05T07:04:05.000+0000", "updated": "2011-10-05T07:04:05.000+0000" }, { "id": "168018", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Period? End of story? I think not! :)\r\n\r\nAnyway, I'm moving my response to the appropriate place, TIMOB-5406. We need any more comments here. We already have the ticket that came out specifically because of this issue.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-05T08:42:07.000+0000", "updated": "2011-10-05T08:42:07.000+0000" }, { "id": "170128", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Re-opened for full re-test after changes to be made for TIMOB-5748", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-21T15:44:00.000+0000", "updated": "2011-10-21T15:44:00.000+0000" }, { "id": "170146", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "New pull request ready:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/578", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-21T21:39:14.000+0000", "updated": "2011-10-21T21:39:14.000+0000" }, { "id": "170346", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "Uploaded new version of timob5123.zip. The other one accidentally had a file with an underscore beginning its name.", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-10-25T09:53:38.000+0000", "updated": "2011-10-25T09:53:38.000+0000" }, { "id": "172267", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Now occurring with timob5123.apk on both rhino and v8 with SDK 1.8.0.1.v20111109152300. See attached screenshots\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-10T17:36:08.000+0000", "updated": "2011-11-10T17:36:44.000+0000" }, { "id": "173818", "author": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "body": "It's not related to distributed mode, so I'll create a different ticket. It's related to forward slashes, and occurs also on emulators and non-distributed-mode devices.\r\n\r\nIf you took my two forward-slashed references out of timob5123.zip, it works fine in distributed build. To test that, here is the modified app.js\r\n\r\n{code:title=app.js}\r\nTitanium.UI.setBackgroundColor('#000');\r\nvar win = Titanium.UI.createWindow({ \r\n title:'Test',\r\n backgroundColor:'#000',\r\n\texitOnClose: true\r\n});\r\n\r\nvar testmod = require(\"lib/testmod\");\r\nwin.add(Ti.UI.createLabel({\r\n\ttop: \"20dp\", left: \"20dp\", right: \"20dp\", height: \"40dp\",\r\n\ttext: testmod.sayHi(\"from a non-forward-slashed module.\")\r\n}));\r\n\r\nwin.open();\r\n{code}", "updateAuthor": { "name": "billdawson", "key": "billdawson", "displayName": "Bill Dawson", "active": true, "timeZone": "Europe/Berlin" }, "created": "2011-11-22T15:59:16.000+0000", "updated": "2011-11-22T15:59:16.000+0000" }, { "id": "175662", "author": { "name": "programmerdave", "key": "programmerdave", "displayName": "David Rodriguez", "active": true, "timeZone": "America/New_York" }, "body": "Just to make sure, quoting Kevin Whinnery above, is the following now working on android and iOS without problems?\r\n\r\n{quote}\r\nDan, you are correct, the first format should work.\r\n\r\nThe Module spec:\r\nhttp://wiki.commonjs.org/wiki/Modules/1.1\r\n\r\nindicates that exports must be a free variable - a free variable (in computer science terms) is a placeholder value to which other values can be assigned. By that definition, it should be possible to assign a value to the exports object.\r\n\r\nfunction MyObject() {}\r\nMyObject.prototype.sayHello() {\r\n alert('hello');\r\n};\r\nexports = MyObject;\r\nvar MyObject = require('MyObject');\r\nvar o = new MyObject();\r\nThe above should be a valid use of CommonJS modules.\r\n{quote}", "updateAuthor": { "name": "programmerdave", "key": "programmerdave", "displayName": "David Rodriguez", "active": true, "timeZone": "America/New_York" }, "created": "2011-12-10T10:04:40.000+0000", "updated": "2011-12-10T10:04:40.000+0000" }, { "id": "176636", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Titanium Studio 1.0.7.201112152014\r\nTi Mob SDK 1.8.0.1.RC3\r\nOSX Lion\r\nNexus One OS 2.2.2\r\n\r\nTested both CustomComponents with true/false, and timob5123 with true/false", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-19T17:22:56.000+0000", "updated": "2011-12-19T17:22:56.000+0000" }, { "id": "178382", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Updating tags", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-01-06T12:02:07.000+0000", "updated": "2012-01-06T12:02:07.000+0000" } ], "maxResults": 36, "total": 36, "startAt": 0 } } }