{ "id": "131091", "key": "TIMOB-17260", "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": "16593", "description": "Release 4.0.0", "name": "Release 4.0.0", "archived": false, "released": true, "releaseDate": "2015-05-21" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-09-04T22:47:04.000+0000", "created": "2014-05-30T20:58:20.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_animation", "qe-manualtest", "qe-testadded" ], "versions": [ { "id": "15971", "description": "Release 3.2.3", "name": "Release 3.2.3", "archived": false, "released": true, "releaseDate": "2014-04-30" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2015-02-16T09:23:27.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": "h4. Problem Description\r\nThree (red, blue, green) square views should move from top of the screen ([ 0,50], [0,80], [0,random]) to the same target position [300, 300] (grey square). They **only** move as expected after you add a stringify the view. \r\n\r\nSee the video attached.\r\nI managed to recreate the issue on the GT-S7562 device as well.\r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (classic titanium)\r\n2. Add this code to app.js\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor:'white',\r\n});\r\n \r\nvar viewo = Ti.UI.createView({\r\n backgroundColor:'#888',\r\n top:300,\r\n left:300,\r\n width:100,\r\n height:100,\r\n});\r\n \r\nwin.add(viewo);\r\n \r\nfunction createView(color, id){\r\n return Ti.UI.createView({\r\n backgroundColor: color,\r\n width: 100,\r\n height: 100,\r\n opacity: 0.5,\r\n id: id\r\n });\r\n}\r\n \r\nvar view1 = createView('green', '1');\r\nvar view2 = createView('blue', '2');\r\nvar view3 = createView('red', '3');\r\n \r\nvar animation1 = Ti.UI.createAnimation();\r\nvar animation2 = Ti.UI.createAnimation();\r\nvar animation3 = Ti.UI.createAnimation();\r\n \r\nanimation1.addEventListener('complete', function() {\r\n //Ti.API.info('animation1 complete. view: ' + JSON.stringify(view1));\r\n startAll();\r\n});\r\n \r\nanimation2.addEventListener('complete', function() {\r\n //Ti.API.info('animation2 complete. view: ' + JSON.stringify(view2));\r\n});\r\n \r\nanimation3.addEventListener('complete', function() {\r\n //Ti.API.info('animation3 complete. view: ' + JSON.stringify(view3));\r\n});\r\n \r\nfunction initAnimation(animation){\r\n animation.left = 300;\r\n animation.top = 300;\r\n animation.duration = 5000; \r\n}\r\n \r\nfunction startAnimation(x, view, animation){\r\n view.setLeft(x);\r\n view.setTop(0);\r\n \r\n initAnimation(animation);\r\n \r\n JSON.stringify(view); // Comment out this line in order to see the bug in your emulator.\r\n view.animate(animation); \r\n}\r\n \r\nfunction startAnimation1(){\r\n var startX = 50;\r\n startAnimation(startX, view1, animation1); \r\n}\r\n \r\nvar startX = 50;\r\nfunction startAnimation2(){\r\n startX += 30;\r\n startAnimation(startX, view2, animation2); \r\n}\r\n \r\nfunction startAnimation3(){\r\n var startX = Math.floor(Math.random() * 500);\r\n startAnimation(startX, view3, animation3); \r\n}\r\n \r\nfunction startAll(){\r\n setTimeout(function(){\r\n startAnimation1();\r\n startAnimation2();\r\n startAnimation3();\r\n }, 3000);\r\n}\r\n \r\nwin.add(view1);\r\nwin.add(view2);\r\nwin.add(view3);\r\n \r\nwin.open();\r\n \r\nstartAll();\r\n{code}\r\n3. Comment out the line with the comment \"Comment out this line in order to see the bug in your emulator.\".\r\n4. Run it in emulator to see the issue (the animation breaks down when you comment out the line in step 3 - if you add it again, it will work as expected). \r\n\r\nh4. Extra info\r\nPlease check the video for more information. \r\n", "attachment": [ { "id": "48488", "filename": "animation3.avi", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-05-30T20:58:20.000+0000", "size": 3857000, "mimeType": "video/avi" } ], "flagged": false, "summary": "Android: Animation is broken if you don't stringify the affected view", "creator": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "subtasks": [], "reporter": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "environment": "Windows 7, 3.2.3.GA, Android", "closedSprints": [ { "id": 199, "state": "closed", "name": "2014 Sprint 18 SDK", "startDate": "2014-09-02T22:56:57.421Z", "endDate": "2014-09-13T00:00:00.000Z", "completeDate": "2014-09-15T20:08:19.146Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "311543", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello, \r\n\r\ncan you please describe the issue? We need stuff like:\r\n\r\n- Description of the problem\r\n- Steps to reproduce (already provided)\r\n- Expected behavior \r\n- Actual behavior\r\n\r\nI add here the classic titanium sample:\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor:'white',\r\n});\r\n\r\nvar viewo = Ti.UI.createView({\r\n\tbackgroundColor:'#888',\r\n\ttop:300,\r\n\tleft:300,\r\n\twidth:100,\r\n\theight:100,\r\n});\r\n\r\nwin.add(viewo);\r\n\r\nfunction createView(color, id){\r\n return Ti.UI.createView({\r\n backgroundColor: color,\r\n width: 100,\r\n height: 100,\r\n opacity: 0.5,\r\n id: id\r\n });\r\n}\r\n \r\nvar view1 = createView('green', '1');\r\nvar view2 = createView('blue', '2');\r\nvar view3 = createView('red', '3');\r\n \r\nvar animation1 = Ti.UI.createAnimation();\r\nvar animation2 = Ti.UI.createAnimation();\r\nvar animation3 = Ti.UI.createAnimation();\r\n \r\nanimation1.addEventListener('complete', function() {\r\n //Ti.API.info('animation1 complete. view: ' + JSON.stringify(view1));\r\n startAll();\r\n});\r\n \r\nanimation2.addEventListener('complete', function() {\r\n //Ti.API.info('animation2 complete. view: ' + JSON.stringify(view2));\r\n});\r\n \r\nanimation3.addEventListener('complete', function() {\r\n //Ti.API.info('animation3 complete. view: ' + JSON.stringify(view3));\r\n});\r\n \r\nfunction initAnimation(animation){\r\n animation.left = 300;\r\n animation.top = 300;\r\n animation.duration = 5000; \r\n}\r\n \r\nfunction startAnimation(x, view, animation){\r\n view.setLeft(x);\r\n view.setTop(0);\r\n \r\n initAnimation(animation);\r\n \r\n JSON.stringify(view); // !!!\r\n view.animate(animation); \r\n}\r\n \r\nfunction startAnimation1(){\r\n var startX = 50;\r\n startAnimation(startX, view1, animation1); \r\n}\r\n \r\nvar startX = 50;\r\nfunction startAnimation2(){\r\n startX += 30;\r\n startAnimation(startX, view2, animation2); \r\n}\r\n \r\nfunction startAnimation3(){\r\n var startX = Math.floor(Math.random() * 500);\r\n startAnimation(startX, view3, animation3); \r\n}\r\n \r\nfunction startAll(){\r\n setTimeout(function(){\r\n startAnimation1();\r\n startAnimation2();\r\n startAnimation3();\r\n }, 3000);\r\n}\r\n \r\nwin.add(view1);\r\nwin.add(view2);\r\nwin.add(view3);\r\n \r\nwin.open();\r\n \r\nstartAll();\r\n\r\n{code}\r\n\r\nThanks for reporting! ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-06-30T04:56:38.000+0000", "updated": "2014-06-30T04:56:38.000+0000" }, { "id": "311908", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "I've spent my time to record a video that is clear more than enough even with no source code. But the code is provided as well. You need a formal description? Ok, here you are:\r\n\r\n*Description of the problem:* Animation does not work as expected. \"JSON.stringify(view);\" string magically fix the problem if added to the code as it shown in the video and in the code attached.\r\n*Expected behavior:* 1. Animation should work properly, i.e. as it written in the code. 2. \"JSON.stringify(view);\" should not affect animation.\r\n*Actual behavior:* 1. Animation does not work properly. 2. \"JSON.stringify(view);\" affects animation.\r\n\r\nPS. Please, spend 2 minutes to watch the video attached. I've spent much more time to record it for you. Thanks.", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T21:12:30.000+0000", "updated": "2014-07-01T21:12:30.000+0000" }, { "id": "311913", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\nso the ddescription: \r\n\r\nAnimation is failing if you don't add JSON.stringify(view)? Like if the stringify \"fixes\" the issue? \r\n\r\nJust to be clear. \r\n\r\nBest Regards", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-01T21:22:48.000+0000", "updated": "2014-07-01T21:22:48.000+0000" }, { "id": "311916", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "I can't believe that. Your computer can't play avi? Should I make and attach screenshots?\r\nAs it clear from the video, animation is shown totally incorrect with no stringify injected. ", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T21:39:34.000+0000", "updated": "2014-07-01T21:39:34.000+0000" }, { "id": "311920", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~fixplease].\r\n\r\nWe played your video, there is no sound, there is only some signs of things that you point to. If you can provide a detailed description of your problem, we can help you. In this moment, we don't have your context or what exactly is wrong here. \r\n\r\nPlease take a look into the best practices to report an issue: https://wiki.appcelerator.org/display/guides2/How+to+Submit+a+Bug+Report \r\n\r\nBest Regards\r\n", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-01T21:45:52.000+0000", "updated": "2014-07-01T21:45:52.000+0000" }, { "id": "311928", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "Mauro, it's all about animation, not about sound. What sound do you need? I can sing something for you if it could help. But I have to warn I'm a bad singer.\r\nDo you understand the code attached? Is it clear what should be shown on device screen as the result of the code execution? Should I explain the code for you? I assumed that the code is self-descriptive.... Hmmmm......\r\n\r\n ", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T22:02:09.000+0000", "updated": "2014-07-01T22:02:09.000+0000" }, { "id": "311930", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello [~fixplease], \r\n\r\nThanks for providing a testcase. But still, you need to provide: \r\n\r\n- Problem Description. What the problem is? By example: When I animate the view1 30 rad to the left, it does only 27. \r\n- Test case - Provide an app.js, and instructions like: 1. Create new mobile project (classic titanium). 2. Paste app.js with the provided test case. 3. Run it in a device, so you can see the issue. \r\n- Environment. This happened to me when I was using Ti Studio Version x.XX, Mobile SDK x.xx, etc. \r\n\r\nI understand your frustration over this. We are processing few hundreds TC bugs here. Any little clarity about your bug, will be really helpful to speed things up. \r\n\r\nAnd believe, we really thank you for taking this time and interest in reporting issues. But it needs certain level of detail in order to be useful to the Platform team (or any team involved). \r\n\r\nBest Regards ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-01T22:08:26.000+0000", "updated": "2014-07-01T22:08:26.000+0000" }, { "id": "311933", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "{quote}\r\nwhat exactly is wrong here\r\n{quote}\r\nAccording to the code the 3 (red, blue, green) square views should move from top of the screen (\\[ 0,50\\], \\[0,80\\], \\[0,random\\]) to the same target position \\[300, 300\\] (grey square).\r\nThey really move as expected but only in case of the stringify is injected.\r\nAnd they move in unpredictable way once the stringify code line is commented out. And it's clearly shown in the video.", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T22:16:35.000+0000", "updated": "2014-07-01T22:16:35.000+0000" }, { "id": "311936", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "{quote}\r\nBut it needs certain level of detail\r\n{quote}\r\nAll the details are here. You just don't want to see them.\r\nI'm almost sure that fixing the bug could take less time than I've already spent with you for nothing.", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T22:22:44.000+0000", "updated": "2014-07-01T22:22:44.000+0000" }, { "id": "311939", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Thanks for your report. The priority will be set by the platform team. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2014-07-01T22:27:41.000+0000", "updated": "2014-07-01T22:27:41.000+0000" }, { "id": "311942", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "Thanks, Mauro", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-01T22:31:41.000+0000", "updated": "2014-07-01T22:31:41.000+0000" }, { "id": "314944", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I don't think Stringfy make the animation work. It just that once 'left' and 'top' of the view is set, layout needs to be triggered for the properties to be set internally otherwise the animation will use the value that was already there (which is the ending position of the animation). \r\nThe same code will work, if there is delay after the 'left' and 'top' properties are set like calling view.animate(animation) in a setTimeout\r\n\r\nI think the better approach will be to set 'top', 'left' for all views and then start the animation, something like\r\n\r\n{code}\r\n var win = Ti.UI.createWindow({\r\n\t backgroundColor:'white',\r\n\t});\r\n\t \r\n\tvar viewo = Ti.UI.createView({\r\n\t backgroundColor:'#888',\r\n\t top:300,\r\n\t left:300,\r\n\t width:100,\r\n\t height:100,\r\n\t});\r\n\t \r\n\twin.add(viewo);\r\n\t \r\n\tfunction createView(color, id){\r\n\t return Ti.UI.createView({\r\n\t backgroundColor: color,\r\n\t width: 100,\r\n\t height: 100,\r\n\t opacity: 0.5,\r\n\t id: id\r\n\t });\r\n\t}\r\n\t \r\n\tvar view1 = createView('green', '1');\r\n\tvar view2 = createView('blue', '2');\r\n\tvar view3 = createView('red', '3');\r\n\t \r\n\tvar animation1 = Ti.UI.createAnimation();\r\n\tvar animation2 = Ti.UI.createAnimation();\r\n\tvar animation3 = Ti.UI.createAnimation();\r\n\t \r\n\tanimation1.addEventListener('complete', function() {\r\n\t startAll();\r\n\t});\r\n\t \r\n\tfunction initAnimation(animation){\r\n\t animation.left = 300;\r\n\t animation.top = 300;\r\n\t animation.duration = 5000; \r\n\t}\r\n\t \r\n\tfunction startAnimation(view, animation){\r\n\r\n\t initAnimation(animation);\r\n\r\n\t view.animate(animation);\r\n\t}\r\n\t \r\n\tfunction startAnimation1(){\r\n\t startAnimation(view1, animation1); \r\n\t}\r\n\t \r\n\tfunction startAnimation2(){\r\n\t startAnimation(view2, animation2); \r\n\t}\r\n\t \r\n\tfunction startAnimation3(){\r\n\t startAnimation( view3, animation3); \r\n\t}\r\n\t \r\n\tfunction startAll(){\r\n\t\t view1.setLeft(50);\r\n\t\t view1.setTop(0);\r\n\t\t view2.setLeft(80);\r\n\t\t view2.setTop(0);\r\n\t\t view3.setLeft(Math.floor(Math.random() * 500));\r\n\t\t view3.setTop(0);\r\n\t\t \r\n\t setTimeout(function(){\r\n\t startAnimation1();\r\n\t startAnimation2();\r\n\t startAnimation3();\r\n\t }, 50);\r\n\t}\r\n\r\n\twin.add(view1);\r\n\twin.add(view2);\r\n\twin.add(view3);\r\n\t \r\n\twin.open();\r\n\t \r\n\tstartAll();\r\n{code}", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-07-19T11:59:00.000+0000", "updated": "2014-08-03T11:52:56.000+0000" }, { "id": "315449", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "{quote}\r\nvar i,j=0;\r\nfor (i=0;i<40000000;i++)\r\n\r\n{j++;}\r\nor calling view.animate(animation) in a setTimeout\r\n{quote}\r\n\r\nSunila, are you serious???\r\nShould I use the proposed loop in production code? Are you serious?\r\n\r\nI don't think that my code is a kind of incorrect or 'sophisticated'. The code is easy and straightforward. I don't care about \"set internally\" as I have no way to control that. It's a BUG if something does not work as expected in the internals. I'm really surprised that you suggest to use such kind of dirty code instead of fixing the BUG.\r\n\r\nSunila, please, re-open the bug and assign it to a more competent person. \r\n\r\nThanks", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-23T10:13:46.000+0000", "updated": "2014-07-23T10:13:46.000+0000" }, { "id": "315480", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~fixplease] We have had multiple complaints from members of the community about inappropriate tone and language by you, both in this ticket and others. This behavior is unacceptable. As an open-source community that values transparency and respect, we appreciate constructive feedback. Anonymity does not exempt contributors from these standards. This is free software. There is no obligation to use it, and we are under no obligation to help belligerent users with it. Your input and insight is valuable, but to remain on this forum, you need to reconsider your approach.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-23T16:34:43.000+0000", "updated": "2014-07-23T16:34:43.000+0000" }, { "id": "315484", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Apologies if my comment was not clear. My intention was not to suggest the use of 'loop' to solve the issue but to say that the stringify has nothing to do with the issue and any calls that introduce a delay will also work. As you can see, in the modified sample I put there, there is no loop and I just moved the existing code that sets the 'left' and 'top' properties to outside of the 'setTimeout' and it works.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-07-23T16:51:04.000+0000", "updated": "2014-07-23T16:51:04.000+0000" }, { "id": "315496", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "Ingo, let's leave moral aspects and could you explain why the bug is closed as 'invalid' instead?\r\nI'm spending my time helping you to improve the product. But from the other (your) side I feel something like \"don't bother us, we are busy\". And this thread illustrates this well. Review it from the beginning. I've provided not only the code but even recorded video that clearly explains the issue. And how the item was processed at your side? Imho, this thread really illustrates how software shouldn't be being developed. Don't you think that \"this is unacceptable\"? I can't be patient in such cases as I'm spending my time for nothing.\r\n\r\nI'd like to know your opinion, TIMOB-17260 is a bug or not? That's a simple question. Could you answer, please?", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-23T17:48:55.000+0000", "updated": "2014-07-23T17:48:55.000+0000" }, { "id": "315499", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "{quote}\r\n I just moved the existing code that sets the 'left' and 'top' properties to outside of the 'setTimeout' and it works.\r\n{quote}\r\nSunila, that's great that it magically works. But, you know, I don't like voodoo techniques in software development. And even more - I hate such techniques. Could you answer, please, what is wrong in my code? The code is incorrect? What is incorrect if so? Thanks.", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-23T17:57:04.000+0000", "updated": "2014-07-23T17:57:04.000+0000" }, { "id": "315725", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We have a little more information here. \r\nWe validated that with the existing code, it seems to work if we use the stringify or even if we console.log the views as they are passed in to the function.\r\n\r\nWe were able to get more of a clue as to what is happening when we refactored the example code. We moved some items around but still had issues. It was when we include a small delay in the \"startAnimation\" function that things start working without the stringify. It seems to indicate that there is a timing issue. In the case of the refactored sample perhaps related to the setting of the left and top, then immediately animating. With a 100 millisecond delay before animating, things seem to work. We will continue to investigate.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow({backgroundColor:'white'}),\r\n\tview0 = Ti.UI.createView({backgroundColor:'#888', top:300, left:300, width:100, height:100}), \r\n\tanimation1 = Ti.UI.createAnimation({left:300, top:300, duration:5000}),\r\n\tanimation2 = Ti.UI.createAnimation({left:300, top:300, duration:5000}),\r\n\tanimation3 = Ti.UI.createAnimation({left:300, top:300, duration:5000}),\r\n\tstartX = 50;\r\n\r\nfunction createView(color, id, left){\r\n\treturn Ti.UI.createView({\r\n\t\tbackgroundColor: color,\r\n\t\ttop:0,\r\n\t\tleft:left,\r\n\t\twidth: 100,\r\n\t\theight: 100,\r\n\t\topacity: 0.5,\r\n\t\tid: id\r\n\t});\r\n}\r\n \r\nvar view1 = createView('green', '1', 50),\r\n\tview2 = createView('blue', '2', 80),\r\n\tview3 = createView('red', '3', Math.floor(Math.random() * 500));\r\n\r\nanimation1.addEventListener('complete', function() { Ti.API.info('Animation 1 Complete'); setTimeout(function(){ startAll(); }, 3000); });\r\nanimation2.addEventListener('complete', function() { Ti.API.info('Animation 2 Complete'); });\r\nanimation3.addEventListener('complete', function() { Ti.API.info('Animation 3 Complete'); });\r\n\r\nfunction startAnimation(x, view, animation){\r\n\tview.setLeft(x);\r\n\tview.setTop(0);\r\n\tsetTimeout(function(){ \r\n\t\tview.animate(animation);\r\n\t}, 100); // this delay seems to allow expected results.\r\n}\r\n\r\nfunction startAnimation1(){\r\n\tvar startX = 50;\r\n\tstartAnimation(startX, view1, animation1); \r\n}\r\n\r\nfunction startAnimation2(){\r\n\tstartX += 30;\r\n\tstartAnimation(startX, view2, animation2); \r\n}\r\n\r\nfunction startAnimation3(){\r\n\tvar startX = Math.floor(Math.random() * 500);\r\n\tstartAnimation(startX, view3, animation3); \r\n}\r\n\r\nfunction startAll(){\r\n\tstartAnimation1();\r\n\tstartAnimation2();\r\n\tstartAnimation3();\r\n}\r\n\r\nwin.add(view0);\r\nwin.add(view1);\r\nwin.add(view2);\r\nwin.add(view3);\r\nwin.open();\r\nstartAll();\r\n{code}\r\n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-24T23:23:06.000+0000", "updated": "2014-07-24T23:23:06.000+0000" }, { "id": "315974", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "{quote}\r\nWe will continue to investigate.\r\n{quote}\r\nShouldn't the item be re-opened?\r\n\r\nBtw, *Ingo*, will you answer or not?", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-07-28T15:48:50.000+0000", "updated": "2014-07-28T15:48:50.000+0000" }, { "id": "315998", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Reopening to discuss in triage. It appears from the responses this is a timing issue, so once we determine the root cause or an acceptable workaround, we should update the title/description to match.", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-07-28T17:36:35.000+0000", "updated": "2014-07-28T17:36:35.000+0000" }, { "id": "316768", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Modified the animate code to queue up a new request if there is layout pending.\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5946\r\n", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-08-03T11:46:00.000+0000", "updated": "2014-08-03T11:46:00.000+0000" }, { "id": "321214", "author": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "body": "Hi\r\nWhat is the current status of the item? Seems, code review has been done a month ago.", "updateAuthor": { "name": "fixplease", "key": "fixplease", "displayName": "Fix Please", "active": true, "timeZone": "Europe/Luxembourg" }, "created": "2014-09-01T10:20:02.000+0000", "updated": "2014-09-01T10:20:02.000+0000" }, { "id": "326945", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix on latest 3.5.0 SDK. \r\nWaiting for merge to 3.4.1 SDK to close.\r\n\r\nEnvironment:\r\nAppc Studio : 3.4.0.201409261245\r\nTi SDK : 3.5.0.v20141002192515\r\nMac OSX : 10.9.4\r\nAlloy : 1.5.1\r\nCLI - 3.4.0\r\nCode Processor: 1.1.1\r\nNexus 5 - Android 4.4.4", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-03T21:51:53.000+0000", "updated": "2014-10-03T21:51:53.000+0000" }, { "id": "343490", "author": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "body": "Verified the fix on below Test Environment\r\nAppc Studio : 4.0.0.201502111039\r\nTi SDK : 4.0.0.v20150213151526 \r\nMac OSX : 10.10.1\r\nAlloy : 1.5.1 \r\nCLI - 3.6.0-dev \r\nCode Processor: 1.1.1 \r\nNexus 5 - Android 5.0\r\n\r\nThree (red, blue, green) square views moves from top of the screen ([ 0,50], [0,80], [0,random]) to the same target position [300, 300] (grey square) without stringify the view.\r\n\r\nSo Closing this ticket.\r\n", "updateAuthor": { "name": "kagrawal", "key": "kagrawal", "displayName": "Khushbu Agrawal", "active": true, "timeZone": "Asia/Shanghai" }, "created": "2015-02-16T09:23:27.000+0000", "updated": "2015-02-16T09:23:27.000+0000" } ], "maxResults": 24, "total": 24, "startAt": 0 } } }