{ "id": "149525", "key": "AC-202", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2015-07-21T21:39:39.000+0000", "created": "2015-07-08T08:11:41.000+0000", "labels": [ "ios", "tableview", "tablewviewrow", "update" ], "versions": [], "issuelinks": [], "assignee": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "updated": "2015-07-21T21:39: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": [], "description": "I have a *Tableview* with some *TablewViewRow* with a *Label* and a *Slider*.\r\nThe slider has two events , *touchstart* and *touchend* to see the rounded value of the slider in the label.\r\n\r\nThe problem is simple. With this configuration (code posted below , test on iphone) , the slider is locked and the movement is not fluid. I noticed that if I replace the label with a *Textarea* the problem not persist.\r\n\r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar table_object = Ti.UI.createTableView({\r\n separatorColor : 'transparent',\r\n width : 320,\r\n height : 300,\r\n backgroundColor : 'black'\r\n});\r\n\r\n\r\nvar row = Ti.UI.createTableViewRow({\r\n backgroundColor : 'gray',\r\n height : 120,\r\n});\r\nrow.timer = null;\r\n\r\nvar label = Ti.UI.createLabel({\r\n text : \"0%\",\r\n top : 5,\r\n color : 'red',\r\n font : {\r\n fontSize : 30,\r\n fontWeight : 'bold'\r\n },\r\n width : 100,\r\n textAlign : 'center'\r\n});\r\n\r\n/*var label = Ti.UI.createTextArea({\r\n value : \"0%\",\r\n top : 5,\r\n color : 'red',\r\n font : {\r\n fontSize : 30,\r\n fontWeight : 'bold'\r\n },\r\n width : 100,\r\n textAlign : 'center'\r\n});*/\r\n\r\nvar slider = Ti.UI.createSlider({\r\n min : 0.0,\r\n max : 100.0,\r\n value : 10,\r\n width : 300,\r\n left : 10,\r\n bottom : 10\r\n});\r\n\r\n\r\nslider.addEventListener('touchstart', function(e) {\r\n row.timer = setInterval(function() {\r\n label.text = parseValue(slider.value, 5) + \"%\";\r\n //label.value = parseValue(slider.value, 5) + \"%\";\r\n }, 50);\r\n});\r\n\r\nslider.addEventListener('touchend', function(e) {\r\n clearInterval(row.timer);\r\n var newValue = parseValue(e.value, 5);\r\n label.text = newValue + \"%\";\r\n //label.value = newValue + \"%\";\r\n});\r\n\r\nfunction parseValue(value, value_to_round) {\r\n value /= value_to_round;\r\n value = Math.round(value);\r\n value *= value_to_round;\r\n return value;\r\n};\r\n\r\nrow.add(slider,label);\r\ntable_object.data = [row];\r\nwin.add(table_object);\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "56123", "filename": "iOS Simulator Screen Shot 08.lug.2015 10.08.48.png", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-07-08T08:11:05.000+0000", "size": 25835, "mimeType": "image/png" } ], "flagged": false, "summary": "Update label.text from slider in TableView block the slider ", "creator": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "subtasks": [], "reporter": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "environment": null, "comment": { "comments": [ { "id": "357343", "author": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello [~nicolomonili],\r\n\r\nAt first add a view to the row then add slider and label to it like this code \r\n\r\n{code}\r\nview.add(label);\r\nview.add(slider);\r\nrow.add(view);\r\ntable_object.data = [row];\r\nwin.add(table_object);\r\n{code}\r\n\r\n[Document|http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableViewRow-method-add] also says about it.\r\nThanks.", "updateAuthor": { "name": "morahman", "key": "morahman", "displayName": "Motiur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2015-07-09T08:56:21.000+0000", "updated": "2015-07-09T08:56:21.000+0000" }, { "id": "357344", "author": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "body": "Yeah this solve the problem !\r\n\r\nIn any case, the problem arose with the latest SDK", "updateAuthor": { "name": "nicolomonili", "key": "nicolomonili", "displayName": "nicolomonili", "active": true, "timeZone": "Europe/Rome" }, "created": "2015-07-09T09:01:47.000+0000", "updated": "2015-07-09T09:01:47.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }