For a picker UI on one of my Alloy .xml files :
<Picker id="picker" width="50" height="40" top="50" backgroundColor="transparent" selectionIndicator="true" useSpinner="true"> <Column id="column" /> </Picker>i tried to add dynamically some rows to the unique column existing in that Picker using a for loop :
for(var i = 0; i < parseInt(parseInt(params.nMaxSp)+1); i++){ Ti.API.error(' FOOOR LOOP i : '+i); $.column.addRow(Ti.UI.createPickerRow({title:i})); }i got this error :
The application has crashed with an uncaught exception 'NSInvalidArgumentException'. [ERROR] : Reason: [ERROR] : -[__NSCFNumber length]: unrecognized selector sent to instance 0xe3afdf0 [ERROR] : Stack trace: [ERROR] : 0 CoreFoundation 0x043485c8 __exceptionPreprocess + 152 [ERROR] : 1 libobjc.A.dylib 0x03e528b6 objc_exception_throw + 44 [ERROR] : 2 CoreFoundation 0x043e5903 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 [ERROR] : 3 CoreFoundation 0x0433890b ___forwarding___ + 1019 [ERROR] : 4 CoreFoundation 0x043384ee _CF_forwarding_prep_0 + 14 [ERROR] : 5 Foundation 0x010e78ed -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 39 [ERROR] : 6 Foundation 0x010e855a -[NSConcreteMutableAttributedString initWithString:attributes:] + 293 [ERROR] : 7 UIKit 0x01660bc6 -[UILabel _setText:] + 97 [ERROR] : 8 UIKit 0x01660d84 -[UILabel setText:] + 40 [ERROR] : 9 myAppName 0x001cad3d -[TiUIPickerRowProxy viewWithFrame:reusingView:] + 701 [ERROR] : 10 myAppName 0x001c9ee3 -[TiUIPicker pickerView:viewForRow:forComponent:reusingView:] + 451http://www.appcelerator.com/products [ERROR] : 11 UIKit 0x014a5aa1 -[UIPickerView tableView:cellForRowAtIndexPath:] + 578 [ERROR] : 12 UIKit 0x01ae84d4 -[UIPickerColumnView tableView:cellForRowAtIndexPath:] + 59 [ERROR] : 13 UIKit 0x015a261f -[UITableView _createPreparedCellForGlobalRow:withIndexPath:] + 412 [ERROR] : 14 UIKit 0x015a26f3 -[UITableView _createPreparedCellForGlobalRow:] + 69 [ERROR] : 15 UIKit 0x01586774 -[UITableView _updateVisibleCellsNow:] + 2378 [ERROR] : 16 UIKit 0x01599e95 -[UITableView layoutSubviews] + 213 [ERROR] : 17 UIKit 0x019d752c -[UIPickerTableView layoutSubviews] + 71 [ERROR] : 18 UIKit 0x0151e267 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 355 [ERROR] : 19 libobjc.A.dylib 0x03e6481f -[NSObject performSelector:withObject:] + 70 [ERROR] : 20 QuartzCore 0x0301f2ea -[CALayer layoutSublayers] + 148 [ERROR] : 21 QuartzCore 0x030130d4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380 [ERROR] : 22 QuartzCore 0x03012f40 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26 [ERROR] : 23 QuartzCore 0x02f7aae6 _ZN2CA7Context18commit_transactionEPNS_1 0x010e78ed -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 39 .... ... ...i couldn't paste all the error text as i couldn't preview it because it's too long..