{ "id": "81860", "key": "TIMOB-5836", "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": "12089", "description": "", "name": "Sprint 2011-49", "archived": true, "released": true, "releaseDate": "2011-12-12" } ], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2011-12-05T13:16:54.000+0000", "created": "2011-10-23T23:54:16.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "11331", "description": "", "name": "Release 1.8.0", "archived": true, "released": true, "releaseDate": "2011-10-31" } ], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-01-10T17:35:39.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "1) Create a new project and place the following in the app.js\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'});\r\n\r\nvar img = Ti.UI.createImageView({image:'grouch.jpg'});\r\n\r\nwin.add(img);\r\n\r\nwin.orientationModes = [Ti.UI.UPSIDE_PORTRAIT];\r\n\r\nwin.open();\r\n{code}\r\n2) Place the grouch.jpg in the Resources folder\r\n3) Launch project\r\n\r\nExpected results: Application launches normally and image appears in upside portrait mode\r\n\r\nActual results: Application Error: Result of expression 'win.orientationModes' [undefined] is not an object. at app.js (line 1) \r\n\r\nNotes:\r\nTi.UI.UPSIDE_PORTRAIT is recognized as a valid orientation mode when there are other orientation modes in win.orientationModes[]. This error only occurs when there is only Ti.UI.UPSIDE_PORTRAIT in win.orientationModes[].\r\n\r\nIn SDK 1.7.2 and 1.7.3, the error appears as 'null' instead of 'undefined'\r\n\r\nEDIT: Fixed syntax", "attachment": [ { "id": "23839", "filename": "grouch.jpg", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-23T23:54:16.000+0000", "size": 52018, "mimeType": "image/jpeg" }, { "id": "23838", "filename": "Screenshot 2011.10.24 00.28.15.png", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-10-23T23:54:16.000+0000", "size": 102588, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Application does not recognize upside down portrait orientation mode ", "creator": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iPod 4.3.3, 1.8.0.v20111013161411, OSX 10.7.2, Titanium Studio build: 1.0.6.201110171921", "comment": { "comments": [ { "id": "171753", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "win.orientationModes[Ti.UI.UPSIDE_PORTRAIT]; should be win.orientationModes=[Ti.UI.UPSIDE_PORTRAIT];. Assignment, not fetching.\r\n\r\nThere is an issue that upside_portrait is not considered upon launch unless it's already in that mode. This will be fixed. At the same time, portrait IS considered upon launch even when not in that mode. There is no valid use case where upside_portrait is to be used exclusively. When win.orientationModes=[Ti.UI.UPSIDE_PORTRAIT,Ti.UI.PORTRAIT] is used, the following happens, and IS expected behavior:\r\n\r\nOn iPad, when device is upside down on launch, window opens in UPSIDE_PORTRAIT as expected.\r\nWhen the device is not upside down on launch, window opens in PORTRAIT as it is the default.\r\nOn iPhone, device ALWAYS launches from portrait (Apple's design and spec), and window \r\n\r\nIn all cases, window will freely rotate between portrait and upside portrait as expected when both orientations are specified.\r\n", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-07T11:18:32.000+0000", "updated": "2011-11-07T11:18:32.000+0000" }, { "id": "171766", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "How do we want to close/resolve this?", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-11-07T12:56:30.000+0000", "updated": "2011-11-07T12:56:30.000+0000" }, { "id": "174473", "author": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hey Blain, \r\n\r\nI retested this with 1.8.0.1.v20111201115057 with the correct syntax. The app only appears in portrait, even if the device is held upside down. Even though UPSIDE_PORTRAIT is a strange use case, shouldn't the app still appear in that mode if it is specified as an orientation mode?", "updateAuthor": { "name": "avaghti", "key": "avaghti", "displayName": "Alan Vaghti", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-12-01T13:19:01.000+0000", "updated": "2011-12-01T13:19:01.000+0000" }, { "id": "174895", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Tested with MobileSDK version 1.8.0.1, githash 8f6f25b\r\n\r\nCan not reproduce on either simulator or device.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-12-05T13:14:30.000+0000", "updated": "2011-12-05T13:14:30.000+0000" }, { "id": "178806", "author": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested with Ti Studio 1.0.8.201201091758\r\nTi Mob SDK 1.8.0.1\r\nOSX Lion\r\niPhone 4S, iPad sim\r\n\r\nExpected result is shown", "updateAuthor": { "name": "mpettiford", "key": "mpettiford", "displayName": "Michael Pettiford", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-10T17:35:39.000+0000", "updated": "2012-01-10T17:35:39.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }