Popup button crash
Popup button crash
- Subject: Popup button crash
- From: Rosyna <email@hidden>
- Date: Mon, 25 Feb 2002 21:24:27 -0700
I'm trying to build a popup button's menu based on context as soon as
the menu is requested. I do this by adding an observer for my Popup
button's cell in awakeFromNib like so:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(popup:)
name:NSPopUpButtonCellWillPopUpNotification object:[view cell]];
then the selector:
- (void)popup:(NSNotification *)notification
{
NSMenu* theMun=[[NSApp mainMenu] copyWithZone: NSDefaultMallocZone()];
NSLog(NSStringFromClass([[notification object] class]));
//NSPopUpButtonCell
[[notification object] setMenu:theMun];
}
as soon as popup finishes, the application crashes with a SIGABRT error.
Is it even possible to do what I am trying to do?
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insane People
---
Please include any previous correspondence in replies, it helps me
remember what you're talking about. Thanks.
_______________________________________________
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.