{ "id": "122574", "key": "ALOY-878", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "11113", "key": "ALOY", "name": "Alloy", "projectCategory": { "id": "10400", "description": "Tools for developing applications", "name": "Tooling" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2013-11-18T14:29:59.000+0000", "created": "2013-11-18T02:38:12.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "Alloy", "Studio" ], "versions": [ { "id": "15602", "description": "Alloy 1.2.2", "name": "Alloy 1.2.2", "archived": false, "released": true, "releaseDate": "2013-09-18" } ], "issuelinks": [], "assignee": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-02-28T23:57:14.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": "13602", "name": "Appcelerator Studio", "description": "Appcelerator Studio specific issues" }, { "id": "12332", "name": "Titanium SDK", "description": "Any integration or issues with the TiSDK" } ], "description": "I have the following index.xml view:\r\n\r\n\r\n\t\r\n\t\t\t\r\n\t\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\r\n\r\nI'm working on a formFactor tags with iphone and ipad layouts using formfactor tags. Whichever one is second never gets processed. If I switch the SplitWindow to be before the tag, it gets processed but when you start the iphone layout, it won't get processed. \r\n\r\nAttaching a test project. Working on some work with Citi Group and had some questions about iPad / SplitWindow workings with Alloy. ", "attachment": [ { "id": "43969", "filename": "SplitWindowTest.zip", "author": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "created": "2013-11-18T02:38:12.000+0000", "size": 9197032, "mimeType": "application/zip" } ], "flagged": false, "summary": " not recognized when used with formFactor tags", "creator": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "environment": "Appcelerator Studio, build: 3.1.3.201309132456, Titanium CLI 3.1.2, Alloy 1.2.2, \r\nXcode 5.0.1, OS X 10.8.5", "comment": { "comments": [ { "id": "279960", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "What does \"it doesn't get processed\" mean? It doesn't generate code? It throws an error? I need more specifics to understand what is going on here. \n\nI'll work with it in the meantime, but a little more detail would be helpful.", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-18T13:49:01.000+0000", "updated": "2013-11-18T13:49:01.000+0000" }, { "id": "279961", "author": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "body": "It throws an error:\n\n'undefined' is not an object ( evaluating '$.index.open') at index.js ( line ## ) \n", "updateAuthor": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "created": "2013-11-18T14:16:33.000+0000", "updated": "2013-11-18T14:16:33.000+0000" }, { "id": "279962", "author": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "body": "I think it's looking for this line to be in the (!Alloy.isTablet ) block that would be evaluating for iPhone. on Line 52 it calls the $.index.open();\n\n$.__views.index && $.addTopLevelView($.__views.index);\n\nHere is the output from the index.js controller in Resources folder:\n\nhttps://gist.github.com/jamilspain-appc/7528528\n\n", "updateAuthor": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "created": "2013-11-18T14:24:16.000+0000", "updated": "2013-11-18T14:24:16.000+0000" }, { "id": "279963", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I assume you haven't given explicit IDs to the Window or SplitWindow? This is why you are getting some kind of error (still not clear though since you didn't say exactly what is happening). You can't use the automatic ID to apply to multiple elements when the conditional you are using is a runtime conditional, like form factor, since this can't be determined at compile time.\r\n\r\nYou need to give an explicit ID to your components and this will work just fine. Here's a slight modification of your case that works just fine for iphone and ipad, regardless of the order of elements.\r\n\r\nh3. index.xml\r\n{code:xml}\r\n\r\n\r\n\t\r\n\t\t\r\n\t\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n\r\n{code}\r\n\r\nh3. index.js\r\n{code:javascript}\r\n$.win.open();\r\n{code}", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-18T14:29:59.000+0000", "updated": "2013-11-18T14:30:27.000+0000" }, { "id": "279989", "author": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "body": "Gotcha.. so as a general rule for trainings, it's just best to just assign explicit IDs to top level objects and that will always work no matter what the situation. If you don't, then the only use case that will work for ( the automatic ID ) is with a single top level object in a View Layout. \n\nSound accurate, any more exceptions?", "updateAuthor": { "name": "jspain", "key": "jspain", "displayName": "Jamil Spain", "active": false, "timeZone": "America/New_York" }, "created": "2013-11-18T17:19:53.000+0000", "updated": "2013-11-18T17:19:53.000+0000" }, { "id": "279991", "author": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah, that might be the safest bet. The only situation this should occur in is if you have multiple top level elements that are relying on the auto id of the controller name AND you are using runtime conditionals on them (like form factor). A very specific case you managed to find. ;-)", "updateAuthor": { "name": "tlukasavage", "key": "tlukasavage", "displayName": "Tony Lukasavage", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-11-18T17:31:57.000+0000", "updated": "2013-11-18T17:31:57.000+0000" } ], "maxResults": 6, "total": 6, "startAt": 0 } } }