NSPopUpButton trouble
NSPopUpButton trouble
- Subject: NSPopUpButton trouble
- From: Aaron Boothello <email@hidden>
- Date: Sun, 04 Jan 2004 18:55:39 +0800
I'm using a drop down menu via NSPopUpButton in my App.
i update the menu using the following pseudo code:
-(void)updateMyPopUpButton
{
int x,selected;
[myPopUpButton removeAllItems];
for(x = 0;x<[mySuperModel getModelCounter];x++)
{
[myPopUpButton addItemWithTitle:(NSString *)[object[x] getTitle]];
if([object isObjectSelected])
selected = x;
}
[myPopUpButton selectItemAtIndex:selFlag];
}
here's the problem:
the last line of the code is where the app ALWAYS crashes, i comment it out and all is well. but id like to know why this is happening, and how to correct it.
Cheers,
Aaron.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.