{ "id": "137662", "key": "AC-1199", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2014-10-13T07:22:30.000+0000", "created": "2014-10-04T12:43:55.000+0000", "labels": [ "listview" ], "versions": [], "issuelinks": [], "assignee": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "updated": "2016-03-08T07:37:34.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": "An app will crash if bindId is called `description`. It would be good to check it out - Why it keep crashing and is it only because of `description`?\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow({backgroundColor: 'white'});\r\n\r\n// Create a custom template that displays an image on the left, \r\n// then a title next to it with a subtitle below it.\r\nvar myTemplate = {\r\n childTemplates: [\r\n { // Image justified left\r\n type: 'Ti.UI.ImageView', // Use an image view for the image\r\n bindId: 'pic', // Maps to a custom pic property of the item data\r\n properties: { // Sets the image view properties\r\n width: '50dp', height: '50dp', left: 0\r\n }\r\n },\r\n { // Title \r\n type: 'Ti.UI.Label', // Use a label for the title \r\n bindId: 'description', // Maps to a custom info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'black',\r\n font: { fontFamily:'Arial', fontSize: '20dp', fontWeight:'bold' },\r\n left: '60dp', top: 0,\r\n }\r\n },\r\n { // Subtitle\r\n type: 'Ti.UI.Label', // Use a label for the subtitle\r\n bindId: 'es_info', // Maps to a custom es_info property of the item data\r\n properties: { // Sets the label properties\r\n color: 'gray',\r\n font: { fontFamily:'Arial', fontSize: '14dp' },\r\n left: '60dp', top: '25dp',\r\n }\r\n }\r\n ]\r\n};\r\n\r\nvar listView = Ti.UI.createListView({\r\n // Maps myTemplate dictionary to 'template' string\r\n templates: { 'template': myTemplate },\r\n // Use 'template', that is, the myTemplate dict created earlier\r\n // for all items as long as the template property is not defined for an item.\r\n defaultItemTemplate: 'template'\r\n});\r\nvar sections = [];\r\n\r\nvar fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits / Frutas'});\r\nvar fruitDataSet = [\r\n // the text property of info maps to the text property of the title label\r\n // the text property of es_info maps to text property of the subtitle label\r\n // the image property of pic maps to the image property of the image view\r\n { description: {text: 'Apple'}, es_info: {text: 'Manzana'}, pic: {image: 'apple.png'}},\r\n { description: {text: 'Banana'}, es_info: {text: 'Banana'}, pic: {image: 'banana.png'}}\r\n];\r\nfruitSection.setItems(fruitDataSet);\r\nsections.push(fruitSection);\r\n\r\nvar vegSection = Ti.UI.createListSection({ headerTitle: 'Vegetables / Verduras'});\r\nvar vegDataSet = [\r\n { description: {text: 'Carrot'}, es_info: {text: 'Zanahoria'}, pic: {image: 'carrot.png'}},\r\n { description: {text: 'Potato'}, es_info: {text: 'Patata'}, pic: {image: 'potato.png'}}\r\n];\r\nvegSection.setItems(vegDataSet);\r\nsections.push(vegSection);\r\n\r\nvar grainSection = Ti.UI.createListSection({ headerTitle: 'Grains / Granos'});\r\nvar grainDataSet = [\r\n { description: {text: 'Corn'}, es_info: {text: 'Maiz'}, pic: {image: 'corn.png'}},\r\n { description: {text: 'Rice'}, es_info: {text: 'Arroz'}, pic: {image: 'rice.png'}}\r\n];\r\ngrainSection.setItems(grainDataSet);\r\nsections.push(grainSection);\r\n\r\nlistView.setSections(sections);\r\nwin.add(listView);\r\nwin.open();\r\n{code}\r\n\r\n\r\nConsole output\r\n{code}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSUnknownKeyException'.\r\n[ERROR] : Reason:\r\n[ERROR] : [<__NSCFString 0x79751110> valueForUndefinedKey:]: this class is not key value coding-compliant for the key text.\r\n[ERROR] : Stack trace:\r\n[ERROR] : \r\n[ERROR] : 0 CoreFoundation 0x051f8dda __exceptionPreprocess + 154\r\n[ERROR] : 1 libobjc.A.dylib 0x04dbba97 objc_exception_throw + 44\r\n[ERROR] : 2 CoreFoundation 0x051f8a11 -[NSException raise] + 17\r\n[ERROR] : 3 Foundation 0x02312c3a -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282\r\n[ERROR] : 4 Foundation 0x022553e8 _NSGetUsingKeyValueGetter + 104\r\n[ERROR] : 5 Foundation 0x02255378 -[NSObject(NSKeyValueCoding) valueForKey:] + 260\r\n[ERROR] : 6 Foundation 0x0226eb5d -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 383\r\n[ERROR] : 7 Foundation 0x0226eb1b -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 317\r\n[ERROR] : 8 appName 0x002eee8f -[TiUIListItem recordChangeValue:forKeyPath:withBlock:] + 127\r\n[ERROR] : 9 appName 0x002ee789 __28-[TiUIListItem setDataItem:]_block_invoke_2 + 281\r\n[ERROR] : 10 CoreFoundation 0x0512973a __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 106\r\n[ERROR] : 11 CoreFoundation 0x0512963c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204\r\n[ERROR] : 12 CoreFoundation 0x05120cc5 -[NSDictionary enumerateKeysAndObjectsUsingBlock:] + 53\r\n[ERROR] : 13 appName 0x002ee62c __28-[TiUIListItem setDataItem:]_block_invoke244 + 428\r\n[ERROR] : 14 CoreFoundation 0x0512973a __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 106\r\n[ERROR] : 15 CoreFoundation 0x0512963c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204\r\n[ERROR] : 16 CoreFoundation 0x05120cc5 -[NSDictionary enumerateKeysAndObjectsUsingBlock:] + 53\r\n[ERROR] : 17 appName 0x002ed951 -[TiUIListItem setDataItem:] + 2113\r\n[ERROR] : 18 appName 0x002ff202 -[TiUIListView tableView:cellForRowAtIndexPath:] + 1714\r\n[ERROR] : 19 UIKit 0x027bed6c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 473\r\n[ERROR] : 20 UIKit 0x027bee4e -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 77\r\n[ERROR] : 21 UIKit 0x0279867b -[UITableView _updateVisibleCellsNow:isRecursive:] + 3034\r\n[ERROR] : 22 UIKit 0x027b2f81 -[UITableView layoutSubviews] + 222\r\n[ERROR] : 23 UIKit 0x027289c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608\r\n[ERROR] : 24 libobjc.A.dylib 0x04dd1771 -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : 25 QuartzCore 0x00ed927f -[CALayer layoutSublayers] + 152\r\n[ERROR] : 26 QuartzCore 0x00ecd105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397\r\n[ERROR] : 27 QuartzCore 0x00eccf60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26\r\n[ERROR] : 28 QuartzCore 0x00e2b676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284\r\n[ERROR] : 29 QuartzCore 0x00e2ca3c _ZN2CA11Transaction6commitEv + 392\r\n[ERROR] : 30 QuartzCore 0x00e2d108 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92\r\n[ERROR] : 31 CoreFoundation 0x0511bfbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] : 32 CoreFoundation 0x0511bf00 __CFRunLoopDoObservers + 400\r\n[ERROR] : 33 CoreFoundation 0x0511193a __CFRunLoopRun + 1226\r\n[ERROR] : 34 CoreFoundation 0x051111ab CFRunLoopRunSpecific + 443\r\n[ERROR] : 35 CoreFoundation 0x05110fdb CFRunLoopRunInMode + 123\r\n[ERROR] : 36 GraphicsServices 0x05c2624f GSEventRunModal + 192\r\n[ERROR] : 37 GraphicsServices 0x05c2608c GSEventRun + 104\r\n[ERROR] : 38 UIKit 0x0269de16 UIApplicationMain + 1526\r\n[ERROR] : 39 appName 0x0006ce08 main + 456\r\n[ERROR] : 40 libdyld.dylib 0x057deac9 start + 1\r\n[ERROR] : \r\n[ERROR] : 2014-10-04 13:40:15.495 appName[35068:18791999] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0x79751110> valueForUndefinedKey:]: this class is not key value coding-compliant for the key text.'\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (\r\n[ERROR] : \t0 CoreFoundation 0x051f8df6 __exceptionPreprocess + 182\r\n[ERROR] : \t1 libobjc.A.dylib 0x04dbba97 objc_exception_throw + 44\r\n[ERROR] : \t2 CoreFoundation 0x051f8a11 -[NSException raise] + 17\r\n[ERROR] : \t3 Foundation 0x02312c3a -[NSObject(NSKeyValueCoding) valueForUndefinedKey:] + 282\r\n[ERROR] : \t4 Foundation 0x022553e8 _NSGetUsingKeyValueGetter + 104\r\n[ERROR] : \t5 Foundation 0x02255378 -[NSObject(NSKeyValueCoding) valueForKey:] + 260\r\n[ERROR] : \t6 Foundation 0x0226eb5d -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 383\r\n[ERROR] : \t7 Foundation 0x0226eb1b -[NSObject(NSKeyValueCoding) valueForKeyPath:] + 317\r\n[ERROR] : \t8 appName 0x002eee8f -[TiUIListItem recordChangeValue:forKeyPath:withBlock:] + 127\r\n[ERROR] : \t9 appName 0x002ee789 __28-[TiUIListItem setDataItem:]_block_invoke_2 + 281\r\n[ERROR] : \t10 CoreFoundation 0x0512973a __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 106\r\n[ERROR] : \t11 CoreFoundation 0x0512963c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204\r\n[ERROR] : \t12 CoreFoundation 0x05120cc5 -[NSDictionary enumerateKeysAndObjectsUsingBlock:] + 53\r\n[ERROR] : \t13 appName 0x002ee62c __28-[TiUIListItem setDataItem:]_block_invoke244 + 428\r\n[ERROR] : \t14 CoreFoundation 0x0512973a __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 106\r\n[ERROR] : \t15 CoreFoundation 0x0512963c -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 204\r\n[ERROR] : \t16 CoreFoundation 0x05120cc5 -[NSDictionary enumerateKeysAndObjectsUsingBlock:] + 53\r\n[ERROR] : \t17 appName 0x002ed951 -[TiUIListItem setDataItem:] + 2113\r\n[ERROR] : \t18 appName 0x002ff202 -[TiUIListView tableView:cellForRowAtIndexPath:] + 1714\r\n[ERROR] : \t19 UIKit 0x027bed6c -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 473\r\n[ERROR] : \t20 UIKit 0x027bee4e -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 77\r\n[ERROR] : \t21 UIKit 0x0279867b -[UITableView _updateVisibleCellsNow:isRecursive:] + 3034\r\n[ERROR] : \t22 UIKit 0x027b2f81 -[UITableView layoutSubviews] + 222\r\n[ERROR] : \t23 UIKit 0x027289c0 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 608\r\n[ERROR] : \t24 libobjc.A.dylib 0x04dd1771 -[NSObject performSelector:withObject:] + 70\r\n[ERROR] : \t25 QuartzCore 0x00ed927f -[CALayer layoutSublayers] + 152\r\n[ERROR] : \t26 QuartzCore 0x00ecd105 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 397\r\n[ERROR] : \t27 QuartzCore 0x00eccf60 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26\r\n[ERROR] : \t28 QuartzCore 0x00e2b676 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 284\r\n[ERROR] : \t29 QuartzCore 0x00e2ca3c _ZN2CA11Transaction6commitEv + 392\r\n[ERROR] : \t30 QuartzCore 0x00e2d108 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92\r\n[ERROR] : \t31 CoreFoundation 0x0511bfbe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30\r\n[ERROR] : \t32 CoreFoundation 0x0511bf00 __CFRunLoopDoObservers + 400\r\n[ERROR] : \t33 CoreFoundation 0x0511193a __CFRunLoopRun + 1226\r\n[ERROR] : \t34 CoreFoundation 0x051111ab CFRunLoopRunSpecific + 443\r\n[ERROR] : \t35 CoreFoundation 0x05110fdb CFRunLoopRunInMode + 123\r\n[ERROR] : \t36 GraphicsServices 0x05c2624f GSEventRunModal + 192\r\n[ERROR] : \t37 GraphicsServices 0x05c2608c GSEventRun + 104\r\n[ERROR] : \t38 UIKit 0x0269de16 UIApplicationMain + 1526\r\n[ERROR] : \t39 appName 0x0006ce08 main + 456\r\n[ERROR] : \t40 libdyld.dylib 0x057deac9 start + 1\r\n[ERROR] : )\r\n[ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException\r\n-- End simulator log ---------------------------------------------------------\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: App crash if bindId is called 'description'", "creator": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS 8, Ti 3.4.0.GA", "comment": { "comments": [ { "id": "327824", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Hi,\r\n\r\nThis wiki lists keywords that may not be used as variables, functions, methods, or object identifiers, because either Titanium or another source specifies its usage. [https://wiki.appcelerator.org/display/guides2/Reserved+Words]\r\n\r\nRegards,\r\nShuo", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-10-13T07:21:16.000+0000", "updated": "2014-10-13T07:21:16.000+0000" }, { "id": "327825", "author": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "body": "Duplicate to [TIDOC-596|https://wiki.appcelerator.org/display/guides2/Reserved+Words]", "updateAuthor": { "name": "sliang", "key": "sliang", "displayName": "Shuo Liang", "active": true, "timeZone": "Asia/Harbin" }, "created": "2014-10-13T07:22:30.000+0000", "updated": "2014-10-13T07:22:30.000+0000" }, { "id": "327830", "author": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I see, thank you. My question is then: Shouldn't Titanium/Alloy warn an user about reserved keyword when compiling...?", "updateAuthor": { "name": "sko", "key": "sko", "displayName": "Matej", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-10-13T08:07:32.000+0000", "updated": "2014-10-13T08:07:32.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }