[AC-1329] iOS: error "Collection was mutated while being enumerated" on ListView itemclick
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Needs more info |
Resolution Date | 2015-09-30T04:28:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Mauro Piccotti |
Assignee | Shak Hossain |
Created | 2015-07-22T10:41:05.000+0000 |
Updated | 2016-03-08T07:37:44.000+0000 |
Description
A very weird error appeared after I upgraded my app to Titanium 4.1 from 4.0.
Itemclick event on some components of a ListView crashes my application, I've finally found the problem and a workround.
The problem is difficult to reproduce and i cannot give you my controller/xml/tss because I have too many dependencies, but I reduced the code and I think that with the js and the error who changed the itemclick on ListView perhaps can understand what is the problem.
If I set the value property of a textField on my listView passing the value as parameter to the factory application crashes at the popover.show (it always worked before 4.1). If I remove the the parameter in the factory and I set the value after it works.
Attachments
Doing the cast to String of the value it works, so it seems that now factory doesn't like to receive a number as value (setValue works). 'value' : String(orderRow.getQty())
The same problem if I set the "value" property of a TextField with a number, it works only if I before do the cast to string with String(value).
Your problem is likely the same as TIMOB-19249 Hopefully that fix helps you out.