Hi, I am using Cocoa with Obj-C
I am trying to set the first entry under NSPopupButton using [popup selectItemAtIndex:0] in awakeFromNib of the window. I have only one entry in popup button.
But it is returning run time exception.
2008-01-31 19:52:55.493 Appln 3[13912] *** Assertion failure in -[NSMenu itemAtIndex:], Menus.subproj/NSMenu.m:713
2008-01-31 19:52:55.493 Appln 3[13912] Exception raised during posting of notification. Ignored. exception: Invalid parameter not satisfying: (index >= 0) && (index < (_itemArray ? CFArrayGetCount((CFArrayRef)_itemArray) : 0))
What might be the cause?
I am trying to set the first entry under NSPopupButton using [popup selectItemAtIndex:0] in awakeFromNib of the window. I have only one entry in popup button.
But it is returning run time exception.
2008-01-31 19:52:55.493 Appln 3[13912] *** Assertion failure in -[NSMenu itemAtIndex:], Menus.subproj/NSMenu.m:713
2008-01-31 19:52:55.493 Appln 3[13912] Exception raised during posting of notification. Ignored. exception: Invalid parameter not satisfying: (index >= 0) && (index < (_itemArray ? CFArrayGetCount((CFArrayRef)_itemArray) : 0))
What might be the cause?