I've created two windows and a click event in the first window opens up the second window. But when I use picker the app seems to crash every time I open the second window and shows up the following error. Pls help. I've tried so many things, but nothing seems to be working when i use a picker. Thank you
[ERROR] : The application has crashed with an uncaught exception 'NSRangeException'. [ERROR] : Reason: [ERROR] : *** -[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1] [ERROR] : Stack trace: [ERROR] : 0 CoreFoundation 0x0422b028 __exceptionPreprocess + 152 [ERROR] : 1 libobjc.A.dylib 0x03c27902 objc_exception_throw + 44 [ERROR] : 2 CoreFoundation 0x041cc006 -[__NSArrayM objectAtIndex:] + 246 [ERROR] : 3 FoodTrackerAlloy 0x001c3034 -[TiUIPicker pickerView:rowHeightForComponent:] + 100 [ERROR] : 4 UIKit 0x012aa3db -[UIPickerView _delegateRowHeightForComponent:] + 82 [ERROR] : 5 UIKit 0x012ab8e9 -[UIPickerView layoutSubviews] + 2975 [ERROR] : 6 UIKit 0x01321b93 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 388 [ERROR] : 7 libobjc.A.dylib 0x03c399b7 -[NSObject performSelector:withObject:] + 70 [ERROR] : 8 QuartzCore 0x02de49b8 -[CALayer layoutSublayers] + 148 [ERROR] : 9 QuartzCore 0x02dd87a4 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 386 [ERROR] : 10 QuartzCore 0x02dd860a _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26 [ERROR] : 11 QuartzCore 0x02d4143c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 288 [ERROR] : 12 QuartzCore 0x02d427cf _ZN2CA11Transaction6commitEv + 393 [ERROR] : 13 QuartzCore 0x02d42ea2 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92 [ERROR] : 14 CoreFoundation 0x041f2ffe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30 [ERROR] : 15 CoreFoundation 0x041f2f4f __CFRunLoopDoObservers + 399 [ERROR] : 16 CoreFoundation 0x041d11d0 __CFRunLoopRun + 2064 [ERROR] : 17 CoreFoundation 0x041d059f CFRunLoopRunSpecific + 415 [ERROR] : 18 CoreFoundation 0x041d03eb CFRunLoopRunInMode + 123 [ERROR] : 19 GraphicsServices 0x03fc7404 GSEventRunModal + 192 [ERROR] : 20 GraphicsServices 0x03fc722b GSEventRun + 104 [ERROR] : 21 UIKit 0x012b9b6b UIApplicationMain + 1225 [ERROR] : 22 FoodTrackerAlloy 0x00008058 main + 456 [ERROR] : 23 FoodTrackerAlloy 0x000069a5 start + 53 [ERROR] : 2013-07-08 21:27:13.275 FoodTrackerAlloy[13596:c07] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 2 beyond bounds [0 .. 1]' [ERROR] : *** First throw call stack: [ERROR] : (0x422b028 0x3c27902 0x41cc006 0x1c3034 0x12aa3db 0x12ab8e9 0x1321b93 0x3c399b7 0x2de49b8 0x2dd87a4 0x2dd860a 0x2d4143c 0x2d427cf 0x2d42ea2 0x41f2ffe 0x41f2f4f 0x41d11d0 0x41d059f 0x41d03eb 0x3fc7404 0x3fc722b 0x12b9b6b 0x8058 0x69a5) [ERROR] : libc++abi.dylib: terminating with uncaught exception of type NSException -- End simulator log --------------------------------------------------------- [ERROR] : An error occurred running the iOS Simulator [ERROR] : [ERROR] : Project failed to build after 12s 52ms